geo_radius misses a point at latitude 90 after creating a geo index
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 57/100
Research direction
Start by tracing how geo_radius queries are evaluated before and after a geo index is created, then compare how the north pole coordinates are handled in each path. Reproduce the reported case with latitude 90 and the nearby float64 values in the issue. Done means the indexed query returns the point at the search center, matching the unindexed result.
Written by the indexing model from the issue text.
Description
Current Behavior
A 500 m radius query centered on a point at latitude 90 returns that point before a geo index is created. After indexing, the same query returns an empty list.
Steps to Reproduce
- Start Qdrant and wait until it is ready.
docker run --rm -p 127.0.0.1:6333:6333 qdrant/qdrant:v1.20.2
- Run the following with Python 3 in another terminal.
import json
from urllib.request import Request, urlopen
from uuid import uuid4
url = f"http://127.0.0.1:6333/collections/pole_{uuid4().hex}"
def request(method, path="", body=None):
data = None if body is None else json.dumps(body).encode()
req = Request(url + path, data=data, method=method,
headers={"Content-Type": "application/json"})
with urlopen(req, timeout=10) as response:
return json.load(response)["result"]
place = {"lon": 0, "lat": 90}
condition = {"key": "place", "geo_radius": {"center": place, "radius": 500}}
def matching_ids():
result = request("POST", "/points/scroll", {"filter": {"must": [condition]}})
return [point["id"] for point in result["points"]]
request("PUT", body={"vectors": {"size": 2, "distance": "Euclid"}})
try:
point = {"id": 1, "vector": [1, 0], "payload": {"place": place}}
request("PUT", "/points?wait=true", {"points": [point]})
print("Before indexing:", matching_ids())
request("PUT", "/index?wait=true", {"field_name": "place", "field_schema": "geo"})
print("After indexing:", matching_ids())
finally:
request("DELETE")
Before indexing: [1]
After indexing: []
Expected Behavior
Both queries should return [1]. The stored point is at the center of the search circle.
Context (Environment)
Reproduced on Qdrant v1.20.2 and v1.16.3 using the official Docker images and the REST API.
Detailed Description
The same payload with nearby latitude values behaves differently:
| Stored latitude | Before indexing | After indexing |
|---|---|---|
90 |
[1] |
[] |
89.999999 |
[1] |
[1] |
-90 |
[1] |
[1] |
On v1.20.2, with the query center fixed at the north pole and the radius at 500 m, the indexed query also misses a point at 89.99999999999999 but finds one at 89.99999999999997. These are the first two float64 latitudes below 90.
- Dominant language
- Rust
- Stars
- 35.7k
- Forks
- 2.8k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 239
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qdrant/qdrant
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Delete/clear filter validation bypass via min_should{conditions:[],min_count:0} deletes all pointsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
app bug session
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
macOS autosubmit enable passes unsupported --wait to launchctl bootoutPossibly taken @iqdoctor claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
junhoyeo/tokscale#1713 · 3 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
eliasstravik/herdr-projects#1700 ·