Skip to content

Feature/8432 add search query explain#286

Merged
utas-raymondng merged 10 commits into
mainfrom
feature/8432-add-search-query-explain
Jun 21, 2026
Merged

Feature/8432 add search query explain#286
utas-raymondng merged 10 commits into
mainfrom
feature/8432-add-search-query-explain

Conversation

@shaunahu

@shaunahu shaunahu commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Add GET /api/v1/ogc/admin/explain
    • explains normal collection search results
    • returns the Elasticsearch request, total hits, hit IDs, scores, and score explanations
image
  • Add GET /api/v1/ogc/admin/explain/{uuid}
    • explains whether one Elasticsearch document (uuid) matches the query
image
  • Add a config flag:
    • ogcapi.debug.elasticsearch-explain-enabled
    • disabled by default
    • enabled for dev and test

Notes:
This API is for debugging only. So we add a config flag ogcapi.debug.elasticsearch-explain-enabled in application-*.yml. It is enabled for dev and test, and disabled by default. So in edge/staging/production environments, when call these endpoints, it will return 404 error. We will further enable the admin endpoints for these environments after we make firewall changes.

@shaunahu shaunahu marked this pull request as ready for review June 19, 2026 06:48

@utas-raymondng utas-raymondng left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@utas-raymondng utas-raymondng merged commit 0c14dcc into main Jun 21, 2026
4 checks passed
@utas-raymondng utas-raymondng deleted the feature/8432-add-search-query-explain branch June 21, 2026 07:40
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.

2 participants