mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 03:29:03 +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 {
|
||||
TestCase testCase;
|
||||
|
||||
private static final List<String> excludeFields = List.of("changeDescription");
|
||||
|
||||
public TestCaseIndex(TestCase testCase) {
|
||||
this.testCase = testCase;
|
||||
}
|
||||
@ -31,6 +33,7 @@ public class TestCaseIndex implements ElasticSearchIndex {
|
||||
List<TestSuite> testSuiteArray = new ArrayList<>();
|
||||
testSuiteArray.add(testSuite);
|
||||
Map<String, Object> doc = JsonUtils.getMap(testCase);
|
||||
ElasticSearchIndexUtils.removeNonIndexableFields(doc, excludeFields);
|
||||
doc.put("testSuites", testSuiteArray);
|
||||
return doc;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user