You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:29:24 UTC

[GitHub] [brooklyn-server] algairim commented on a change in pull request #1241: Fix logbook query by EntityId or TaskId

algairim commented on a change in pull request #1241:
URL: https://github.com/apache/brooklyn-server/pull/1241#discussion_r699394604



##########
File path: core/src/main/java/org/apache/brooklyn/util/core/logbook/opensearch/OpenSearchLogStore.java
##########
@@ -253,17 +250,47 @@ protected String getJSONQuery(LogBookQueryParams params) {
             queryBoolMustListBuilder.add(ImmutableMap.of("range", ImmutableMap.of("timestamp", timestampMapBuilder.build())));
         }
 
+        // Apply search taskId.
+        if (Strings.isNonBlank(params.getTaskId())) {
+            queryBoolMustListBuilder.add(
+                    ImmutableMap.of("bool",
+                            ImmutableMap.of("should",

Review comment:
       `should` is an OR match condition, meaning to look for taskId in the `taskId` filed or `message` field, right? 




-- 
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: dev-unsubscribe@brooklyn.apache.org

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