Skip to content

No way to ignore unavailable indices after upgrade from 4.x #2639

Closed
@virtual-machinist

Description

@virtual-machinist

Since the new API doesn't support the old indices options, I have no practical way to tell the server to ignore a missing index when doing a search in multiple indices. So when I do a search with an index missing, I get an error instead of no results for that particular index (a totally acceptable service degradation).

However co.elastic.clients.elasticsearch.core.SearchRequest.Builder does allow setting ignoreUnavailable and it works for both older (7.17.x) and newer (8.8.x) ES servers I tested it on when setting the option via debugger.

Is there a way to expose this option somewhere if not in BaseQueryBuilder then at least NativeQueryBuilder I use in conjunction with ElasticsearchTemplate? Or some workaround other than preemptively fetching and caching the available indices.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions