Skip to content

Instantly share code, notes, and snippets.

@vector4wang
Created January 3, 2020 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vector4wang/0d5d5cbfa57dd7b428d97c6eb8c77b63 to your computer and use it in GitHub Desktop.
Save vector4wang/0d5d5cbfa57dd7b428d97c6eb8c77b63 to your computer and use it in GitHub Desktop.
[es] 查询nested不为空情况
{
"query": {
"nested": {
"path": "areaJSon",
"query": {
"bool": {
"must": {
"exists": {
"field": "areaJSon"
}
}
}
}
}
}
}
{
"query": {
"bool": {
"must": [
{
"term": {
"carPlate": "皖A12345"
}
},
{
"nested": {
"query": {
"bool": {
"must": {
"exists": {
"field": "parkingOrderFeeRecords"
}
}
}
},
"path": "parkingOrderFeeRecords"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment