howto: food for dogs ==> dogfood

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

howto: food for dogs ==> dogfood

Maarten Roosendaal
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: howto: food for dogs ==> dogfood

Itamar Syn-Hershko
Synonyms

--

Itamar Syn-Hershko
http://code972.com | @synhershko
Freelance Developer & Consultant
Lucene.NET committer and PMC member

On Tue, Apr 28, 2015 at 5:33 PM, Maarten Roosendaal <[hidden email]> 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com.
For more options, visit 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 [hidden email].
To view this discussion on the web visit 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.
Reply | Threaded
Open this post in threaded view
|

Re: howto: food for dogs ==> dogfood

Charlie Hull
In reply to this post by Maarten Roosendaal
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
(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 [hidden email]
> <mailto:[hidden email]>.
> 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?utm_medium=email&utm_source=footer>.
> For more options, visit 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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/553F9B6D.4080906%40flax.co.uk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: howto: food for dogs ==> dogfood

Maarten Roosendaal
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
(<a href="http://www.elastic.co/guide/en/elasticsearch/guide/master/using-synonyms.html" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elastic.co%2Fguide%2Fen%2Felasticsearch%2Fguide%2Fmaster%2Fusing-synonyms.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGwHKag9t_lZimtk6K-_di7W1gkoA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elastic.co%2Fguide%2Fen%2Felasticsearch%2Fguide%2Fmaster%2Fusing-synonyms.html\46sa\75D\46sntz\0751\46usg\75AFQjCNGwHKag9t_lZimtk6K-_di7W1gkoA';return true;">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="JVPt6hAhwOIJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com
> <mailto:<a href="javascript:" target="_blank" gdf-obfuscated-mailto="JVPt6hAhwOIJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearch+unsubscribe@...>.
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com';return true;">https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com
> <<a href="https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/c35ceba0-f5af-47f2-821f-384e4b3272bf%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">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: <a href="http://www.flax.co.uk" target="_blank" rel="nofollow" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.flax.co.uk\46sa\75D\46sntz\0751\46usg\75AFQjCNEERrBnbzNgk2x30QPymYwXT84vbQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.flax.co.uk\46sa\75D\46sntz\0751\46usg\75AFQjCNEERrBnbzNgk2x30QPymYwXT84vbQ';return true;">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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/202f13ce-b9a8-466f-aa40-bb302d70b91d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.