Skip to content

Add ocl index commands for ES reindexing#8

Open
jamlung-ri wants to merge 1 commit into
mainfrom
feat/index-reindex-commands
Open

Add ocl index commands for ES reindexing#8
jamlung-ri wants to merge 1 commit into
mainfrom
feat/index-reindex-commands

Conversation

@jamlung-ri

Copy link
Copy Markdown
Member

Summary

  • Adds ocl index source concepts OWNER SOURCE and ocl index source mappings OWNER SOURCE — trigger reindexing for a source's concepts or mappings (requires source ownership, not superadmin)
  • Adds ocl index expansion concepts/mappings OWNER COLLECTION VERSION EXPANSION — reindex a collection expansion's resources (admin only)
  • Adds ocl index rebuild, ocl index populate, and ocl index resource RESOURCE — admin-level global ES index management

API endpoints covered

Command Endpoint Permission
index source concepts POST /{owner_type}/{owner}/sources/{source}/[{version}/]concepts/indexes/ Source owner
index source mappings POST /{owner_type}/{owner}/sources/{source}/[{version}/]mappings/indexes/ Source owner
index expansion concepts POST /…/expansions/{expansion}/concepts/index/ Admin
index expansion mappings POST /…/expansions/{expansion}/mappings/index/ Admin
index rebuild POST /indexes/apps/rebuild/ Admin
index populate POST /indexes/apps/populate/ Admin
index resource RESOURCE POST /indexes/resources/{resource}/ Admin

Test plan

  • ocl index source concepts WHO CIEL — triggers concept reindex, returns task ID
  • ocl index source mappings WHO CIEL --version v2025-04-03 — scoped to a version
  • ocl index source concepts WHO CIEL --single-batch --no-parallel
  • ocl index rebuild — admin token required, returns task
  • ocl index resource concepts --uri /orgs/WHO/ — admin batch reindex
  • ocl index resource concepts (no filter) — should print usage error
  • ocl index --help, ocl index source --help, ocl index expansion --help

🤖 Generated with Claude Code

Introduces `ocl index` command group covering all reindex endpoints
available in the OCL API: source-scoped concept/mapping reindex
(requires source ownership), collection expansion concept/mapping
reindex (admin only), and global ES admin operations (rebuild,
populate, batch resource reindex).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant