Match all fields and boost score if found in certain feilds


(Murali Sarala) #1

I want to search a text in all fields but boost the score if found in certain fields. For example I have an music article and user is searching for "xyz" if found in artist name should double the score if found in title should also double but if found in information column should be multiplied by 1.5, is it possible? if yes can I get an example?


(Adrien Grand) #2

The function_score query should work: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html


(system) #3