Has_parent search query sometimes working sometimes not

A has_parent query returns no hits, although a reverse query fits.

I have two mappings.
The parent:
{
"album" :
{
"properties":
{
"title": { "type": "string"},
"location": location,
}
}
}

The child:
{
"photo" :
{
"_parent": {"type": "album"},
"properties":
{
"photo_id": { "type": "string", "index" : "not_analyzed" },
"url": {"type": "string", "index" : "not_analyzed" },
}
}
}

Running a simple query, expected to return all the photos, returns nothing. Such as:
{
"query": {
"has_parent": {
"parent_type": "album",
"query": {
"match_all": {}
}
}
}
}

Sometimes this works and sometimes not. Is "Has_parent" experimental? Why would it sometime work and sometime not?
Resetting the service and reinserting the data seems to work sometimes.

Sometimes this works and sometimes not. Is "Has_parent" experimental? Why
would it sometime work and sometime not?
Resetting the service and reinserting the data seems to work sometimes.

It should work. Can you gist a full recreation and open an issue
please? Also version of ES that you're using

ta

clint

--
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.
For more options, visit https://groups.google.com/groups/opt_out.