You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Arcadius Ahouansou (JIRA)" <ji...@apache.org> on 2015/05/06 04:06:59 UTC

[jira] [Created] (LUCENE-6464) Allow possibility to group contexts during lookup

Arcadius Ahouansou created LUCENE-6464:
------------------------------------------

             Summary: Allow possibility to group contexts during lookup
                 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


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 vararg of map, each one representing the each group.

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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org