[
https://issues.apache.org/jira/browse/LUCENE-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15096811#comment-15096811
]
Ferenczi Jim commented on LUCENE-6972:
--------------------------------------
Sorry I forgot to add a comment about merging into trunk. I don't think it is
needed because the new SynonymQuery packs all the synonyms in the same query so
minimum should match is not affected. Though there would be things to do (not
in this issue) to handle single word synonyms that appear in a multi position
query with a SynonymQuery (the analyzeMultiBoolean does not use the
SynonymQuery).
> QueryBuilder should not differentiate single position and multiple positions
> queries when the analyzer produces synonyms.
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-6972
> URL: https://issues.apache.org/jira/browse/LUCENE-6972
> Project: Lucene - Core
> Issue Type: Bug
> Affects Versions: 5.4, 5.5
> Reporter: Ferenczi Jim
> Assignee: Adrien Grand
> Fix For: 5.5
>
> Attachments: LUCENE-6972.patch, LUCENE-6972.patch
>
>
> When synonyms are involved the querybuilder differentiate two cases. When
> there is only one position the query is composed of one BooleanQuery which
> contains multiple should clauses. This does not interact well when trying to
> apply a minimum_should_match to the query. For instance if a field has a
> synonym rule like "foo,bar" the query "foo" will produce:
> bq. (foo bar)
> ... two optional clauses at the root level. If we apply a minimum should
> match of 50% then the query becomes:
> bq. (foo bar)~1
> This seems wrong, the terms are at the same position.
> IMO the querybuilder should produce the following query:
> bq. ((foo bar))
> ... and a minimum should match of 50% should be not applicable to a query
> with only one optional clause at the root level.
> The case with multiple positions works as expected.
> The user query "test foo" generates:
> bq. (test (foo bar))
> ... and if we apply a minimum should match of 50%:
> bq. (test (foo bar))~1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]