mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
This reverts commit a7ef0a82b1df4ec103fcbf8f2573ed907483060f.
This commit is contained in:
parent
1ecf5607c7
commit
a8c6f8bce0
@ -76,9 +76,6 @@ public class ElasticSearchIndexDefinition {
|
|||||||
ENTITY_REPORT_DATA, "entity_report_data_index", "/elasticsearch/entity_report_data_index.json"),
|
ENTITY_REPORT_DATA, "entity_report_data_index", "/elasticsearch/entity_report_data_index.json"),
|
||||||
TEST_CASE_SEARCH_INDEX(
|
TEST_CASE_SEARCH_INDEX(
|
||||||
Entity.TEST_CASE, "test_case_search_index", "/elasticsearch/%s/test_case_index_mapping.json"),
|
Entity.TEST_CASE, "test_case_search_index", "/elasticsearch/%s/test_case_index_mapping.json"),
|
||||||
|
|
||||||
TEST_SUITE_SEARCH_INDEX(
|
|
||||||
Entity.TEST_SUITE, "test_suite_search_index", "/elasticsearch/%s/test_suite_index_mapping.json"),
|
|
||||||
WEB_ANALYTIC_ENTITY_VIEW_REPORT_DATA_INDEX(
|
WEB_ANALYTIC_ENTITY_VIEW_REPORT_DATA_INDEX(
|
||||||
Entity.WEB_ANALYTIC_EVENT,
|
Entity.WEB_ANALYTIC_EVENT,
|
||||||
"web_analytic_entity_view_report_data_index",
|
"web_analytic_entity_view_report_data_index",
|
||||||
@ -174,10 +171,8 @@ public class ElasticSearchIndexDefinition {
|
|||||||
return ElasticSearchIndexType.CONTAINER_SEARCH_INDEX;
|
return ElasticSearchIndexType.CONTAINER_SEARCH_INDEX;
|
||||||
} else if (type.equalsIgnoreCase(Entity.QUERY)) {
|
} else if (type.equalsIgnoreCase(Entity.QUERY)) {
|
||||||
return ElasticSearchIndexType.QUERY_SEARCH_INDEX;
|
return ElasticSearchIndexType.QUERY_SEARCH_INDEX;
|
||||||
} else if (type.equalsIgnoreCase(Entity.TEST_CASE)) {
|
} else if (type.equalsIgnoreCase(Entity.TEST_SUITE) || type.equalsIgnoreCase(Entity.TEST_CASE)) {
|
||||||
return ElasticSearchIndexType.TEST_CASE_SEARCH_INDEX;
|
return ElasticSearchIndexType.TEST_CASE_SEARCH_INDEX;
|
||||||
} else if (type.equalsIgnoreCase(Entity.TEST_SUITE)) {
|
|
||||||
return ElasticSearchIndexType.TEST_SUITE_SEARCH_INDEX;
|
|
||||||
}
|
}
|
||||||
throw new EventPublisherException("Failed to find index doc for type " + type);
|
throw new EventPublisherException("Failed to find index doc for type " + type);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,6 @@ import org.openmetadata.schema.entity.data.Topic;
|
|||||||
import org.openmetadata.schema.entity.teams.Team;
|
import org.openmetadata.schema.entity.teams.Team;
|
||||||
import org.openmetadata.schema.entity.teams.User;
|
import org.openmetadata.schema.entity.teams.User;
|
||||||
import org.openmetadata.schema.tests.TestCase;
|
import org.openmetadata.schema.tests.TestCase;
|
||||||
import org.openmetadata.schema.tests.TestSuite;
|
|
||||||
import org.openmetadata.service.Entity;
|
import org.openmetadata.service.Entity;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.ContainerIndex;
|
import org.openmetadata.service.elasticsearch.indexes.ContainerIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.DashboardIndex;
|
import org.openmetadata.service.elasticsearch.indexes.DashboardIndex;
|
||||||
@ -25,7 +24,6 @@ import org.openmetadata.service.elasticsearch.indexes.QueryIndex;
|
|||||||
import org.openmetadata.service.elasticsearch.indexes.TableIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TableIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TestSuiteIndex;
|
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TopicIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TopicIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
||||||
|
|
||||||
@ -58,9 +56,8 @@ public class ElasticSearchIndexFactory {
|
|||||||
case Entity.CONTAINER:
|
case Entity.CONTAINER:
|
||||||
return new ContainerIndex((Container) entity);
|
return new ContainerIndex((Container) entity);
|
||||||
case Entity.TEST_CASE:
|
case Entity.TEST_CASE:
|
||||||
return new TestCaseIndex((TestCase) entity);
|
|
||||||
case Entity.TEST_SUITE:
|
case Entity.TEST_SUITE:
|
||||||
return new TestSuiteIndex((TestSuite) entity);
|
return new TestCaseIndex((TestCase) entity);
|
||||||
default:
|
default:
|
||||||
LOG.warn("Ignoring Entity Type {}", entityType);
|
LOG.warn("Ignoring Entity Type {}", entityType);
|
||||||
}
|
}
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package org.openmetadata.service.elasticsearch.indexes;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import org.openmetadata.schema.tests.TestSuite;
|
|
||||||
import org.openmetadata.service.util.JsonUtils;
|
|
||||||
|
|
||||||
public class TestSuiteIndex implements ElasticSearchIndex {
|
|
||||||
TestSuite testSuite;
|
|
||||||
|
|
||||||
public TestSuiteIndex(TestSuite testSuite) {
|
|
||||||
this.testSuite = testSuite;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Map<String, Object> buildESDoc() {
|
|
||||||
Map<String, Object> doc = JsonUtils.getMap(testSuite);
|
|
||||||
return doc;
|
|
||||||
}
|
|
||||||
}
|
|
@ -133,7 +133,6 @@ import org.openmetadata.service.elasticsearch.indexes.ElasticSearchIndex;
|
|||||||
import org.openmetadata.service.elasticsearch.indexes.GlossaryTermIndex;
|
import org.openmetadata.service.elasticsearch.indexes.GlossaryTermIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TestSuiteIndex;
|
|
||||||
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
||||||
import org.openmetadata.service.jdbi3.CollectionDAO;
|
import org.openmetadata.service.jdbi3.CollectionDAO;
|
||||||
import org.openmetadata.service.jdbi3.DataInsightChartRepository;
|
import org.openmetadata.service.jdbi3.DataInsightChartRepository;
|
||||||
@ -280,7 +279,6 @@ public class ElasticSearchClientImpl implements SearchClient {
|
|||||||
searchSourceBuilder = buildQuerySearchBuilder(request.getQuery(), request.getFrom(), request.getSize());
|
searchSourceBuilder = buildQuerySearchBuilder(request.getQuery(), request.getFrom(), request.getSize());
|
||||||
break;
|
break;
|
||||||
case "test_case_search_index":
|
case "test_case_search_index":
|
||||||
case "test_suite_search_index":
|
|
||||||
searchSourceBuilder = buildTestCaseSearch(request.getQuery(), request.getFrom(), request.getSize());
|
searchSourceBuilder = buildTestCaseSearch(request.getQuery(), request.getFrom(), request.getSize());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1180,33 +1178,26 @@ public class ElasticSearchClientImpl implements SearchClient {
|
|||||||
@Override
|
@Override
|
||||||
public void updateTestSuite(ChangeEvent event) throws IOException {
|
public void updateTestSuite(ChangeEvent event) throws IOException {
|
||||||
ElasticSearchIndexDefinition.ElasticSearchIndexType indexType =
|
ElasticSearchIndexDefinition.ElasticSearchIndexType indexType =
|
||||||
ElasticSearchIndexDefinition.getIndexMappingByEntityType(Entity.TEST_SUITE);
|
ElasticSearchIndexDefinition.getIndexMappingByEntityType(Entity.TEST_CASE);
|
||||||
TestSuite testSuite = (TestSuite) event.getEntity();
|
TestSuite testSuite = (TestSuite) event.getEntity();
|
||||||
UUID testSuiteId = testSuite.getId();
|
UUID testSuiteId = testSuite.getId();
|
||||||
|
|
||||||
UpdateRequest updateRequest = new UpdateRequest(indexType.indexName, testSuiteId.toString());
|
if (event.getEventType() == ENTITY_DELETED) {
|
||||||
TestSuiteIndex testSuiteIndex;
|
if (testSuite.getExecutable()) {
|
||||||
|
DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(indexType.indexName);
|
||||||
switch (event.getEventType()) {
|
deleteByQueryRequest.setQuery(new MatchQueryBuilder("testSuites.id", testSuiteId.toString()));
|
||||||
case ENTITY_CREATED:
|
deleteEntityFromElasticSearchByQuery(deleteByQueryRequest);
|
||||||
testSuiteIndex = new TestSuiteIndex((TestSuite) event.getEntity());
|
} else {
|
||||||
updateRequest.doc(JsonUtils.pojoToJson(testSuiteIndex.buildESDoc()), XContentType.JSON);
|
UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexType.indexName);
|
||||||
updateRequest.docAsUpsert(true);
|
updateByQueryRequest.setQuery(new MatchQueryBuilder("testSuites.id", testSuiteId.toString()));
|
||||||
updateElasticSearch(updateRequest);
|
String scriptTxt =
|
||||||
break;
|
"for (int i = 0; i < ctx._source.testSuites.length; i++) { if (ctx._source.testSuites[i].id == '%s') { ctx._source.testSuites.remove(i) }}";
|
||||||
case ENTITY_UPDATED:
|
Script script =
|
||||||
testSuiteIndex = new TestSuiteIndex((TestSuite) event.getEntity());
|
new Script(
|
||||||
scriptedUpsert(testSuiteIndex.buildESDoc(), updateRequest);
|
ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG, String.format(scriptTxt, testSuiteId), new HashMap<>());
|
||||||
updateElasticSearch(updateRequest);
|
updateByQueryRequest.setScript(script);
|
||||||
break;
|
updateElasticSearchByQuery(updateByQueryRequest);
|
||||||
case ENTITY_SOFT_DELETED:
|
}
|
||||||
softDeleteEntity(updateRequest);
|
|
||||||
updateElasticSearch(updateRequest);
|
|
||||||
break;
|
|
||||||
case ENTITY_DELETED:
|
|
||||||
DeleteRequest deleteRequest = new DeleteRequest(indexType.indexName, event.getEntityId().toString());
|
|
||||||
deleteEntityFromElasticSearch(deleteRequest);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,6 @@ import org.openmetadata.service.elasticsearch.indexes.ElasticSearchIndex;
|
|||||||
import org.openmetadata.service.elasticsearch.indexes.GlossaryTermIndex;
|
import org.openmetadata.service.elasticsearch.indexes.GlossaryTermIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TagIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
import org.openmetadata.service.elasticsearch.indexes.TeamIndex;
|
||||||
import org.openmetadata.service.elasticsearch.indexes.TestSuiteIndex;
|
|
||||||
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
import org.openmetadata.service.elasticsearch.indexes.UserIndex;
|
||||||
import org.openmetadata.service.jdbi3.CollectionDAO;
|
import org.openmetadata.service.jdbi3.CollectionDAO;
|
||||||
import org.openmetadata.service.jdbi3.DataInsightChartRepository;
|
import org.openmetadata.service.jdbi3.DataInsightChartRepository;
|
||||||
@ -280,7 +279,6 @@ public class OpenSearchClientImpl implements SearchClient {
|
|||||||
searchSourceBuilder = buildQuerySearchBuilder(request.getQuery(), request.getFrom(), request.getSize());
|
searchSourceBuilder = buildQuerySearchBuilder(request.getQuery(), request.getFrom(), request.getSize());
|
||||||
break;
|
break;
|
||||||
case "test_case_search_index":
|
case "test_case_search_index":
|
||||||
case "test_suite_search_index":
|
|
||||||
searchSourceBuilder = buildTestCaseSearch(request.getQuery(), request.getFrom(), request.getSize());
|
searchSourceBuilder = buildTestCaseSearch(request.getQuery(), request.getFrom(), request.getSize());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1174,33 +1172,26 @@ public class OpenSearchClientImpl implements SearchClient {
|
|||||||
@Override
|
@Override
|
||||||
public void updateTestSuite(ChangeEvent event) throws IOException {
|
public void updateTestSuite(ChangeEvent event) throws IOException {
|
||||||
ElasticSearchIndexDefinition.ElasticSearchIndexType indexType =
|
ElasticSearchIndexDefinition.ElasticSearchIndexType indexType =
|
||||||
ElasticSearchIndexDefinition.getIndexMappingByEntityType(Entity.TEST_SUITE);
|
ElasticSearchIndexDefinition.getIndexMappingByEntityType(Entity.TEST_CASE);
|
||||||
TestSuite testSuite = (TestSuite) event.getEntity();
|
TestSuite testSuite = (TestSuite) event.getEntity();
|
||||||
UUID testSuiteId = testSuite.getId();
|
UUID testSuiteId = testSuite.getId();
|
||||||
|
|
||||||
UpdateRequest updateRequest = new UpdateRequest(indexType.indexName, testSuiteId.toString());
|
if (event.getEventType() == ENTITY_DELETED) {
|
||||||
TestSuiteIndex testSuiteIndex;
|
if (Boolean.TRUE.equals(testSuite.getExecutable())) {
|
||||||
|
DeleteByQueryRequest deleteByQueryRequest = new DeleteByQueryRequest(indexType.indexName);
|
||||||
switch (event.getEventType()) {
|
deleteByQueryRequest.setQuery(new MatchQueryBuilder("testSuites.id", testSuiteId.toString()));
|
||||||
case ENTITY_CREATED:
|
deleteEntityFromElasticSearchByQuery(deleteByQueryRequest);
|
||||||
testSuiteIndex = new TestSuiteIndex((TestSuite) event.getEntity());
|
} else {
|
||||||
updateRequest.doc(JsonUtils.pojoToJson(testSuiteIndex.buildESDoc()), XContentType.JSON);
|
UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexType.indexName);
|
||||||
updateRequest.docAsUpsert(true);
|
updateByQueryRequest.setQuery(new MatchQueryBuilder("testSuites.id", testSuiteId.toString()));
|
||||||
updateElasticSearch(updateRequest);
|
String scriptTxt =
|
||||||
break;
|
"for (int i = 0; i < ctx._source.testSuites.length; i++) { if (ctx._source.testSuites[i].id == '%s') { ctx._source.testSuites.remove(i) }}";
|
||||||
case ENTITY_UPDATED:
|
Script script =
|
||||||
testSuiteIndex = new TestSuiteIndex((TestSuite) event.getEntity());
|
new Script(
|
||||||
scriptedUpsert(testSuiteIndex.buildESDoc(), updateRequest);
|
ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG, String.format(scriptTxt, testSuiteId), new HashMap<>());
|
||||||
updateElasticSearch(updateRequest);
|
updateByQueryRequest.setScript(script);
|
||||||
break;
|
updateElasticSearchByQuery(updateByQueryRequest);
|
||||||
case ENTITY_SOFT_DELETED:
|
}
|
||||||
softDeleteEntity(updateRequest);
|
|
||||||
updateElasticSearch(updateRequest);
|
|
||||||
break;
|
|
||||||
case ENTITY_DELETED:
|
|
||||||
DeleteRequest deleteRequest = new DeleteRequest(indexType.indexName, event.getEntityId().toString());
|
|
||||||
deleteEntityFromElasticSearch(deleteRequest);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,92 +0,0 @@
|
|||||||
{
|
|
||||||
"settings": {
|
|
||||||
"analysis": {
|
|
||||||
"normalizer": {
|
|
||||||
"lowercase_normalizer": {
|
|
||||||
"type": "custom",
|
|
||||||
"char_filter": [],
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"analyzer": {
|
|
||||||
"om_analyzer": {
|
|
||||||
"tokenizer": "letter",
|
|
||||||
"filter": [
|
|
||||||
"lowercase",
|
|
||||||
"om_stemmer"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"om_ngram": {
|
|
||||||
"tokenizer": "ngram",
|
|
||||||
"min_gram": 2,
|
|
||||||
"max_gram": 3,
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"filter": {
|
|
||||||
"om_stemmer": {
|
|
||||||
"type": "stemmer",
|
|
||||||
"name": "english"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": {
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "keyword"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
},
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fullyQualifiedName": {
|
|
||||||
"type": "keyword",
|
|
||||||
"normalizer": "lowercase_normalizer"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer",
|
|
||||||
"fields": {
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"displayName": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"deleted": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"href": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"executable": {
|
|
||||||
"type": "text"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,102 +0,0 @@
|
|||||||
{
|
|
||||||
"settings": {
|
|
||||||
"analysis": {
|
|
||||||
"normalizer": {
|
|
||||||
"lowercase_normalizer": {
|
|
||||||
"type": "custom",
|
|
||||||
"char_filter": [],
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"analyzer": {
|
|
||||||
"om_analyzer": {
|
|
||||||
"tokenizer": "letter",
|
|
||||||
"filter": [
|
|
||||||
"lowercase",
|
|
||||||
"om_stemmer"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"om_analyzer_jp" : {
|
|
||||||
"tokenizer" : "kuromoji_tokenizer",
|
|
||||||
"type" : "custom",
|
|
||||||
"filter" : [
|
|
||||||
"kuromoji_baseform",
|
|
||||||
"kuromoji_part_of_speech",
|
|
||||||
"kuromoji_number",
|
|
||||||
"kuromoji_stemmer"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"om_ngram": {
|
|
||||||
"tokenizer": "ngram",
|
|
||||||
"min_gram": 1,
|
|
||||||
"max_gram": 2,
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"filter": {
|
|
||||||
"om_stemmer": {
|
|
||||||
"type": "stemmer",
|
|
||||||
"name": "english"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": {
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "keyword"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer_jp",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
},
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fullyQualifiedName": {
|
|
||||||
"type": "keyword",
|
|
||||||
"normalizer": "lowercase_normalizer"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer_jp",
|
|
||||||
"fields": {
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"displayName": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_analyzer_jp",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"deleted": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"href": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"executable": {
|
|
||||||
"type": "text"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,92 +0,0 @@
|
|||||||
{
|
|
||||||
"settings": {
|
|
||||||
"analysis": {
|
|
||||||
"normalizer": {
|
|
||||||
"lowercase_normalizer": {
|
|
||||||
"type": "custom",
|
|
||||||
"char_filter": [],
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"analyzer": {
|
|
||||||
"om_analyzer": {
|
|
||||||
"tokenizer": "letter",
|
|
||||||
"filter": [
|
|
||||||
"lowercase",
|
|
||||||
"om_stemmer"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"om_ngram": {
|
|
||||||
"tokenizer": "ngram",
|
|
||||||
"min_gram": 2,
|
|
||||||
"max_gram": 3,
|
|
||||||
"filter": [
|
|
||||||
"lowercase"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"filter": {
|
|
||||||
"om_stemmer": {
|
|
||||||
"type": "stemmer",
|
|
||||||
"name": "english"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": {
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "keyword"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "ik_max_word",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
},
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fullyQualifiedName": {
|
|
||||||
"type": "keyword",
|
|
||||||
"normalizer": "lowercase_normalizer"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "ik_max_word",
|
|
||||||
"fields": {
|
|
||||||
"ngram": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "om_ngram"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"displayName": {
|
|
||||||
"type": "text",
|
|
||||||
"analyzer": "ik_max_word",
|
|
||||||
"fields": {
|
|
||||||
"keyword": {
|
|
||||||
"type": "keyword",
|
|
||||||
"ignore_above": 256
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"deleted": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"href": {
|
|
||||||
"type": "text"
|
|
||||||
},
|
|
||||||
"executable": {
|
|
||||||
"type": "text"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user