Merge branch 'search-accross-multiple-fields' into 'master'

Search accross multiple fields

Closes #43

See merge request framasoft/peertube/search-index!13
This commit is contained in:
Chocobozzz 2022-12-05 12:48:33 +00:00
commit f6d35f0481
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
}
},
{
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: {
query: search,