Created
May 17, 2017 07:34
-
-
Save razorcd/31c9ccddc78dd2a2f30f9135cd1002b6 to your computer and use it in GitHub Desktop.
query based on a nested field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST http://localhost:9200/devices/_search | |
{ | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"nested": { | |
"path": "contractAttributions", | |
"query": { | |
"bool": { | |
"must": [ | |
{ | |
"match": { | |
"contractAttributions.contractNumber": "1111" | |
} | |
} | |
] | |
} | |
} | |
} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment