*Note*: This is slightly different from HSEARCH-917 and HSEARCH-2589, though related. This ticket is about the behavior when a single predicate target multiple fields, while the others are about the behavior when a single predicate has multiple search terms.
We should offer additional parameters to match predicates allowing to select exactly how we want the predicate to behave when multiple fields are targeted:
* how documents are matched: at least one match is required per field, or at least one on any field, ... * how score is computed.
We will probably have to move the handling of multiple fields to the backend layer, i.e. not create a boolean junction in the engine and ask the backend to create one predicate for each field, but instead just ask the backend to create a single predicate for *all* the fields.
See for example the “multi-match” query in Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html
And in particular the "type" parameter: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html#multi-match-types |
|