Has_child query inside multitype search

Hi,

I have one type File that has a child Content, and there is another
type *Question *without any child mapping.

I'm trying to search inside the two types with the following query:

    {"query": 
              {
                "bool": {
                  "should": [
                          {
                            "term": {
                              "file.name": { "value": "my query" }
                            }
                          },
                          {
                            "term": {
                              "question.title": { "value": "my query" }
                            }
                          },
                          {
                            "has_child": {
                              "type": "content",
                              "query": {
                                "match": {
                                  "content": {
                                    "type": "phrase",
                                    "query": "my query",
                                    "slop": 3,
                                    "boost": 2.0
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }

But Elasticsearch throws the exception: nested:
QueryParsingException[[question] [has_child] No mapping for for type
[content]]

I thought that the has_child query would just score File docs and ignore
Question docs. Is it possible to do this?

--
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/9e8c3369-2464-43ce-beca-f1775aecbbbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.