June 2017
Beginner to intermediate
404 pages
8h 22m
English
The multi_match query is used to match the same value across multiple fields. When a user searches for biking jacket, searching just the product_name field might not find any matches. To widen the search, we should most probably also search the description field along with the product_name field. The document that contains both biking and jacket is shown here:
{ "product_name": "Men's Water Resistant Jacket", "description": "Provides comfort during biking and hiking", "unit_price": 69.99, "reviews": 5, "release_date": "2017-03-02" }
Scoring based on a single field is pretty straightforward, scoring based on multiple fields gets tricky. We can't use a match query with an operator as the terms ...
Read now
Unlock full access