When doing a term query on nested documents with spaces, what is the correct syntax? My document looks like this:
{
"details": {
"first name": "jim"
}
}
I have a bool query where we are trying to match documents with a first name of jim
, but it is returning no documents. This is what I've tried:
{"bool":{"must":[{"term":{"details.first name":"jim"}}]}}
What is the right way to be querying against nested fields with a space in the field name?