You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by mimimimi <mi...@hotmail.com> on 2014/07/23 10:46:12 UTC

Re: Proposal: Full support for multi-word synonyms at query time

While dealing with synonym at query time, solr failed to work with multi-word
synonyms due to some reasons:

    First the lucene queryparser tokenizes user query by space so it split
multi-word term into two terms before feeding to synonym filter, so synonym
filter can't recognized multi-word term to do expansion
    Second, if synonym filter expand into multiple terms which contains
multi-word synonym, The SolrQueryParseBase currently use MultiPhraseQuery to
handle synonyms. But MultiPhraseQuery don't work with term have different
number of words.
For the first one, we can extend quoted all multi-word synonym in user query
so that lucene queryparser don't split it. There are a jira task related to
this one https://issues.apache.org/jira/browse/LUCENE-2605.

For the second, we can replace MultiPhraseQuery by an appropriate
BoleanQuery SHOULD which contains multiple PhraseQuery in case tokens stream
have multi-word synonym

barcode java
<http://www.keepdynamic.com/barcoding/java-barcode-generator.shtml>  




--
View this message in context: http://lucene.472066.n3.nabble.com/Proposal-Full-support-for-multi-word-synonyms-at-query-time-tp4000522p4148709.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org