[ 
https://issues.apache.org/jira/browse/SOLR-5379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14304336#comment-14304336
 ] 

Jan Høydahl commented on SOLR-5379:
-----------------------------------

+1 to get some of this in. I have the desire but not the cycles right now. 
Perhaps your happy customer could help drive this?

Just looked briefly at the patches.. *disclaimer: I did not apply and test this 
yet*
* I would expect a ton of new unit tests for {{synonym-expander.patch}} but 
cannot find?
* Why create another subclass of ExtendedDismax for this? If going into core, 
fold the features into edismax? The patch will be smaller too.
* I cannot see a test for configuring custom {{synonymAnalyzers}}. Also, it 
should refer to schema fieldTypes instead of adding to qparser config - in the 
same way e.g. Suggesters do

Probably the work could be split up - first add more test coverage to the 
{{synonym-expander}} part and commit it. Then fold the quoting-stuff into 
standard edismax and commit (this part is less risky since it is back-compat if 
you don't use the new params).

Is [~tiennm] still around? Other users ot the patch who are willing to step in 
and improve it?

> Query-time multi-word synonym expansion
> ---------------------------------------
>
>                 Key: SOLR-5379
>                 URL: https://issues.apache.org/jira/browse/SOLR-5379
>             Project: Solr
>          Issue Type: Improvement
>          Components: query parsers
>            Reporter: Tien Nguyen Manh
>              Labels: multi-word, queryparser, synonym
>             Fix For: 4.9, Trunk
>
>         Attachments: conf-test-files-4_8_1.patch, quoted-4_8_1.patch, 
> quoted.patch, synonym-expander-4_8_1.patch, synonym-expander.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to