Failure in TestXYPointQueries [LUCENE-9859]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
It seems we are trying to create distance queries with radius = 0 which is not allowed.
Failure:
```java
FAILED: org.apache.lucene.search.TestXYDocValuesQueries.testSamePointManyTimes
Error Message:
java.lang.IllegalArgumentException: radius must be bigger than 0, got 0.0
Stack Trace:
java.lang.IllegalArgumentException: radius must be bigger than 0, got 0.0
at __randomizedtesting.SeedInfo.seed([3862947398D9B990:84672DC16C1CE008]:0)
at org.apache.lucene.geo.XYCircle.(XYCircle.java:44)
at org.apache.lucene.document.XYDocValuesField.newSlowDistanceQuery(XYDocValuesField.java:183)
at org.apache.lucene.search.TestXYDocValuesQueries.newDistanceQuery(TestXYDocValuesQueries.java:39)
at org.apache.lucene.geo.BaseXYPointTestCase.verifyRandomDistances(BaseXYPointTestCase.java:922)
at org.apache.lucene.geo.BaseXYPointTestCase.verify(BaseXYPointTestCase.java:786)
at org.apache.lucene.geo.BaseXYPointTestCase.testSamePointManyTimes(BaseXYPointTestCase.java:438)
```
Reproduce with:
```Java
gradlew :lucene:core:test --tests "org.apache.lucene.search.TestXYPointQueries.testSamePointManyTimes" -Ptests.jvms=4 -Ptests.haltonfailure=false -Ptests.jvmargs=-XX:TieredStopAtLevel=1 -Ptests.seed=3862947398D9B990 -Ptests.multiplier=2 -Ptests.badapples=false -Ptests.file.encoding=ISO-8859-1
```
---
Migrated from [LUCENE-9859](https://issues.apache.org/jira/browse/LUCENE-9859) by Ignacio Vera (@iverase)
Contributor guide
Research direction
Start by reproducing TestXYPointQueries.testSamePointManyTimes with the Gradle command provided. Read TestXYDocValuesQueries.newDistanceQuery, XYDocValuesField.newSlowDistanceQuery, XYCircle, and BaseXYPointTestCase.verifyRandomDistances to trace the zero-radius case. Done means the targeted test no longer fails with the radius validation exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100