[
https://issues.apache.org/jira/browse/LUCENE-5261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788106#comment-13788106
]
Uwe Schindler commented on LUCENE-5261:
---------------------------------------
Hi, I have one suggestion:
In ElasticSearch, but also in Solr, you have the option to have a "percentage"
minShouldMatch. Currently the same code is duplicated, too. Of course you could
do this after the build of the BooleanQuery (just set minShouldMatch depended
on clauses().size()), but maybe we can automatically expand the percentage
dependend on number of terms. It's just an idea, but also required quite often.
On the other hand its simple to do:
{code:java}
float frac =.5f;
BooleanQuery bq = builder.createBooleanQuery("body", "just a test");
bq.setMinimumNumberShouldMatch((int) (frac * bq.clauses().size()));
{code}
Maybe its not worth to do it...
> add simple API to build queries from analysis chain
> ---------------------------------------------------
>
> Key: LUCENE-5261
> URL: https://issues.apache.org/jira/browse/LUCENE-5261
> Project: Lucene - Core
> Issue Type: New Feature
> Reporter: Robert Muir
> Attachments: LUCENE-5261.patch
>
>
> Currently this is pretty crazy stuff.
> Additionally its duplicated in like 3 or 4 places in our codebase (i noticed
> it doing LUCENE-5259)
> We can solve that duplication, and make it easy to simply create queries from
> an analyzer (its been asked on the user list), as well as make it easier to
> build new queryparsers.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]