Allow SpanNearQuery to take a BooleanQuery. [LUCENE-4696]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Currently SpanNearQuery can only take other SpanQuery objects, which include spans, span term and span wrapped multi-term queries, but not Boolean queries.
By allowing a Boolean query to added to a SpanNearQuery, we can add f.i. queries
that come from a QueryParser and which can not be easily transformed in the corresponding span objects.
The main use case here is to find the intersection between two sets of results with the additional restriction that the matched terms from the different queries should be near one another.
---
Migrated from [LUCENE-4696](https://issues.apache.org/jira/browse/LUCENE-4696) by Michel Conrad, updated Jan 21 2013
Contributor guide
Research direction
Start by reading the SpanNearQuery and BooleanQuery entry points to understand their current relationship and the limitation described in the issue. Done means BooleanQuery can participate in SpanNearQuery for the stated intersection and proximity use case, with the relevant behavior verified by tests identified during that investigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100