# Identify word as dominant word in search

**URL:** <https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877>\
**Category:** Elasticsearch\
**Created:** [June 3, 2014, 9:22am UTC](https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877 "2014-06-03T09:22:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rotem123](https://avatars.discourse-cdn.com/v4/letter/r/e9bcb4/32.png) [@rotem123](https://discuss.elastic.co/u/rotem123)\
**Post date:** [June 3, 2014, 9:22am UTC](https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877/1 "2014-06-03T09:22:32Z")

</div>

hi,  
Is there a search in elasticsearch that support the behavior that when a  
user enter a string to search, the ES recognize words as important words in  
search.  
for example: the user enter the string NEXUS COVER FOR EVERY DAY USE SILK  
SOFT BLUE, and I want that the brand(NEXUS) and color(BLUE) will be more  
dominant in search, and I have a list of all the colors and all the brand  
that exist.

is it possible? and if yes, how do I implement that?

thank you!

--  
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/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [June 3, 2014, 10:00am UTC](https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877/2 "2014-06-03T10:00:29Z")

</div>

Depending on your corpus, this should happen automatically. That's what  
TF/IDF is about.

What you can do further is use NLP methods to tag those items in search and  
indexing. Look up POS tagging and entity extraction.

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
Author of RavenDB in Action [http://manning.com/synhershko/](http://manning.com/synhershko/)

On Tue, Jun 3, 2014 at 12:22 PM, Rotem Haber [haber.rotem@gmail.com](mailto:haber.rotem@gmail.com) wrote:

> hi,  
> Is there a search in elasticsearch that support the behavior that when a  
> user enter a string to search, the ES recognize words as important words in  
> search.  
> for example: the user enter the string NEXUS COVER FOR EVERY DAY USE SILK  
> SOFT BLUE, and I want that the brand(NEXUS) and color(BLUE) will be more  
> dominant in search, and I have a list of all the colors and all the brand  
> that exist.
> 
> is it possible? and if yes, how do I implement that?
> 
> thank you!
> 
> --  
> 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/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAHTr4ZsWggX9KP\_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZsWggX9KP_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 4, 2014, 9:31pm UTC](https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877/3 "2014-06-04T21:31:28Z")

</div>

I agree with Itamar. It sounds like you do have a list of colors and brands  
(tagging), so you can add a boost value as a payload to the relevant terms.  
You can use these payloads with a function score script or a custom  
similarity. Not an easy solution. If you can maintain a mapping of values  
in Elasticsearch (via a plugin), you can bypass the payload and lookup the  
terms yourself. Once again, not easy.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--  
Ivan

On Tue, Jun 3, 2014 at 3:00 AM, Itamar Syn-Hershko [itamar@code972.com](mailto:itamar@code972.com)  
wrote:

> Depending on your corpus, this should happen automatically. That's what  
> TF/IDF is about.
> 
> What you can do further is use NLP methods to tag those items in search  
> and indexing. Look up POS tagging and entity extraction.
> 
> --
> 
> Itamar Syn-Hershko  
> [http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
> Freelance Developer & Consultant  
> Author of RavenDB in Action [http://manning.com/synhershko/](http://manning.com/synhershko/)
> 
> On Tue, Jun 3, 2014 at 12:22 PM, Rotem Haber [haber.rotem@gmail.com](mailto:haber.rotem@gmail.com)  
> wrote:
> 
> > hi,  
> > Is there a search in elasticsearch that support the behavior that when a  
> > user enter a string to search, the ES recognize words as important words in  
> > search.  
> > for example: the user enter the string NEXUS COVER FOR EVERY DAY USE SILK  
> > SOFT BLUE, and I want that the brand(NEXUS) and color(BLUE) will be more  
> > dominant in search, and I have a list of all the colors and all the brand  
> > that exist.
> > 
> > is it possible? and if yes, how do I implement that?
> > 
> > thank you!
> > 
> > --  
> > 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/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2948b28d-6c1e-490d-bdbb-80df5d7b0ebd%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/CAHTr4ZsWggX9KP\_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZsWggX9KP_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZsWggX9KP\_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZsWggX9KP_fd75Qbfgk4uph9VNMbXUyaQQ3obMresdVyA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CALY%3DcQAhjj%2BetB%2BNVNHtY6bvvA1de29jbOO2csmnEU%2B67Jxh-w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAhjj%2BetB%2BNVNHtY6bvvA1de29jbOO2csmnEU%2B67Jxh-w%40mail.gmail.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, 1:24am UTC](https://discuss.elastic.co/t/identify-word-as-dominant-word-in-search/17877/4 "2017-07-06T01:24:39Z")

</div>


