# Only show results that match exactly with the words of the query and order alphabetic them

**URL:** <https://discuss.elastic.co/t/only-show-results-that-match-exactly-with-the-words-of-the-query-and-order-alphabetic-them/182531>\
**Category:** Elasticsearch\
**Created:** [May 23, 2019, 11:32pm UTC](https://discuss.elastic.co/t/only-show-results-that-match-exactly-with-the-words-of-the-query-and-order-alphabetic-them/182531 "2019-05-23T23:32:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Itzel](https://avatars.discourse-cdn.com/v4/letter/i/91b2a8/32.png) [@Itzel](https://discuss.elastic.co/u/Itzel)\
**Post date:** [May 23, 2019, 11:32pm UTC](https://discuss.elastic.co/t/only-show-results-that-match-exactly-with-the-words-of-the-query-and-order-alphabetic-them/182531/1 "2019-05-23T23:32:23Z")

</div>

Actually I have been using "Multi-index" to search like this:

{"index" : "moviesklic","Type":"vod"}  
{"query" : {"query\_string":{"fields":["MediaName^1","Nombre original"],"query":"el gran p\*"}}, "from" : 0, "size" : 15}  
{"index" : "seriesklic","Type":"season"}  
{"query" : {"query\_string":{"fields":["MediaName^1","Nombre original"],"query":"el gran p\*"}}, "from" : 0, "size" : 15}

In this moment, I'm obtaining this results:  
"El gran leon"  
"El Gran Pequeño"  
"El Gran Truco"  
"El Gran Pez"  
"Tini El Gran Cambio de Violetta"  
"El Gran Showman"  
.  
.  
.

I would like to show results that are ordered and also exact to my query, like this:  
"El Gran Pequeño"  
"El Gran Pez"

Discarding:  
"El gran leon"  
"El Gran Truco"  
"Tini El Gran Cambio de Violetta"  
"El Gran Showman"

Because not match exactly with "El gran p" of my query.

Can you help me?

---

<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:** [June 20, 2019, 11:44pm UTC](https://discuss.elastic.co/t/only-show-results-that-match-exactly-with-the-words-of-the-query-and-order-alphabetic-them/182531/2 "2019-06-20T23:44:35Z")

</div>

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