mirror of
https://github.com/sist2app/sist2.git
synced 2026-01-23 19:01:14 +00:00
Read ES version, handle legacy versions, add notice & debug info
This commit is contained in:
@@ -73,6 +73,8 @@ class Sist2Query {
|
||||
const selectedMimeTypes = getters.selectedMimeTypes;
|
||||
const selectedTags = getters.selectedTags;
|
||||
|
||||
const legacyES = store.state.sist2Info.esVersionLegacy;
|
||||
|
||||
const filters = [
|
||||
{terms: {index: selectedIndexIds}}
|
||||
] as any[];
|
||||
@@ -187,9 +189,13 @@ class Sist2Query {
|
||||
"name.nGram": {},
|
||||
"content.nGram": {},
|
||||
font_name: {},
|
||||
},
|
||||
max_analyzed_offset: 9_999_999
|
||||
}
|
||||
};
|
||||
|
||||
if (!legacyES) {
|
||||
q.highlight.max_analyzed_offset = 9_999_999;
|
||||
}
|
||||
|
||||
if (getters.optSearchInPath) {
|
||||
q.highlight.fields["path.text"] = {};
|
||||
q.highlight.fields["path.nGram"] = {};
|
||||
|
||||
Reference in New Issue
Block a user