apache / apache/lucene

SpanNearQuery with multiple terms does not find match [LUCENE-5332]

Open
#6,396 5 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

A flat structure (non-nested) for a SpanNearQuery containing multiple terms does not always find the correct match.

Test case is attached ...

---
Migrated from [LUCENE-5332](https://issues.apache.org/jira/browse/LUCENE-5332) by Jerry Zhou, updated Nov 08 2013
Attachments: [MultiTermFlatSpanNearTest.java](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-5332/MultiTermFlatSpanNearTest.java)

Contributor guide

Open the contributing guide

Research direction

Start by reading the attached MultiTermFlatSpanNearTest.java and the SpanNearQuery implementation and existing tests. Reproduce the flat, non-nested multiple-term case, then verify that the correct match is found without breaking nested SpanNearQuery behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.