You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/14 09:31:27 UTC

[GitHub] [skywalking] kezhenxu94 commented on a change in pull request #7710: Fix that `Query` cannot be updated after it's set in `SearchBuilder`

kezhenxu94 commented on a change in pull request #7710:
URL: https://github.com/apache/skywalking/pull/7710#discussion_r708089826



##########
File path: oap-server/server-library/library-elasticsearch-client/src/main/java/org/apache/skywalking/library/elasticsearch/requests/search/MatchQuery.java
##########
@@ -38,10 +38,14 @@
         public void serialize(final MatchQuery value, final JsonGenerator gen,
                               final SerializerProvider provider)
             throws IOException {
-            gen.writeFieldName("match");
             gen.writeStartObject();
             {
-                gen.writeStringField(value.getName(), value.getText());
+                gen.writeFieldName("match");
+                gen.writeStartObject();
+                {

Review comment:
       > Just a code style?
   
   Yes, this is a kind of code style to make it easier to distinguish the written object structures, and help to write the correct `writeStartXxxx` / `writeEndXxx`, otherwise I have to count the number of `writeStartObject` / `writeEndObject`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org