Skip to content

feat(search): geohash aggregation (bleve + opensearch) - #3272

Draft
dschmidt wants to merge 2 commits into
feat/graph-search-queryfrom
feat/search-geohash-aggregation
Draft

feat(search): geohash aggregation (bleve + opensearch)#3272
dschmidt wants to merge 2 commits into
feat/graph-search-queryfrom
feat/search-geohash-aggregation

Conversation

@dschmidt

@dschmidt dschmidt commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Adds a geohash-grid aggregation to search, so a client can get map-cell density (bucket key = geohash cell, value = doc count) across all accessible spaces in one query.

New optional AggregationOption.geohash_precision (1-12). Clients aggregate on location; the server resolves it to the indexed geo field and rejects non-geo fields.

  • OpenSearch: native geohash_grid on the geo-point sibling.
  • bleve (no native geohash): index precomputes geohash-prefix keyword siblings (location_geohash_1..12) and runs a terms facet on the requested length. Same cells and counts as OpenSearch.

No schema-version bump: the mapping change is additive, so the existing reconcile extends the index in place and warns to reindex; no fresh index needed.

Stacked on #3211 (graph search query + aggregations). Independent of geo-KQL (#3212): the only shared helper (ResolveGeoField) is included here.

@codacy-production

codacy-production Bot commented Aug 8, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 17 complexity

Metric Results
Complexity 17

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt force-pushed the feat/graph-search-query branch from 1b61ef6 to fb1e41b Compare August 18, 2026 16:51
@dschmidt
dschmidt force-pushed the feat/search-geohash-aggregation branch from 59aacc8 to c775513 Compare August 18, 2026 17:00
@dschmidt
dschmidt force-pushed the feat/graph-search-query branch 9 times, most recently from 2513263 to 71ca404 Compare September 3, 2026 08:33
(cherry picked from commit c775513)
(cherry picked from commit 6491bd1f83a4f286a6168e870311d924e9f52069)
@dschmidt
dschmidt force-pushed the feat/search-geohash-aggregation branch from c775513 to 2d46411 Compare September 7, 2026 22:14
dschmidt added a commit that referenced this pull request Sep 8, 2026
The same tokenizer with tag_depth turns a geohash into depth-tagged prefixes, so a terms facet with TermPrefix is a geohash grid at that precision. One location_geohash field per geopoint, part of the v5 schema so #3272 needs no further bump. OpenSearch maps it unindexed, geohash_grid works on the geo_point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant