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

New meaning of equal sign in StandardQueryParser

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5, 4.8
    • Fix Version/s: None
    • Component/s: modules/queryparser
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      The StandardSyntaxParser.jj has (undocumented?) support for the <, <=, > and => operators that generate a TermRangeQueryNode. The equal operator, however, behaves just like the colon and produces a regular Term node instead of a TermRangeQueryNode.

      I've been using the attached patch in a project where we had to be able to query the exact value of a field and I'm hoping there is interest to apply it upstream.

      (Note that the colon operator works just as before, producing TermQuery or PhraseQuery nodes.)

        Attachments

        1. LUCENE-5664.patch
          2 kB
          Martin Blom

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lcs Martin Blom
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: