Must filter on nested fields from different hierarchies

Hello,

I have the following object in my index:
{
"user" : {
"info" : {
"fname" : "John",
"lname" : "Stark"
},
"settings" : {
"hide_menu" : true,
"time_offset" : 3
}
},
"views" : [
]
}

And I'd like to create a filter to find all the users whose first name is
John and have time_offset=3
So I need to build a must filter, but the problem is that these 2 fields
are nested on different hierarchies: user.info and user.settings

How can I make a must filter (AND) with both of them?

Thanks,
Edi Buslovich.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/be0aaf35-212b-46a1-8430-21879881e147%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Was answered for me on stackoverflow:

Thanks.

On Sunday, April 26, 2015 at 6:32:53 PM UTC+3, Edi Buslovich wrote:

Hello,

I have the following object in my index:
{
"user" : {
"info" : {
"fname" : "John",
"lname" : "Stark"
},
"settings" : {
"hide_menu" : true,
"time_offset" : 3
}
},
"views" : [
]
}

And I'd like to create a filter to find all the users whose first name is
John and have time_offset=3
So I need to build a must filter, but the problem is that these 2 fields
are nested on different hierarchies: user.info and user.settings

How can I make a must filter (AND) with both of them?

Thanks,
Edi Buslovich.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/606d4082-9845-4b01-ad2c-761678bf398e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.