Skip to content

feat(search): geohash grid aggregation option - #62

Merged
dschmidt merged 1 commit into
mainfrom
feat/search-geohash-aggregation
Oct 1, 2026
Merged

dschmidt merged 1 commit into
mainfrom
feat/search-geohash-aggregation

Conversation

@dschmidt

@dschmidt dschmidt commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Adds @libre.graph.geohashDefinition to aggregationOption. When set, the aggregation becomes a geohash-grid aggregation over a geo-point field (e.g. location): each searchBucket in the response is keyed by a geohash cell and carries its count, ordered by count descending, suitable for density and heatmap rendering. size limits the buckets to the top N cells. Geohash buckets carry no aggregationFilterToken; narrowing by location is done through the search query.

geohashDefinition.precision is required and sets the geohash key length (1 to 12, higher means finer cells).

bucketDefinition, @libre.graph.metricDefinition and @libre.graph.geohashDefinition are mutually exclusive; requests specifying more than one are rejected with invalidRequest. Expressed as prose rather than a not/oneOf construct, which would leak artifacts into the generated clients. This also means geohash aggregations take no sortBy/minimumCount: cell ordering is fixed to count descending.

Libregraph extension, not present in MS Graph. Implementation: opencloud-eu/opencloud#3272 (needs updating to the new structure and the rejection semantics).

@dschmidt
dschmidt force-pushed the feat/search branch 2 times, most recently from 12d8885 to 8f05719 Compare September 7, 2026 17:58
@dschmidt
dschmidt force-pushed the feat/search-geohash-aggregation branch 2 times, most recently from 1e601c8 to 7013fc4 Compare September 7, 2026 22:02
@dschmidt
dschmidt force-pushed the feat/search branch 3 times, most recently from fb2b5d7 to d6e08e4 Compare October 1, 2026 15:57
Base automatically changed from feat/search to main October 1, 2026 16:33
@dschmidt
dschmidt force-pushed the feat/search-geohash-aggregation branch 5 times, most recently from a44ce75 to c5710d1 Compare October 1, 2026 19:00
@dschmidt
dschmidt requested a balanced review from Copilot October 1, 2026 19:05

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The specified request shape differs from the linked implementation, and some documented constraints are not enforced.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Extends the search API specification with geohash-grid aggregation support.

Changes:

  • Adds geohash precision configuration.
  • Documents geohash bucket responses and aggregation constraints.
File Description
api/​openapi-spec/​v1.0.yaml Defines geohash aggregation request and response schemas.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread api/openapi-spec/v1.0.yaml
@dschmidt
dschmidt force-pushed the feat/search-geohash-aggregation branch from c5710d1 to d3f3f30 Compare October 1, 2026 19:18
@libre.graph.geohashDefinition on aggregationOption, the third
aggregation kind next to bucketDefinition and metricDefinition. At most
one of the three may be set, the server rejects requests specifying
more than one (documented as prose: a not/anyOf construct would leak a
dead AggregationOptionNot model into every generated client). Buckets
come back as regular searchBuckets with the geohash cell as key,
ordered by count descending; size limits them to the top N cells.
Geohash buckets carry no aggregationFilterToken. Libregraph extension.
@dschmidt
dschmidt marked this pull request as ready for review October 1, 2026 19:32
@dschmidt
dschmidt merged commit 2890576 into main Oct 1, 2026
4 checks passed
@dschmidt
dschmidt deleted the feat/search-geohash-aggregation branch October 1, 2026 19:32
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