New meaning of equal sign in StandardQueryParser [LUCENE-5664]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
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.)
---
Migrated from [LUCENE-5664](https://issues.apache.org/jira/browse/LUCENE-5664) by Martin Blom, updated Oct 10 2018
Attachments: [LUCENE-5664.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5664/LUCENE-5664.patch)
Contributor guide
Research direction
Start with StandardSyntaxParser.jj and compare the existing handling of <, <=, >, and => operators with the attached LUCENE-5664.patch. Verify that the equal operator produces a TermRangeQueryNode for exact-value queries while the colon operator continues producing Term or PhraseQuery nodes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100