aquasecurity / aquasecurity/esquery
How to use nested query filter?
- Dominant language
- Go
- Stars
- 317
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
Hi all,
how to make nested query filtering parent based on nested child object, also filter the child to,
something query like this?
```
{
"query": {
"bool": {
"must": [
{
"range": {
"date": {
"lt": "2018-07-05T10:00:00.000Z"
}
}
},
{
"nested": {
"path": "child",
"query": {
"bool": {
"must_not": {
"term": {
"child.foo": 0
}
}
}
}
}
}
]
}
}
}
```
thank in advice
Contributor guide
Research direction
The issue provides only an Elasticsearch JSON example and names no repository file, test, or entry point. Start by locating the builder API for nested queries and checking whether it can express the outer date range and child must_not term together. Done is a documented or demonstrated query shape that filters the parent and child as requested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, go
- Domain
- backend-api-design
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100