diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/elasticsearch/indexes/TagIndex.java b/openmetadata-service/src/main/java/org/openmetadata/service/elasticsearch/indexes/TagIndex.java index e7ed0ea9617a..0ffaec4ba5a2 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/elasticsearch/indexes/TagIndex.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/elasticsearch/indexes/TagIndex.java @@ -5,11 +5,13 @@ import java.util.Map; import org.openmetadata.schema.entity.classification.Tag; import org.openmetadata.service.Entity; +import org.openmetadata.service.elasticsearch.ElasticSearchIndexUtils; import org.openmetadata.service.elasticsearch.models.ElasticSearchSuggest; import org.openmetadata.service.util.JsonUtils; public class TagIndex implements ElasticSearchIndex { final Tag tag; + private static final List excludeFields = List.of("changeDescription"); public TagIndex(Tag tag) { this.tag = tag; @@ -17,9 +19,15 @@ public TagIndex(Tag tag) { public Map buildESDoc() { Map doc = JsonUtils.getMap(tag); + ElasticSearchIndexUtils.removeNonIndexableFields(doc, excludeFields); List suggest = new ArrayList<>(); suggest.add(ElasticSearchSuggest.builder().input(tag.getFullyQualifiedName()).weight(5).build()); suggest.add(ElasticSearchSuggest.builder().input(tag.getName()).weight(10).build()); + if (tag.getDisabled() != null && tag.getDisabled()) { + doc.put("disabled", tag.getDisabled()); + } else { + doc.put("disabled", "false"); + } doc.put("suggest", suggest); doc.put("entityType", Entity.TAG); return doc; diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java index 9ced917fb9a2..a2b4b52696ca 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/CollectionDAO.java @@ -1810,6 +1810,119 @@ default String getNameHashColumn() { @SqlUpdate("DELETE FROM tag where fqnHash LIKE CONCAT(:fqnHashPrefix, '.%')") void deleteTagsByPrefix(@Bind("fqnHashPrefix") String fqnHashPrefix); + + @Override + default int listCount(ListFilter filter) { + boolean disabled = Boolean.parseBoolean(filter.getQueryParam("classification.disabled")); + String condition = + String.format( + "INNER JOIN entity_relationship er ON tag.id=er.toId AND er.relation=%s AND er.fromEntity='%s' " + + "INNER JOIN classification c on er.fromId=c.id", + CONTAINS.ordinal(), Entity.CLASSIFICATION); + String mySqlCondition = condition; + String postgresCondition = condition; + + if (disabled) { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = TRUE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = TRUE)", + postgresCondition); + } else { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = FALSE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = FALSE)", + postgresCondition); + } + + mySqlCondition = String.format("%s %s", mySqlCondition, filter.getCondition("tag")); + postgresCondition = String.format("%s %s", postgresCondition, filter.getCondition("tag")); + return listCount(getTableName(), getNameColumn(), mySqlCondition, postgresCondition); + } + + @Override + default List listBefore(ListFilter filter, int limit, String before) { + boolean disabled = Boolean.parseBoolean(filter.getQueryParam("classification.disabled")); + String condition = + String.format( + "INNER JOIN entity_relationship er ON tag.id=er.toId AND er.relation=%s AND er.fromEntity='%s' " + + "INNER JOIN classification c on er.fromId=c.id", + CONTAINS.ordinal(), Entity.CLASSIFICATION); + + String mySqlCondition = condition; + String postgresCondition = condition; + + if (disabled) { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = TRUE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = TRUE)", + postgresCondition); + } else { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = FALSE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = FALSE)", + postgresCondition); + } + + mySqlCondition = String.format("%s %s", mySqlCondition, filter.getCondition("tag")); + postgresCondition = String.format("%s %s", postgresCondition, filter.getCondition("tag")); + + return listBefore(getTableName(), getNameColumn(), mySqlCondition, postgresCondition, limit, before); + } + + @Override + default List listAfter(ListFilter filter, int limit, String after) { + String parent = filter.getQueryParam("parent"); + + boolean disabled = Boolean.parseBoolean(filter.getQueryParam("classification.disabled")); + String condition = + String.format( + "INNER JOIN entity_relationship er ON tag.id=er.toId AND er.relation=%s AND er.fromEntity='%s' " + + "INNER JOIN classification c on er.fromId=c.id", + CONTAINS.ordinal(), Entity.CLASSIFICATION); + + String mySqlCondition = condition; + String postgresCondition = condition; + + if (disabled) { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = TRUE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = TRUE)", + postgresCondition); + } else { + mySqlCondition = + String.format( + "%s AND (JSON_EXTRACT(c.json, '$.disabled') IS NULL OR JSON_EXTRACT(c.json, '$.disabled') = FALSE)", + mySqlCondition); + postgresCondition = + String.format( + "%s AND ((c.json#>'{disabled}') IS NULL OR ((c.json#>'{disabled}')::boolean) = FALSE)", + postgresCondition); + } + + mySqlCondition = String.format("%s %s", mySqlCondition, filter.getCondition("tag")); + postgresCondition = String.format("%s %s", postgresCondition, filter.getCondition("tag")); + return listAfter(getTableName(), getNameColumn(), mySqlCondition, postgresCondition, limit, after); + } } @RegisterRowMapper(TagLabelMapper.class) @@ -2114,66 +2227,6 @@ default List listAfter(ListFilter filter, int limit, String after) { return listAfter(getTableName(), getNameColumn(), mySqlCondition, postgresCondition, limit, after); } - @ConnectionAwareSqlQuery(value = "SELECT count(*) FROM ", connectionType = MYSQL) - @ConnectionAwareSqlQuery(value = "SELECT count(*) FROM
", connectionType = POSTGRES) - int listCount( - @Define("table") String table, - @Define("nameColumn") String nameColumn, - @Define("mysqlCond") String mysqlCond, - @Define("postgresCond") String postgresCond); - - @ConnectionAwareSqlQuery( - value = - "SELECT json FROM (" - + "SELECT , json FROM
AND " - + " < :before " - + // Pagination by entity fullyQualifiedName or name (when entity does not have fqn) - "ORDER BY DESC " - + // Pagination ordering by entity fullyQualifiedName or name (when entity does not have fqn) - "LIMIT :limit" - + ") last_rows_subquery ORDER BY ", - connectionType = MYSQL) - @ConnectionAwareSqlQuery( - value = - "SELECT json FROM (" - + "SELECT , json FROM
AND " - + " < :before " - + // Pagination by entity fullyQualifiedName or name (when entity does not have fqn) - "ORDER BY DESC " - + // Pagination ordering by entity fullyQualifiedName or name (when entity does not have fqn) - "LIMIT :limit" - + ") last_rows_subquery ORDER BY ", - connectionType = POSTGRES) - List listBefore( - @Define("table") String table, - @Define("nameColumn") String nameColumn, - @Define("mysqlCond") String mysqlCond, - @Define("postgresCond") String postgresCond, - @Bind("limit") int limit, - @Bind("before") String before); - - @ConnectionAwareSqlQuery( - value = - "SELECT json FROM
AND " - + " > :after " - + "ORDER BY " - + "LIMIT :limit", - connectionType = MYSQL) - @ConnectionAwareSqlQuery( - value = - "SELECT json FROM
AND " - + " > :after " - + "ORDER BY " - + "LIMIT :limit", - connectionType = POSTGRES) - List listAfter( - @Define("table") String table, - @Define("nameColumn") String nameColumn, - @Define("mysqlCond") String mysqlCond, - @Define("postgresCond") String postgresCond, - @Bind("limit") int limit, - @Bind("after") String after); - default List listTeamsUnderOrganization(String teamId) { return listTeamsUnderOrganization(teamId, Relationship.PARENT_OF.ordinal()); } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityDAO.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityDAO.java index b78f0bf579e5..0d8aeb7ad7f6 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityDAO.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/EntityDAO.java @@ -34,6 +34,7 @@ import org.openmetadata.service.Entity; import org.openmetadata.service.exception.CatalogExceptionMessage; import org.openmetadata.service.exception.EntityNotFoundException; +import org.openmetadata.service.jdbi3.locator.ConnectionAwareSqlQuery; import org.openmetadata.service.jdbi3.locator.ConnectionAwareSqlUpdate; import org.openmetadata.service.util.FullyQualifiedName; import org.openmetadata.service.util.JsonUtils; @@ -135,6 +136,66 @@ String findByName( @SqlQuery("SELECT count(*) FROM
") int listCount(@Define("table") String table, @Define("nameColumn") String nameColumn, @Define("cond") String cond); + @ConnectionAwareSqlQuery(value = "SELECT count(*) FROM
", connectionType = MYSQL) + @ConnectionAwareSqlQuery(value = "SELECT count(*) FROM
", connectionType = POSTGRES) + int listCount( + @Define("table") String table, + @Define("nameColumn") String nameColumn, + @Define("mysqlCond") String mysqlCond, + @Define("postgresCond") String postgresCond); + + @ConnectionAwareSqlQuery( + value = + "SELECT json FROM (" + + "SELECT
.,
.json FROM
AND " + + "
. < :before " + + // Pagination by entity fullyQualifiedName or name (when entity does not have fqn) + "ORDER BY
. DESC " + + // Pagination ordering by entity fullyQualifiedName or name (when entity does not have fqn) + "LIMIT :limit" + + ") last_rows_subquery ORDER BY ", + connectionType = MYSQL) + @ConnectionAwareSqlQuery( + value = + "SELECT json FROM (" + + "SELECT
.,
.json FROM
AND " + + "
. < :before " + + // Pagination by entity fullyQualifiedName or name (when entity does not have fqn) + "ORDER BY
. DESC " + + // Pagination ordering by entity fullyQualifiedName or name (when entity does not have fqn) + "LIMIT :limit" + + ") last_rows_subquery ORDER BY ", + connectionType = POSTGRES) + List listBefore( + @Define("table") String table, + @Define("nameColumn") String nameColumn, + @Define("mysqlCond") String mysqlCond, + @Define("postgresCond") String postgresCond, + @Bind("limit") int limit, + @Bind("before") String before); + + @ConnectionAwareSqlQuery( + value = + "SELECT
.json FROM
AND " + + "
. > :after " + + "ORDER BY
. " + + "LIMIT :limit", + connectionType = MYSQL) + @ConnectionAwareSqlQuery( + value = + "SELECT
.json FROM
AND " + + "
. > :after " + + "ORDER BY
. " + + "LIMIT :limit", + connectionType = POSTGRES) + List listAfter( + @Define("table") String table, + @Define("nameColumn") String nameColumn, + @Define("mysqlCond") String mysqlCond, + @Define("postgresCond") String postgresCond, + @Bind("limit") int limit, + @Bind("after") String after); + @SqlQuery("SELECT count(*) FROM
") int listTotalCount(@Define("table") String table, @Define("nameColumn") String nameColumn); diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/ListFilter.java b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/ListFilter.java index 5959229bf46b..3e87d9ff2946 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/ListFilter.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/ListFilter.java @@ -49,6 +49,7 @@ public String getCondition(String tableName) { condition = addCondition(condition, getServiceCondition(tableName)); condition = addCondition(condition, getPipelineTypeCondition(tableName)); condition = addCondition(condition, getParentCondition(tableName)); + condition = addCondition(condition, getDisabledCondition(tableName)); condition = addCondition(condition, getCategoryCondition(tableName)); condition = addCondition(condition, getWebhookCondition(tableName)); condition = addCondition(condition, getWebhookTypeCondition(tableName)); @@ -88,6 +89,30 @@ public String getParentCondition(String tableName) { return parentFqn == null ? "" : getFqnPrefixCondition(tableName, parentFqn); } + public String getDisabledCondition(String tableName) { + String disabled = queryParams.get("disabled"); + return disabled == null ? "" : getDisabledCondition(tableName, disabled); + } + + public String getDisabledCondition(String tableName, String disabledStr) { + boolean disabled = Boolean.parseBoolean(disabledStr); + String disabledCondition = ""; + if (DatasourceConfig.getInstance().isMySQL()) { + if (disabled) { + disabledCondition = "JSON_EXTRACT(json, '$.disabled') = TRUE"; + } else { + disabledCondition = "(JSON_EXTRACT(json, '$.disabled') IS NULL OR JSON_EXTRACT(json, '$.disabled') = FALSE)"; + } + } else { + if (disabled) { + disabledCondition = "((c.json#>'{disabled}')::boolean) = TRUE)"; + } else { + disabledCondition = "(c.json#>'{disabled}' IS NULL OR ((c.json#>'{disabled}'):boolean) = FALSE"; + } + } + return disabledCondition; + } + public String getCategoryCondition(String tableName) { String category = queryParams.get("category"); return category == null ? "" : getCategoryPrefixCondition(tableName, category); diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/ClassificationResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/ClassificationResource.java index fddc9398833b..dbc444b63d24 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/ClassificationResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/ClassificationResource.java @@ -114,6 +114,7 @@ public ResultList list( schema = @Schema(type = "string", example = FIELDS)) @QueryParam("fields") String fieldsParam, + @Parameter(description = "Filter Disabled Classifications") @QueryParam("disabled") String disabled, @Parameter(description = "Limit the number classifications returned. (1 to 1000000, default = " + "10) ") @DefaultValue("10") @Min(0) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/TagResource.java b/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/TagResource.java index 8de2dd38d21d..41e7f5fb6b2f 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/TagResource.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/resources/tags/TagResource.java @@ -226,6 +226,10 @@ public ResultList list( schema = @Schema(type = "string", example = FIELDS)) @QueryParam("fields") String fieldsParam, + @Parameter(description = "Filter Disabled Classifications", schema = @Schema(type = "string", example = FIELDS)) + @QueryParam("disabled") + @DefaultValue("false") + Boolean disabled, @Parameter(description = "Limit the number tags returned. (1 to 1000000, " + "default = 10)") @DefaultValue("10") @Min(0) @@ -245,7 +249,8 @@ public ResultList list( @DefaultValue("non-deleted") Include include) throws IOException { - ListFilter filter = new ListFilter(include).addQueryParam("parent", parent); + ListFilter filter = + new ListFilter(include).addQueryParam("parent", parent).addQueryParam("classification.disabled", disabled); return super.listInternal(uriInfo, securityContext, fieldsParam, filter, limitParam, before, after); } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticSearch/ElasticSearchClientImpl.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticSearch/ElasticSearchClientImpl.java index 8a36879f129d..c199874f86ba 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticSearch/ElasticSearchClientImpl.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/elasticSearch/ElasticSearchClientImpl.java @@ -642,7 +642,8 @@ private static SearchSourceBuilder buildTagSearchBuilder(String query, int from, QueryBuilders.queryStringQuery(query) .field(FIELD_NAME, 10.0f) .field(EntityBuilderConstant.FIELD_DISPLAY_NAME, 10.0f) - .field(EntityBuilderConstant.FIELD_DISPLAY_NAME_NGRAM, 1.0f) + .field(EntityBuilderConstant.FIELD_NAME_NGRAM, 1.0f) + .field("classification.name", 1.0f) .field(EntityBuilderConstant.DESCRIPTION, 3.0f) .defaultOperator(Operator.AND) .fuzziness(Fuzziness.AUTO); @@ -1153,13 +1154,20 @@ public void updateDashboardService(ChangeEvent event) throws IOException { @Override public void updateClassification(ChangeEvent event) throws IOException { + Classification classification = (Classification) event.getEntity(); + String indexName = ElasticSearchIndexDefinition.ElasticSearchIndexType.TAG_SEARCH_INDEX.indexName; if (event.getEventType() == ENTITY_DELETED) { - Classification classification = (Classification) event.getEntity(); - DeleteByQueryRequest request = - new DeleteByQueryRequest(ElasticSearchIndexDefinition.ElasticSearchIndexType.TAG_SEARCH_INDEX.indexName); + DeleteByQueryRequest request = new DeleteByQueryRequest(indexName); String fqnMatch = classification.getName() + ".*"; request.setQuery(new WildcardQueryBuilder("fullyQualifiedName", fqnMatch)); deleteEntityFromElasticSearchByQuery(request); + } else if (event.getEventType() == ENTITY_UPDATED) { + UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName); + updateByQueryRequest.setQuery(new MatchQueryBuilder("tag.classification.id", classification.getId().toString())); + String scriptTxt = "ctx._source.disabled=true"; + Script script = new Script(ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG, scriptTxt, new HashMap<>()); + updateByQueryRequest.setScript(script); + updateElasticSearchByQuery(updateByQueryRequest); } } diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/search/openSearch/OpenSearchClientImpl.java b/openmetadata-service/src/main/java/org/openmetadata/service/search/openSearch/OpenSearchClientImpl.java index d54b7cdbdd74..00acab1ba66d 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/search/openSearch/OpenSearchClientImpl.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/search/openSearch/OpenSearchClientImpl.java @@ -1147,13 +1147,21 @@ public void updateDashboardService(ChangeEvent event) throws IOException { @Override public void updateClassification(ChangeEvent event) throws IOException { + Classification classification = (Classification) event.getEntity(); + String indexName = ElasticSearchIndexDefinition.ElasticSearchIndexType.TAG_SEARCH_INDEX.indexName; if (event.getEventType() == ENTITY_DELETED) { - Classification classification = (Classification) event.getEntity(); DeleteByQueryRequest request = new DeleteByQueryRequest(ElasticSearchIndexDefinition.ElasticSearchIndexType.TAG_SEARCH_INDEX.indexName); String fqnMatch = classification.getName() + ".*"; request.setQuery(new WildcardQueryBuilder("fullyQualifiedName", fqnMatch)); deleteEntityFromElasticSearchByQuery(request); + } else if (event.getEventType() == ENTITY_UPDATED) { + UpdateByQueryRequest updateByQueryRequest = new UpdateByQueryRequest(indexName); + updateByQueryRequest.setQuery(new MatchQueryBuilder("tag.classification.id", classification.getId().toString())); + String scriptTxt = "ctx._source.disabled=true"; + Script script = new Script(ScriptType.INLINE, Script.DEFAULT_SCRIPT_LANG, scriptTxt, new HashMap<>()); + updateByQueryRequest.setScript(script); + updateElasticSearchByQuery(updateByQueryRequest); } } diff --git a/openmetadata-service/src/main/resources/elasticsearch/en/tag_index_mapping.json b/openmetadata-service/src/main/resources/elasticsearch/en/tag_index_mapping.json index 483ccbb2a663..c532650107f6 100644 --- a/openmetadata-service/src/main/resources/elasticsearch/en/tag_index_mapping.json +++ b/openmetadata-service/src/main/resources/elasticsearch/en/tag_index_mapping.json @@ -98,6 +98,46 @@ "deleted": { "type": "text" }, + "disabled": { + "type": "text" + }, + "classification": { + "properties": { + "id": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 36 + } + } + }, + "type": { + "type": "keyword" + }, + "name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "fullyQualifiedName": { + "type": "text" + }, + "description": { + "type": "text" + }, + "deleted": { + "type": "text" + }, + "href": { + "type": "text" + } + } + }, "suggest": { "type": "completion", "contexts": [ diff --git a/openmetadata-service/src/main/resources/elasticsearch/jp/tag_index_mapping.json b/openmetadata-service/src/main/resources/elasticsearch/jp/tag_index_mapping.json index 818d34d4a584..b1e01f678f36 100644 --- a/openmetadata-service/src/main/resources/elasticsearch/jp/tag_index_mapping.json +++ b/openmetadata-service/src/main/resources/elasticsearch/jp/tag_index_mapping.json @@ -101,6 +101,43 @@ "deleted": { "type": "text" }, + "classification": { + "properties": { + "id": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 36 + } + } + }, + "type": { + "type": "keyword" + }, + "name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "fullyQualifiedName": { + "type": "text" + }, + "description": { + "type": "text" + }, + "deleted": { + "type": "text" + }, + "href": { + "type": "text" + } + } + }, "suggest": { "type": "completion", "contexts": [ diff --git a/openmetadata-service/src/main/resources/elasticsearch/zh/tag_index_mapping.json b/openmetadata-service/src/main/resources/elasticsearch/zh/tag_index_mapping.json index 7560c8bd50ce..266352b115e1 100644 --- a/openmetadata-service/src/main/resources/elasticsearch/zh/tag_index_mapping.json +++ b/openmetadata-service/src/main/resources/elasticsearch/zh/tag_index_mapping.json @@ -93,6 +93,43 @@ "deleted": { "type": "text" }, + "classification": { + "properties": { + "id": { + "type": "keyword", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 36 + } + } + }, + "type": { + "type": "keyword" + }, + "name": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } + }, + "fullyQualifiedName": { + "type": "text" + }, + "description": { + "type": "text" + }, + "deleted": { + "type": "text" + }, + "href": { + "type": "text" + } + } + }, "suggest": { "type": "completion", "contexts": [