-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
SourceExists HLRC uses GetSourceRequest instead of GetRequest #51789
SourceExists HLRC uses GetSourceRequest instead of GetRequest #51789
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @timoninmaxim i would suggest you to break your pr
in small commits to help others to review your change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timoninmaxim! Besides a small comment, this change looks good to me.
@@ -184,7 +180,7 @@ private static void doTestSourceExists(BiFunction<String, String, GetRequest> re | |||
if (randomBoolean()) { | |||
boolean realtime = randomBoolean(); | |||
getRequest.realtime(realtime); | |||
if (realtime == false) { | |||
if (!realtime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the es code base we prefer use == false
instead of !
. The reason is that this is more visible when reading the code. A !
can easily be missed or forgotten to be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the clarification! fixed it.
@elasticmachine test this please |
Pinging @elastic/es-core-features (:Core/Features/Java High Level REST Client) |
Ref #50885
Link to the discussion
Source Exists API currently uses GetRequest that contains unsupported fields like
stored_fields
,version
andversion_type
. So restrict the API to use GetSourceRequest and deprecates previous version.