apache / apache/lucene

LatLonShape: Query with the same polygon that is indexed might not match [LUCENE-8634]

Open
#9,680 11 comments 0 reactions 0 assignees View on GitHub
affects-version:7.7 affects-version:8.0 affects-version:9.0 legacy-jira-priority:Major module:sandbox type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

If a polygon with a degenerated dimension is indexed and then an intersect query is performed with the same polygon, it might result in an empty result. For example this polygon with degenerated longitude:

POLYGON((1.401298464324817E-45 22.0, 1.401298464324817E-45 69.0, 4.8202184588118395E-40 69.0, 4.8202184588118395E-40 22.0, 1.401298464324817E-45 22.0))

---
Migrated from [LUCENE-8634](https://issues.apache.org/jira/browse/LUCENE-8634) by Ignacio Vera (@iverase), updated Jan 25 2019
Attachments: [LUCENE-8634.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-8634/LUCENE-8634.patch) (versions: 2)

Contributor guide

Open the contributing guide

Research direction

Start at the LatLonShape implementation and reproduce the reported intersect query using the exact polygon in the issue. Trace how the degenerated longitude is indexed and queried, then verify that the same polygon returns the indexed document with a regression test.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.