Allow searching accross multiple fields (fixes #43)

This commit is contained in:
Florent 2022-11-16 16:29:51 +01:00 committed by Florent F
parent 910b415561
commit 7afa273f71
1 changed files with 9 additions and 0 deletions

View File

@ -48,6 +48,15 @@ function buildMultiMatchBool (search: string, fieldsObject: { default: string[],
minimum_should_match: ELASTIC_SEARCH_QUERY.MINIMUM_SHOULD_MATCH minimum_should_match: ELASTIC_SEARCH_QUERY.MINIMUM_SHOULD_MATCH
} }
}, },
{
multi_match: {
query: search,
fields: fieldsObject.default,
operator: ELASTIC_SEARCH_QUERY.OPERATOR,
minimum_should_match: ELASTIC_SEARCH_QUERY.MINIMUM_SHOULD_MATCH,
type: "cross_fields"
}
},
{ {
multi_match: { multi_match: {
query: search, query: search,