# Full text search independently of the order of words

**URL:** <https://discuss.elastic.co/t/full-text-search-independently-of-the-order-of-words/85058>\
**Category:** Elasticsearch\
**Created:** [May 9, 2017, 10:21am UTC](https://discuss.elastic.co/t/full-text-search-independently-of-the-order-of-words/85058 "2017-05-09T10:21:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![angelcab](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angelcab/32/45618_2.png) [@angelcab](https://discuss.elastic.co/u/angelcab)\
**Post date:** [May 9, 2017, 10:21am UTC](https://discuss.elastic.co/t/full-text-search-independently-of-the-order-of-words/85058/1 "2017-05-09T10:21:16Z")

</div>

Hi,

Is there any posibility to perform a full-text search independently of the order you type the words?

I want to perform full text search in a field that contains names, and I want to show in the results the right match, but right now if I write :  
John Adams Smith

I obtained normally :  
John Adams Smith  
John Adams John  
John Adams Robert  
..  
Adams John

I want to know if there is any posibility to obtain better score for the correct match but with no dependece with the order you type the query. In this example: Adams John.  
The query could be two, three, four ... terms. There is no restriction. And we have in the index names with 1,2,3,4... n terms.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![lwintergerst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lwintergerst/32/18164_2.png) [@lwintergerst](https://discuss.elastic.co/u/lwintergerst)\
**Post date:** [May 9, 2017, 2:41pm UTC](https://discuss.elastic.co/t/full-text-search-independently-of-the-order-of-words/85058/2 "2017-05-09T14:41:47Z")

</div>

Hello,  
The match query supports a minimum\_should\_match parameter where you can define how many terms have to match in order to consider a document a match.  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html)

Let me know if that helps or if you have any more questions.

---

<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 6, 2017, 2:47pm UTC](https://discuss.elastic.co/t/full-text-search-independently-of-the-order-of-words/85058/3 "2017-06-06T14:47:00Z")

</div>

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