Name search in ElasticSearch

I have created an index with the names that I have in my database. I want that field on my index to be text so I can perform full-text search over it.

I am performing some querys and I'm having an issue that I don't know how to solve. I write down an example.

I have in my index this names:

"John Rham Rham" and "John Rham Rham Luke"

When I perform my query with the text : "John Rham Rham" I, obviously, obtain both results. But in this order:

John Rham Rham Luke
John Rham Rham

How can I perform the query to obtain first the exact name that I am looking for?
Thanks in advance.

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