From 15fc21c0f0f33654b250c5df1864fc076802ea35 Mon Sep 17 00:00:00 2001 From: Francesco Capponi Date: Sun, 25 Oct 2020 15:00:01 -0400 Subject: [PATCH] Adding example of nested() for more complex nested queries --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index ea22e4669e..0ad67a0358 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,13 @@ curl -XPOST https://localhost:9200/_opendistro/_sql -u admin:admin -k -d '{"quer * Nested Field SELECT address FROM bank b, b.nestedField e WHERE b.state = 'WA' and e.name = 'test' + + // OR + + SELECT address, nested(nestedField.name) + FROM bank + WHERE nested(nestedField, nestedField.state = 'WA' AND nestedField.name = 'test') + OR nested(nestedField.state) = 'CA' * Aggregations