# Match\_phrase\_prefix finds not related elements

**URL:** <https://discuss.elastic.co/t/match-phrase-prefix-finds-not-related-elements/21298>\
**Category:** Elasticsearch\
**Created:** [December 17, 2014, 2:10pm UTC](https://discuss.elastic.co/t/match-phrase-prefix-finds-not-related-elements/21298 "2014-12-17T14:10:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Saura](https://avatars.discourse-cdn.com/v4/letter/c/58956e/32.png) [@Carlos\_Saura](https://discuss.elastic.co/u/Carlos_Saura)\
**Post date:** [December 17, 2014, 2:10pm UTC](https://discuss.elastic.co/t/match-phrase-prefix-finds-not-related-elements/21298/1 "2014-12-17T14:10:11Z")

</div>

I have implemented a full search and the matcher that fits better my  
approach is match\_phrase\_prefix.

elements:  
title: 'search test'  
title: 'search test 1'  
title: 'search test 12'  
title: 'search test 2'  
title: 'search test b'  
title: 'new search test'

The weird case is when I search with the term 'search test 1' and the  
results are:  
title: 'search test'  
title: 'search test 1'  
title: 'search test 12'  
title: 'search test 2'  
title: 'new search test'

it only should match the title: 'search test 1' and title: 'search test  
12', but I don't know why is matching the other elements.

If I try with the with other terms like 'search test 2' or title: 'search  
test1' returns what is expected. I'm using the standard analyzer but I have  
also tried with the whitespace analyzer.

Any hint here?  
Thanks a lot,  
Carlos

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/cc8ba5b5-c844-4640-b078-db3b8576dc2d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/cc8ba5b5-c844-4640-b078-db3b8576dc2d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:43am UTC](https://discuss.elastic.co/t/match-phrase-prefix-finds-not-related-elements/21298/2 "2017-07-06T00:43:11Z")

</div>


