December 2017
Intermediate to advanced
434 pages
10h 29m
English
In an e-commerce type of web application, often the user intends to search for some item, and he/she might search for some keywords. What if we want the title field to be more important than the description? If one or more of the search terms appears in the title, it is definitely a more relevant product than the ones that have those values only in the description. It is possible to boost the score of the document if a match is found in a particular field.
Let us make the title field three times more important than the description field. This can be done by using the following syntax:
GET /amazon_products/products/_search{ "query": { "multi_match": { "query": "monitor aquarium", "fields": ["title^3", "description"] ...Read now
Unlock full access