# Need advise on indexing/search strategy

**URL:** <https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316>\
**Category:** Elasticsearch\
**Created:** [August 24, 2013, 11:08am UTC](https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316 "2013-08-24T11:08:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maciej\_Dziardziel](https://avatars.discourse-cdn.com/v4/letter/m/d9b06d/32.png) [@Maciej\_Dziardziel](https://discuss.elastic.co/u/Maciej_Dziardziel)\
**Post date:** [August 24, 2013, 11:08am UTC](https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316/1 "2013-08-24T11:08:56Z")

</div>

Hi

I have list of products, where each product will have category, color,  
designer and description.

The problem i am trying to solve is search relevancy.

I started by indexing everything as-is, but results where not satisfying -  
since some products had words used for category name put into description  
or designer names, results were score unfairly and relevancy was low.

Next thing i tried was to create stopwords. So basically any word used as  
category name was put into other field stopfilter,  
and the same for colors. This greatly improved relevancy. A product with  
color/category name in description or designer will not bias search result.  
Search result for most of test cases are very good, however one problem  
remained: ambiguity.

let's say we products in category carpets, some will have color red and  
there is designer named "red johh". When searching  
for red carpets, i'd like to score carpets in color red higher then  
anything else. However "red john carpets" should find  
carpets designed by "red john", and not just anything that's red, john or  
carpet. Stopwords filter solution removes red from designer field,  
so it can't be found this way. What is the best way to solve this problem?

Thanks for any help.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 25, 2013, 11:23am UTC](https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316/2 "2013-08-25T11:23:25Z")

</div>

If you index products and categories, why don't you just search in  
different fields?

For boosting query terms, you could use "boost"  
[http://www.elasticsearch.org/guide/reference/query-dsl/term-query/](http://www.elasticsearch.org/guide/reference/query-dsl/term-query/) to push  
documents with category carpet to the top if somebody entered "red".

To disambiguate "red john" from "red" you need entity recognition before  
sending the query to ES.

Jörg

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![BillyEm](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@BillyEm](https://discuss.elastic.co/u/BillyEm)\
**Post date:** [August 26, 2013, 2:09am UTC](https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316/3 "2013-08-26T02:09:17Z")

</div>

Jorg is right. First you ring a bell, then you blow a whistle and then you  
look for some other tool to ask to become a bell or whistle. In the  
meantime, you know nothing about your data or relevancy models. Good luck,

On Saturday, August 24, 2013 7:08:56 AM UTC-4, Maciej Dziardziel wrote:

> Hi
> 
> I have list of products, where each product will have category, color,  
> designer and description.
> 
> The problem i am trying to solve is search relevancy.
> 
> I started by indexing everything as-is, but results where not satisfying -  
> since some products had words used for category name put into description  
> or designer names, results were score unfairly and relevancy was low.
> 
> Next thing i tried was to create stopwords. So basically any word used as  
> category name was put into other field stopfilter,  
> and the same for colors. This greatly improved relevancy. A product with  
> color/category name in description or designer will not bias search result.  
> Search result for most of test cases are very good, however one problem  
> remained: ambiguity.
> 
> let's say we products in category carpets, some will have color red and  
> there is designer named "red johh". When searching  
> for red carpets, i'd like to score carpets in color red higher then  
> anything else. However "red john carpets" should find  
> carpets designed by "red john", and not just anything that's red, john or  
> carpet. Stopwords filter solution removes red from designer field,  
> so it can't be found this way. What is the best way to solve this problem?
> 
> Thanks for any help.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:19am UTC](https://discuss.elastic.co/t/need-advise-on-indexing-search-strategy/13316/4 "2017-07-06T02:19:50Z")

</div>


