# Multi word query - Highlight should show all matched words instead of single word

**URL:** <https://discuss.elastic.co/t/multi-word-query-highlight-should-show-all-matched-words-instead-of-single-word/23505>\
**Category:** Elasticsearch\
**Created:** [April 30, 2015, 8:53pm UTC](https://discuss.elastic.co/t/multi-word-query-highlight-should-show-all-matched-words-instead-of-single-word/23505 "2015-04-30T20:53:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ap1](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Ap1](https://discuss.elastic.co/u/Ap1)\
**Post date:** [April 30, 2015, 8:53pm UTC](https://discuss.elastic.co/t/multi-word-query-highlight-should-show-all-matched-words-instead-of-single-word/23505/1 "2015-04-30T20:53:41Z")

</div>

I am using a multi word search query used for to find a match for text that  
user is typing. (Im not using Suggesters)

eg. If a doc has a field with the text "... ... ... .. The Moon is a  
part... .. ....moon is abc ... .. universe is xyz... ...... ..... galaxy  
in the universe ....."  
The user types "_moo_ _univers_", the response I need to send in  
suggestions should be _"moon universe" and not -"moon", " universe" which  
is what happens right now coz I am creating map of tokens._

Currently I am using Highlighting and it returns me the below the matching  
snippet :

1. The _Moon_ is a part
2. _moon_ is abc
3. _universe_ is xyz
4. galaxy in the _universe_

Thanks

--  
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/ffc2f74c-e1d2-457f-a530-5886c27e5abc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ffc2f74c-e1d2-457f-a530-5886c27e5abc%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:16am UTC](https://discuss.elastic.co/t/multi-word-query-highlight-should-show-all-matched-words-instead-of-single-word/23505/2 "2017-07-06T00:16:33Z")

</div>


