Howto: food for dogs ==> dogfood

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.
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.

Synonyms

--

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

On Tue, Apr 28, 2015 at 5:33 PM, Maarten Roosendaal <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.
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.

--
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.
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.

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),
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.
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 elasticsearch+unsubscribe@googlegroups.com.
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.

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),

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 <javascript:>
<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?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 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.
For more options, visit https://groups.google.com/d/optout.