Custom Property Backend Support and list approved glossary terms (#13496)

This commit is contained in:
07Himank 2023-10-10 21:20:28 +05:30 committed by GitHub
parent 02a3bc334f
commit 352b025fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 38 additions and 28 deletions

View File

@ -354,6 +354,10 @@ public class ElasticSearchClient implements SearchClient {
searchSourceBuilder.sort(request.getSortFieldParam(), SortOrder.fromString(request.getSortOrder())); searchSourceBuilder.sort(request.getSortFieldParam(), SortOrder.fromString(request.getSortOrder()));
} }
if (request.getIndex().equalsIgnoreCase("glossary_term_search_index")) {
searchSourceBuilder.query(QueryBuilders.boolQuery().must(QueryBuilders.matchQuery("status", "Approved")));
}
/* for performance reasons ElasticSearch doesn't provide accurate hits /* for performance reasons ElasticSearch doesn't provide accurate hits
if we enable trackTotalHits parameter it will try to match every result, count and return hits if we enable trackTotalHits parameter it will try to match every result, count and return hits
however in most cases for search results an approximate value is good enough. however in most cases for search results an approximate value is good enough.
@ -1498,7 +1502,6 @@ public class ElasticSearchClient implements SearchClient {
requestConfigBuilder requestConfigBuilder
.setConnectTimeout(esConfig.getConnectionTimeoutSecs() * 1000) .setConnectTimeout(esConfig.getConnectionTimeoutSecs() * 1000)
.setSocketTimeout(esConfig.getSocketTimeoutSecs() * 1000)); .setSocketTimeout(esConfig.getSocketTimeoutSecs() * 1000));
// return new RestHighLevelClient(restClientBuilder);
return new RestHighLevelClientBuilder(restClient).setApiCompatibilityMode(true).build(); return new RestHighLevelClientBuilder(restClient).setApiCompatibilityMode(true).build();
} catch (Exception e) { } catch (Exception e) {
LOG.error("Failed to create elastic search client ", e); LOG.error("Failed to create elastic search client ", e);

View File

@ -346,6 +346,10 @@ public class OpenSearchClient implements SearchClient {
searchSourceBuilder.sort(request.getSortFieldParam(), SortOrder.fromString(request.getSortOrder())); searchSourceBuilder.sort(request.getSortFieldParam(), SortOrder.fromString(request.getSortOrder()));
} }
if (request.getIndex().equalsIgnoreCase("glossary_term_search_index")) {
searchSourceBuilder.query(QueryBuilders.boolQuery().must(QueryBuilders.matchQuery("status", "Approved")));
}
/* for performance reasons OpenSearch doesn't provide accurate hits /* for performance reasons OpenSearch doesn't provide accurate hits
if we enable trackTotalHits parameter it will try to match every result, count and return hits if we enable trackTotalHits parameter it will try to match every result, count and return hits
however in most cases for search results an approximate value is good enough. however in most cases for search results an approximate value is good enough.

View File

@ -220,7 +220,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"children": { "children": {
"properties": { "properties": {

View File

@ -228,7 +228,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -166,7 +166,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -144,7 +144,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -134,7 +134,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"mlFeatures": { "mlFeatures": {
"properties": { "properties": {

View File

@ -161,7 +161,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -362,7 +362,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -434,7 +434,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"sourceUrl": { "sourceUrl": {
"type": "keyword" "type": "keyword"

View File

@ -346,7 +346,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -130,7 +130,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -165,7 +165,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataModel": { "dataModel": {
"properties": { "properties": {

View File

@ -131,7 +131,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -141,7 +141,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"state": { "state": {
"type": "keyword" "type": "keyword"

View File

@ -153,7 +153,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -136,7 +136,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"mlFeatures": { "mlFeatures": {
"properties": { "properties": {

View File

@ -361,7 +361,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"lifeCycle": { "lifeCycle": {
"type": "object" "type": "object"

View File

@ -436,7 +436,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"sourceUrl": { "sourceUrl": {
"type": "keyword" "type": "keyword"

View File

@ -355,7 +355,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -286,6 +286,9 @@
} }
} }
}, },
"extension": {
"type": "object"
},
"dataProducts": { "dataProducts": {
"properties": { "properties": {
"id": { "id": {

View File

@ -218,7 +218,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"children": { "children": {
"properties": { "properties": {

View File

@ -157,7 +157,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -146,7 +146,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -129,7 +129,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"owner": { "owner": {
"properties": { "properties": {

View File

@ -105,7 +105,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"mlFeatures": { "mlFeatures": {
"properties": { "properties": {

View File

@ -348,7 +348,7 @@
"type": "object" "type": "object"
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -423,7 +423,7 @@
"type": "object" "type": "object"
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"sourceUrl": { "sourceUrl": {
"type": "keyword" "type": "keyword"

View File

@ -333,7 +333,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {

View File

@ -107,7 +107,7 @@
} }
}, },
"extension": { "extension": {
"type": "keyword" "type": "object"
}, },
"dataProducts": { "dataProducts": {
"properties": { "properties": {