Hi,
Say I have a database of car models containing brand and model
Brand | Model |
---|---|
Foo | Bar |
Foo | Baz |
So if I search for a Foo Bar
I want only the first document to match. If I search for just Foo
both documents above must be returned. Each field must be fuzzy and boosted.
- The
multi_match
best_fields
query will not work because withAND
operator it will all terms must be present int a single field. WithOR
operator it will return document even if only single field matches when two are requested. - Copying fields into an "all" field will not work because individual fields cannot be boosted
- The
multi_match
cross_fields
query will not work because neither fuzziness, nor boosting are supported. combined_fields
does not support fuzziness
So what are my options?
Thanks in advance.