-
Notifications
You must be signed in to change notification settings - Fork 25.2k
RestHighLevelClient: indicesOptions cannot be used with point in time, but is not nullable in SearchRequest #69974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-core-features (Team:Core/Features) |
Getting the same issue while paginating the hits. Have you reached a solution @lucboruta ? |
Pinging @elastic/es-search (Team:Search) |
Hey, the issue is with the line ElasticSearch library version: A workaround solution for this would be extending the
|
@TanveshT, the quickest workaround for us was to use reflection, namely I don't know if removing the call to |
The rest validation of the search request ensures that the indices options are set to the default value. However, the comparison is too strict and should use equals since we create a new IndicesOption object when parsing from http or transport. Closes elastic#69974
I opened #71688 to fix the bug at the validation level. The comparison with the default value is too strict so it only works if the option is not explicitly set. |
The rest validation of the search request ensures that the indices options are set to the default value. However, the comparison is too strict and should use equals since we create a new IndicesOption object when parsing from http or transport. Closes #69974
The rest validation of the search request ensures that the indices options are set to the default value. However, the comparison is too strict and should use equals since we create a new IndicesOption object when parsing from http or transport. Closes #69974
The rest validation of the search request ensures that the indices options are set to the default value. However, the comparison is too strict and should use equals since we create a new IndicesOption object when parsing from http or transport. Closes #69974
Elasticsearch version (
bin/elasticsearch --version
): 7.11.1Plugins installed: [
mapper-size
]JVM version (
java -version
): 1.8.0_51OS version (
uname -a
if on a Unix-like system): macOS Big Sur 11.0.1Description of the problem including expected versus actual behavior:
Points in time (PIT) are incompatible with a few parameters of the search API, e.g.
ccs_minimize_roundtrips
andindicesOptions
. Whileccs_minimize_roundtrips
can be set tofalse
with the appropriate setter inorg.elasticsearch.action.search.SearchRequest
, indices options has a non-null default value, and it cannot be set tonull
because of the call tojava.util.Objects#requireNonNull
on line 354 of theSearchRequest
class. But this non-null default then triggers a validation exception saying that[indicesOptions] cannot be used with point in time
.We see in the suppressed
org.elasticsearch.client.ResponseException
exception (see stack trace below) that the URI that is built from theSearchRequest
includes the parameters that correspond to the defaultindicesOptions
.Two observations:
org.elasticsearch.client.RestHighLevelClient#search
is called seems to handlenull
indices options just fine, seeorg.elasticsearch.client#RequestConverters
line 1017.indicesOptions
tonull
using reflection, the request completes with no issue.Steps to reproduce:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: