# Howto: food for dogs ==\> dogfood

**URL:** <https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440>\
**Category:** Elasticsearch\
**Created:** [April 28, 2015, 2:33pm UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440 "2015-04-28T14:33:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [April 28, 2015, 2:33pm UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440/1 "2015-04-28T14:33:48Z")

</div>

Hi,

We have users typing stuff like "food for dogs" and we've indexed the data  
with "dogfood". What is the best strategy to get a match with  
elasticsearch's filters and or analyzers?

Thanks,  
Maarten

--  
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/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%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:** [April 28, 2015, 2:35pm UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440/2 "2015-04-28T14:35:43Z")

</div>

Synonyms

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Tue, Apr 28, 2015 at 5:33 PM, Maarten Roosendaal \<[mroosendaal14@gmail.com](mailto:mroosendaal14@gmail.com)

> wrote:

> Hi,
> 
> We have users typing stuff like "food for dogs" and we've indexed the data  
> with "dogfood". What is the best strategy to get a match with  
> elasticsearch's filters and or analyzers?
> 
> Thanks,  
> Maarten
> 
> --  
> 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/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%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/CAHTr4ZuZqC78O%2Bz\_QwBTEfWK-MDWDPH19W\_TiL\_SOTApBsny6A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZuZqC78O%2Bz_QwBTEfWK-MDWDPH19W_TiL_SOTApBsny6A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Charlie\_Hull](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Charlie\_Hull](https://discuss.elastic.co/u/Charlie_Hull)\
**Post date:** [April 28, 2015, 2:38pm UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440/3 "2015-04-28T14:38:37Z")

</div>

On 28/04/2015 15:33, Maarten Roosendaal wrote:

> Hi,
> 
> We have users typing stuff like "food for dogs" and we've indexed the  
> data with "dogfood". What is the best strategy to get a match with  
> elasticsearch's filters and or analyzers?

Very much depends on the relation between the terms entered and the  
terms in your index. If they're simply synonyms, ES has facilities for  
this  
([Using Synonyms | Elasticsearch: The Definitive Guide [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/master/using-synonyms.html)),  
if not you need to look at how to add the missing terms to your index  
(term expansion at index time, for example you could use WordNet or a  
similar public resource to add related terms) or at query time.

Can you give a few more examples?

Charlie

> Thanks,  
> Maarten
> 
> --  
> 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)  
> [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Charlie Hull  
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334  
mobile: +44 (0)7767 825828  
web: [www.flax.co.uk](http://www.flax.co.uk)

--  
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/553F9B6D.4080906%40flax.co.uk](https://groups.google.com/d/msgid/elasticsearch/553F9B6D.4080906%40flax.co.uk).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Maarten\_Roosendaal](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@Maarten\_Roosendaal](https://discuss.elastic.co/u/Maarten_Roosendaal)\
**Post date:** [April 28, 2015, 5:15pm UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440/4 "2015-04-28T17:15:22Z")

</div>

Hi,

Thanks for the quick response.

Synonyms are not a scalable way of doing things since our index is  
constantly changing and new products with new content is added or remove.  
Besides you'll never cover everything users type. It's a good alternative  
but i'm exploring alternatives with the mindset that you probably can't  
cover everything.

Some other examples  
"food for horses"  
"food for cats"  
"cable for printer"  
but also  
"tears for fears" (we have loads of different producttypes from books and  
cd, to tv's to petfood)

this means we just can't use stopwords out of the box. In terms of what's  
in the index, "food" and "cats" and "horse" are present. I use the stemming  
to also get "cat" and "horses" although i have to really get into testing  
that.

Op dinsdag 28 april 2015 16:38:53 UTC+2 schreef Charlie Hull:

> On 28/04/2015 15:33, Maarten Roosendaal wrote:
> 
> > Hi,
> > 
> > We have users typing stuff like "food for dogs" and we've indexed the  
> > data with "dogfood". What is the best strategy to get a match with  
> > elasticsearch's filters and or analyzers?
> 
> Very much depends on the relation between the terms entered and the  
> terms in your index. If they're simply synonyms, ES has facilities for  
> this  
> (  
> [Using Synonyms | Elasticsearch: The Definitive Guide [master] | Elastic](http://www.elastic.co/guide/en/elasticsearch/guide/master/using-synonyms.html)),
> 
> if not you need to look at how to add the missing terms to your index  
> (term expansion at index time, for example you could use WordNet or a  
> similar public resource to add related terms) or at query time.
> 
> Can you give a few more examples?
> 
> Charlie
> 
> > Thanks,  
> > Maarten
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>  
> > \<[mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) \<javascript:\>\>.  
> > To view this discussion on the web visit
> 
> [https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com)
> 
> > \<  
> > [https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium=email&utm_source=footer)\>.
> 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Charlie Hull  
> Flax - Open Source Enterprise Search
> 
> tel/fax: +44 (0)8700 118334  
> mobile: +44 (0)7767 825828  
> web: [www.flax.co.uk](http://www.flax.co.uk)

--  
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/202f13ce-b9a8-466f-aa40-bb302d70b91d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/202f13ce-b9a8-466f-aa40-bb302d70b91d%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:17am UTC](https://discuss.elastic.co/t/howto-food-for-dogs-dogfood/23440/5 "2017-07-06T00:17:20Z")

</div>


