mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-09 23:40:05 +00:00
Fix TestCase indexing: exclude change descripiton from indexing (#12281)
* Fix TestCase indexing: exclude change descripiton from indexing * Fix TestCase indexing: exclude change descripiton from indexing --------- Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
This commit is contained in:
parent
0ae716a791
commit
bc6ebee369
@ -16,6 +16,8 @@ import org.openmetadata.service.util.JsonUtils;
|
|||||||
public class TestCaseIndex implements ElasticSearchIndex {
|
public class TestCaseIndex implements ElasticSearchIndex {
|
||||||
TestCase testCase;
|
TestCase testCase;
|
||||||
|
|
||||||
|
private static final List<String> excludeFields = List.of("changeDescription");
|
||||||
|
|
||||||
public TestCaseIndex(TestCase testCase) {
|
public TestCaseIndex(TestCase testCase) {
|
||||||
this.testCase = testCase;
|
this.testCase = testCase;
|
||||||
}
|
}
|
||||||
@ -31,6 +33,7 @@ public class TestCaseIndex implements ElasticSearchIndex {
|
|||||||
List<TestSuite> testSuiteArray = new ArrayList<>();
|
List<TestSuite> testSuiteArray = new ArrayList<>();
|
||||||
testSuiteArray.add(testSuite);
|
testSuiteArray.add(testSuite);
|
||||||
Map<String, Object> doc = JsonUtils.getMap(testCase);
|
Map<String, Object> doc = JsonUtils.getMap(testCase);
|
||||||
|
ElasticSearchIndexUtils.removeNonIndexableFields(doc, excludeFields);
|
||||||
doc.put("testSuites", testSuiteArray);
|
doc.put("testSuites", testSuiteArray);
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user