Skip to content

[BUG] OSIndexAPIImpl.getClosedIndexes() not implemented — closed OS indices become invisible #35304

@fabrizzio-dotCMS

Description

@fabrizzio-dotCMS

Summary

OSIndexAPIImpl.getClosedIndexes() returns an empty list (unimplemented stub). When an OS index is closed via PUT /api/v1/esindex/{name}?action=close, it becomes invisible to all subsequent API calls.

Operations on a closed OS index return HTTP 404 because the existence guard (indexExists()) cannot find the index — it only checks open indices.

Affected operations (after closing an OS index)

  • PUT /api/v1/esindex/{name}?action=open → 404
  • PUT /api/v1/esindex/{name}?action=activate → 404
  • DELETE /api/v1/esindex/{name} → 404
  • GET /api/v1/esindex/ → index not listed

Fix

Implement OSIndexAPIImpl.getClosedIndexes() using the OpenSearch /_cat/indices API with expand_wildcards=closed:

// OpenSearch Java client equivalent of: GET /_cat/indices?expand_wildcards=closed
client.cat().indices(r -> r.expandWildcards(ExpandWildcard.Closed))

Comparison

ESIndexAPI.getClosedIndexes() (already implemented) can serve as the reference implementation pattern.

Discovered via

QA test run — TC-04c/d against dotcms/dotcms:latest with single-node-os-migration stack, Phase 3.

Related

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions