Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6464

Allow possibility to group contexts in AnalyzingInfixSuggester.loockup()

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1
    • Fix Version/s: 5.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is an enhancement to LUCENE-6050
      LUCENE-6050 added

      lookup(CharSequence key, Map<BytesRef, BooleanClause.Occur> contextInfo, int num, boolean allTermsRequired, boolean doHighlight)
      

      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 Michael McCandless and jane chang 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.

        Attachments

        1. LUCENE-6464.patch
          11 kB
          Arcadius Ahouansou

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arcadius Arcadius Ahouansou
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: