|
|
@@ -943,7 +943,6 @@ class ElasticsearchDelegator implements SearchDelegator<Data, ESTermsKey, ESQuer
|
|
|
|
|
|
appendHighlight(query) {
|
|
|
query.body.highlight = {
|
|
|
- max_analyzed_offset: 1000000 - 1, // Set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.
|
|
|
fields: {
|
|
|
'*': {
|
|
|
fragment_size: 40,
|
|
|
@@ -953,6 +952,10 @@ class ElasticsearchDelegator implements SearchDelegator<Data, ESTermsKey, ESQuer
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
+
|
|
|
+ if (!this.isElasticsearchV6) {
|
|
|
+ query.body.highlight.max_analyzed_offset = 1000000 - 1; // Set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
async search(data: SearchableData<ESQueryTerms>, user, userGroups, option): Promise<ISearchResult<unknown>> {
|