# ElasticSearch Search Issues

**URL:** <https://discuss.elastic.co/t/elasticsearch-search-issues/150040>\
**Category:** Elasticsearch\
**Created:** [September 26, 2018, 3:12pm UTC](https://discuss.elastic.co/t/elasticsearch-search-issues/150040 "2018-09-26T15:12:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikita\_Duggal](https://avatars.discourse-cdn.com/v4/letter/n/da6949/32.png) [@Nikita\_Duggal](https://discuss.elastic.co/u/Nikita_Duggal)\
**Post date:** [September 26, 2018, 3:12pm UTC](https://discuss.elastic.co/t/elasticsearch-search-issues/150040/1 "2018-09-26T15:12:17Z")

</div>

I am using match phrase query to find in ES. but i have noticed that the results returned are not appropriate. code --

```
  res = es.search(index=('indice_1'),

           body = {
"_source":["content"],

"query": {
    "match_phrase" 
    "content":"xyz abc"
    }}}

```

,  
size=500,  
scroll='60s')

It doesn't get me records where content is - "hi my name isxyz abc." and "hey wassupxyz abc. how is life"

doing a similar search in mongodb using using regex gets both the records as well. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![pranav24](https://avatars.discourse-cdn.com/v4/letter/p/b19c9b/32.png) [@pranav24](https://discuss.elastic.co/u/pranav24)\
**Post date:** [September 27, 2018, 6:56am UTC](https://discuss.elastic.co/t/elasticsearch-search-issues/150040/2 "2018-09-27T06:56:36Z")

</div>

Match phrase does not work on searches with incomplete terms(words). Either search on "wassupxyz" or only abc. If you want results based on your query only i.e., "xyz abc" use ngram analyzers while indexing. You can also use query string with wildcard.

---

<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:** [October 25, 2018, 6:56am UTC](https://discuss.elastic.co/t/elasticsearch-search-issues/150040/3 "2018-10-25T06:56:38Z")

</div>

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