[
https://issues.apache.org/jira/browse/LUCENE-6464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543762#comment-14543762
]
Michael McCandless commented on LUCENE-6464:
--------------------------------------------
bq. Please, have you also noticed the TODO
Oh I missed that, thanks for pointing it out.
Maybe we should fix the lowest level lookup method to do this "all MUST_NOT"
check? I.e., it would handle taking the clauses of the sub-query and moving
them up to the main query? This is also cleaner for users, i.e. they should
not be expected to know about this "all MUST_NOT" case. And then toQuery
doesn't need to handle it ...
Anyway, I think the {{*:*}} should be better (faster) than doing {{context:*}},
because {{*:*}} doesn't visit any postings. Also, the user may not have
indexed any contexts ...
> Allow possibility to group contexts in AnalyzingInfixSuggester.loockup()
> ------------------------------------------------------------------------
>
> Key: LUCENE-6464
> URL: https://issues.apache.org/jira/browse/LUCENE-6464
> Project: Lucene - Core
> Issue Type: Improvement
> Affects Versions: 5.1
> Reporter: Arcadius Ahouansou
> Attachments: LUCENE-6464.patch, LUCENE-6464.patch
>
>
> This is an enhancement to LUCENE-6050
> LUCENE-6050 added
> {code}
> lookup(CharSequence key, Map<BytesRef, BooleanClause.Occur> contextInfo, int
> num, boolean allTermsRequired, boolean doHighlight)
> {code}
> which allowed to do something like
> (A OR B AND C OR D ...)
> In our use-case, we realise that we need grouping i.e
> (A OR B) AND (C OR D) AND (...)
> In other words, we need the intersection of multiple contexts.
> The attached patch allows to pass in a varargs of map, each one representing
> the each group. Looks a bit heavy IMHO.
> This is an initial patch.
> The question to [~mikemccand] and [~janechang] is:
> is it better to expose a FilteredQuery/Query and let the user build their own
> query instead of passing a map?
> Exposing a filteredQuery will probably give the best flexibility to the
> end-users.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]