You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.Builderdoes 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.
The text was updated successfully, but these errors were encountered:
Query can have an IndicesOptions property. The Elasticsearch client did not have the possibility to add this when the first integration was done, so this query property was skipped in building the request. Even now it seems that not all of the previously available values are supported, but I'll add whatever can be done now. This includes ignoreUnavailable. I created #2641 for this issue.
sothawo
added a commit
to sothawo/spring-data-elasticsearch
that referenced
this issue
Jul 21, 2023
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 settingignoreUnavailable
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 leastNativeQueryBuilder
I use in conjunction withElasticsearchTemplate
? Or some workaround other than preemptively fetching and caching the available indices.The text was updated successfully, but these errors were encountered: