Skip to content

Commit

Permalink
Adding example of nested() for more complex nested queries opendistro…
Browse files Browse the repository at this point in the history
  • Loading branch information
FreCap committed Oct 27, 2020
1 parent 2aeb80b commit 3c27cad
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@ 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'
+
SELECT address FROM bank b, b.nestedField e WHERE b.state = 'WA' and e.name = 'test'
+
SELECT address, nested(nestedField.name)
FROM bank
WHERE nested(nestedField, nestedField.state = 'WA' AND nestedField.name = 'test')
OR nested(nestedField.state) = 'CA'

* Aggregations

Expand Down

0 comments on commit 3c27cad

Please sign in to comment.