Hi,

In my current setup, I use a stemmer to analyze a field called summary. The 
user is able to search over the summary field using full lucene syntax, 
which we pass directly to elasticsearch through a query_string query, 
inside a filter. We always sort results based on their date field, so we 
use a constant score.

Unfortunately, our use of the stemmer has problems when users search for 
phrases in quotations. For instance, a search for "Crowd Valley" returns 
hits for the phrase "crowded valley". Ideally, I'd like to be able to 
ignore the stemmer for the portion of a query in a quoted phrase, but use 
the stemmer for all parts of the query outside of quotes.

Is such a thing in possible for ElasticSearch? If not, does anyone have any 
best practices for getting close to this behavior as possible?

Our current best idea is to use a multi_field with two analyzers - one with 
a stemmer, one without a stemmer. This would allow us to search either one 
or the other, depending on if the user has a quotation mark present in 
their query. However this would not be ideal for mixed queries such as: 
"Crowd Valley" or running clubs  [because the running clubs part would not 
be stemmed]

Many thanks,
Tom Weingarten
CTO & Co-founder, Wiser

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/88e6b645-73e5-4bca-9b99-082fcdc2c655%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to