# Improving Relevancy for Exact matches

**URL:** <https://discuss.elastic.co/t/improving-relevancy-for-exact-matches/15190>\
**Category:** Elasticsearch\
**Created:** [January 10, 2014, 2:55am UTC](https://discuss.elastic.co/t/improving-relevancy-for-exact-matches/15190 "2014-01-10T02:55:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemant\_pahilwani](https://avatars.discourse-cdn.com/v4/letter/h/f08c70/32.png) [@hemant\_pahilwani](https://discuss.elastic.co/u/hemant_pahilwani)\
**Post date:** [January 10, 2014, 2:55am UTC](https://discuss.elastic.co/t/improving-relevancy-for-exact-matches/15190/1 "2014-01-10T02:55:41Z")

</div>

Example below might explain what is the issue i am facing:

I am trying to search Jimmy John on first name and last name fields and i  
want result to look like:

_fname lname_  
Jimmy John  
John Jimmy  
John Mayer  
John Yule  
.  
.

but i am getting following result  
_fname lname_  
John Jimmy  
John Mayer  
John Yule  
Jimmy John  
.  
.

I am trying to get Jimmy John to be displayed at top but not sure why John  
Jimmy is getting displayed first. Is there a way to fine tune elastic  
search to return Jimmy John first i.e. sequence of input query phase should  
match sequence of fields passed?

Both fname and lname use _standard_ analyzer. Below is the multi match  
query that i am using:

{  
"from" : 0,  
"size" : 300,  
"query" : {  
"multi\_match" : {  
"query" : "Jimmy John",  
"fields" : ["fname", "lname"],  
"use\_dis\_max" : false  
}  
},  
"min\_score" : 0.15,  
"explain" : true  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/66207eae-d15c-45e4-94cd-e8bd3a8a55f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/66207eae-d15c-45e4-94cd-e8bd3a8a55f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:57am UTC](https://discuss.elastic.co/t/improving-relevancy-for-exact-matches/15190/2 "2017-07-06T01:57:31Z")

</div>


