# Search by word order

**URL:** <https://discuss.elastic.co/t/search-by-word-order/294188>\
**Category:** Elasticsearch\
**Created:** [January 12, 2022, 4:40pm UTC](https://discuss.elastic.co/t/search-by-word-order/294188 "2022-01-12T16:40:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amir\_Faramarzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amir_faramarzi/32/92919_2.png) [@Amir\_Faramarzi](https://discuss.elastic.co/u/Amir_Faramarzi)\
**Post date:** [January 12, 2022, 4:40pm UTC](https://discuss.elastic.co/t/search-by-word-order/294188/1 "2022-01-12T16:40:01Z")

</div>

Hello

I have a product search system. Now I want the system to be such that if the user searches for the word "washing machine", priority will be given to products whose name starts with "washing machine" and displays them above other products.

But whatever I do, it seems that Elasticsearch does not matter to him, that the product name must start with "washing machine", and for Elasticsearch, it only matters that the two words "machine" and "washing" are connected. Now he wants to be in the middle of the product name. Or the end of the product name

I used wildcard, prefix, match\_phrase\_prefix but it didn't work

I used search\_as\_you\_type but could not find it

Anyone have a solution?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [January 14, 2022, 3:11pm UTC](https://discuss.elastic.co/t/search-by-word-order/294188/2 "2022-01-14T15:11:38Z")

</div>

Hi Amir,  
When there are preferred variations of match types they can be arranged inside a `bool` query's  
`should` array with appropriate `boost` settings on them.

---

<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:** [February 11, 2022, 3:12pm UTC](https://discuss.elastic.co/t/search-by-word-order/294188/3 "2022-02-11T15:12:22Z")

</div>

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