mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-08 13:36:32 +00:00
Add schemaText to topic Index (#9482)
* Add schemaText to topic Index * Remove ChangeDescription from TopicIndex
This commit is contained in:
parent
871da6f6db
commit
b4e274c8d5
@ -88,6 +88,9 @@ TOPIC_ELASTICSEARCH_INDEX_MAPPING = textwrap.dedent(
|
||||
"type": "keyword",
|
||||
"normalizer": "lowercase_normalizer"
|
||||
},
|
||||
"schemaText": {
|
||||
"type": "text"
|
||||
},
|
||||
"schemaFields": {
|
||||
"properties": {
|
||||
"name": {
|
||||
|
||||
@ -9,6 +9,7 @@ import org.openmetadata.service.util.JsonUtils;
|
||||
|
||||
public class MlModelIndex implements ElasticSearchIndex {
|
||||
final MlModel mlModel;
|
||||
final List<String> excludeFields = List.of("changeDescription");
|
||||
|
||||
public MlModelIndex(MlModel mlModel) {
|
||||
this.mlModel = mlModel;
|
||||
@ -17,6 +18,7 @@ public class MlModelIndex implements ElasticSearchIndex {
|
||||
public Map<String, Object> buildESDoc() {
|
||||
Map<String, Object> doc = JsonUtils.getMap(mlModel);
|
||||
List<ElasticSearchSuggest> suggest = new ArrayList<>();
|
||||
ElasticSearchIndexUtils.removeNonIndexableFields(doc, excludeFields);
|
||||
suggest.add(ElasticSearchSuggest.builder().input(mlModel.getFullyQualifiedName()).weight(5).build());
|
||||
suggest.add(ElasticSearchSuggest.builder().input(mlModel.getName()).weight(10).build());
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import org.openmetadata.service.Entity;
|
||||
import org.openmetadata.service.util.JsonUtils;
|
||||
|
||||
public class TopicIndex implements ElasticSearchIndex {
|
||||
final List<String> excludeTopicFields = List.of("sampleData");
|
||||
final List<String> excludeTopicFields = List.of("sampleData", "changeDescription");
|
||||
final Topic topic;
|
||||
|
||||
public TopicIndex(Topic topic) {
|
||||
|
||||
@ -72,6 +72,9 @@
|
||||
"type": "keyword",
|
||||
"normalizer": "lowercase_normalizer"
|
||||
},
|
||||
"schemaText": {
|
||||
"type": "text"
|
||||
},
|
||||
"schemaFields": {
|
||||
"properties": {
|
||||
"name": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user