Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Adding example of nested() for more complex nested queries #799 (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreCap authored Oct 27, 2020
1 parent 2aeb80b commit eeebc90
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 eeebc90

Please sign in to comment.