Exact match not apearing on top


I need to get results first exact match and then other match. I've tried it with boost and should but still it's not working for me. Please give your help/suggestion for the same.


Use a match query in the should clause instead of a term query as I suppose that the term query is not matching any document.

Thanks for the reply,
I've also tried it with match. but still it's not working. I've tried below. Please give your help/suggestion for the same.


Then please create a fully reproducible, but minimal example including index creation, index mapping, sample documents and your full query.

See https://www.elastic.co/help

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.