org.openmetadata.service.search.indexes.TestCaseIndex Maven / Gradle / Ivy
package org.openmetadata.service.search.indexes;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.SneakyThrows;
import org.openmetadata.schema.tests.TestCase;
import org.openmetadata.schema.tests.TestDefinition;
import org.openmetadata.schema.tests.TestSuite;
import org.openmetadata.schema.type.EntityReference;
import org.openmetadata.schema.type.Include;
import org.openmetadata.service.Entity;
import org.openmetadata.service.search.SearchIndexUtils;
import org.openmetadata.service.search.models.SearchSuggest;
public record TestCaseIndex(TestCase testCase) implements SearchIndex {
private static final Set excludeFields = Set.of("changeDescription", "failedRowsSample");
@Override
public Object getEntity() {
return testCase;
}
@Override
public void removeNonIndexableFields(Map esDoc) {
SearchIndex.super.removeNonIndexableFields(esDoc);
List