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/08/31 15:28:04 UTC

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

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



##########
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:
       Short answer: yes, it how it work when it's inside a "bool" sentence. The docs are here https://www.elastic.co/guide/en/elasticsearch/reference/6.8/query-dsl-bool-query.html but I needed to see some examples to have the query working 




-- 
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