# Match\_Phrase\_ Prefix

**URL:** <https://discuss.elastic.co/t/match-phrase-prefix/158114>\
**Category:** Elasticsearch\
**Created:** [November 26, 2018, 5:34am UTC](https://discuss.elastic.co/t/match-phrase-prefix/158114 "2018-11-26T05:34:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saranjeet](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@saranjeet](https://discuss.elastic.co/u/saranjeet)\
**Post date:** [November 26, 2018, 5:34am UTC](https://discuss.elastic.co/t/match-phrase-prefix/158114/1 "2018-11-26T05:34:27Z")

</div>

Hi I wanted to use match\_phrase\_prefix in query for getting result,but it is giving me empty result  
while that particular match is available in the array of msid 7268 which is having value "0aadu" please can any body help me to fix this issue thanks in advance ,please check my below query and tell me where i am wrong

{"from":0,"size":250,"query":{"bool":{"must":[{"bool":{"must":[{"match\_phrase\_prefix":{"-5.search":{"query":"0a","slop":0,"max\_expansions":50,"boost":1.0}}}],"adjust\_pure\_negative":true,"boost":1.0}},{"bool":{"must":[{"terms":{"msid":["7268","7277","7286","7303","7323","7329","7340","7370","7388","7395","7398","7401","7403","7413","7418"],"boost":1.0}}],"adjust\_pure\_negative":true,"boost":1.0}}],"adjust\_pure\_negative":true,"boost":1.0}},"\_source":{"includes":["-4","-3","-5","-6","-7","2433","1989","61d","420","442","443","1997","2455","2456","1986","3","1987","msid"],"excludes":},"sort":[{"-5":{"order":"asc","unmapped\_type":"long"}}]}

---

<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:** [December 24, 2018, 5:34am UTC](https://discuss.elastic.co/t/match-phrase-prefix/158114/2 "2018-12-24T05:34:32Z")

</div>

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