I wrote a query which works well on nested fields, but also wanted to add a functionality where it can search on the parent fields as well.
Here is the mapping:
mapping: {
doc: {
properties: {
"name" : {"type":"text"},
"address": {"type": "text"}
"interests": {"type": "nested","properties": {"game":{"type":"text" }}}
}
i can do a nested query on it, but unable to query parent from the nested query (i.e name and address). If there is a way to do it, can somebody help?
The vice versa will also help, where from parent we can also query nested docs