Indeed!

After I posted the question, I thought same thing. :) I withdraw it but let me explain the background of the issue.

In a project, we've been using NGramTokenFilter since Solr 5.5 and the field which uses the TokenFilter is used from edismax. The problem I mentioned became actual when we moved to 6.3.0.

After SynonymQuery was introduced in LUCENE-6789, query string which is analyzed by NGramTokenFilter produces SynonymQuery and hence mm parameter for edismax couldn't be set to it.

By seeing branch_6x, I'm not sure it's been improved, but I think that tokens which are produced by NGramTokenFilter shouldn't be converted to SynonymQuery because they are not synonyms.

I'll check the latest branch and if it still produces SynonymQuery, I'll open a 
ticket.

Thanks,

Koji



On 2017/05/23 23:43, David Smiley wrote:
Koji,
I'm unconvinced it makes sense for SynonymQuery to have minShouldMatch. Shouldn't the scenario of synonyms be a pure disjunction? If you don't think so can you give a practical counter-example?
~ David

On Tue, May 23, 2017 at 6:01 AM Koji Sekiguchi <koji.sekigu...@rondhuit.com <mailto:koji.sekigu...@rondhuit.com>> wrote:

    Hi,

    Can we implement setMinimumNumberShouldMatch() for SynonymQuery, like 
BooleanQuery?

    SynonymQuery was introduced in this ticket before I was aware:
    https://issues.apache.org/jira/browse/LUCENE-6789

    By this, analyzeBoolean() of QueryBuilder no longer creates BooleanQuery 
but SynonymQuery
    instead, and then precision of certain queries decreased because mm 
parameter cannot be set.

    First, I thought we should revert analyzeBoolean() so it uses BooleanQuery 
just like it used to be,
    but we are already in 6.6, I think it is better for us to implement 
setMinimumNumberShouldMatch()
    for SynonymQuery so we can set mm parameter for it.

    Thought?

    Thanks,

    Koji

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org 
<mailto:dev-unsubscr...@lucene.apache.org>
    For additional commands, e-mail: dev-h...@lucene.apache.org 
<mailto:dev-h...@lucene.apache.org>

--
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book: 
http://www.solrenterprisesearchserver.com

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

Reply via email to