Skip to content

feat: readonly geo index open - #9211

Merged
dancixx merged 3 commits into
devfrom
feat/readonly-geo-index-open
Jun 2, 2026
Merged

dancixx merged 3 commits into
devfrom
feat/readonly-geo-index-open

Conversation

@dancixx

@dancixx dancixx commented May 27, 2026

Copy link
Copy Markdown
Contributor

All Submissions:

⚠️ PRs must target the dev branch. If your PR targets master, please change the base branch to dev before requesting a review.

  • My PR targets the dev branch (not master) and my branch was created from dev.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --workspace --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@coderabbitai

coderabbitai Bot commented May 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: e653724d-01eb-41f0-8682-699050bdc4c6

📥 Commits

Reviewing files that changed from the base of the PR and between edc5e85 and c8a41b1.

📒 Files selected for processing (6)
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/inner.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/read_only/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/read_only/mod.rs
  • lib/segment/src/index/field_index/geo_index/read_only/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/read_only/mod.rs
🚧 Files skipped from review as they are similar to previous changes (6)
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/read_only/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/read_only/mod.rs
  • lib/segment/src/index/field_index/geo_index/read_only/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/lifecycle.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/inner.rs
  • lib/segment/src/index/field_index/geo_index/mutable_geo_index/read_only/mod.rs

📝 Walkthrough

Walkthrough

This PR refactors geo-index infrastructure to support read-only access. It extracts the geo-point ingestion logic from MutableGeoMapIndex into a reusable InMemoryGeoMapIndex::ingest_raw_points public method that reconstructs in-memory geohash buckets from persisted raw point data. The mutable index's loader is simplified to delegate to this method. Read-only support is added through two new lifecycle constructors: ReadOnlyAppendableGeoMapIndex::open rebuilds the in-memory index from stored Gridstore data, and ReadOnlyGeoMapIndex provides enum-level entry points (open_gridstore and open_mmap) with a mutability-reporting method. Round-trip tests validate both appendable and parent-enum variants.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • qdrant/qdrant#9033: Part of the coordinated read-only geoindex refactor; adds InMemoryGeoMapIndex::ingest_raw_points reusable logic that aligns with retrieval PR's ReadOnlyGeoMapIndex and geo index read operations.

Suggested labels

release:1.18.0

Suggested reviewers

  • generall
  • coszio

Poem

🐰 A rabbit hops through geo-buckets bright,
extracting points from day to night,
read-only eyes now map the way,
while in-memory geohashes play!
Refactored logic, clean and lean—
the best reviewed that we have seen! 🗺️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only a template checklist with no specific details about the implementation, making it impossible to relate to the changeset. Replace the checklist template with a meaningful description explaining what the read-only geo index open feature does and why it was added.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: readonly geo index open' clearly summarizes the main change: adding functionality to open read-only geo indexes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dancixx
dancixx marked this pull request as ready for review May 28, 2026 08:46
Base automatically changed from feat/gridstore-readonly-open to dev May 28, 2026 20:34
@dancixx
dancixx marked this pull request as draft May 28, 2026 20:38
@dancixx
dancixx marked this pull request as ready for review May 29, 2026 11:49
@dancixx
dancixx requested a review from generall May 29, 2026 11:50
@coszio
coszio self-requested a review May 29, 2026 19:03
@generall generall added this to the Live-reload milestone May 30, 2026

@coszio coszio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I thought the writeable flag on gridstore was already merged 🤔, am I tripping?

@dancixx
dancixx force-pushed the feat/readonly-geo-index-open branch from edc5e85 to c8a41b1 Compare June 2, 2026 08:31
@dancixx
dancixx merged commit a2009d5 into dev Jun 2, 2026
15 checks passed
@dancixx
dancixx deleted the feat/readonly-geo-index-open branch June 2, 2026 08:56
timvisee pushed a commit that referenced this pull request Jun 3, 2026
* feat: add geo index open method

* fix: test

* feat: add open_mmap and open_gridstore methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants