geo_radius misses a point at latitude 90 after creating a geo index

Open
#11,781 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@xixi-box is already working on this.

Since Nov 27, 2026.

  • #11787 by @xixi-box — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
57/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, rust
Domain
databases, search

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

bug

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

  1. Start Qdrant and wait until it is ready.
docker run --rm -p 127.0.0.1:6333:6333 qdrant/qdrant:v1.20.2
  1. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qdrant/qdrant

All issues in qdrant/qdrant

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.