Skip to content

has_child filter yields inconsistent results when the number of child docs are high #4297

@joelabrahamsson

Description

@joelabrahamsson

Using 0.90.7 we've experienced the following: We have ~100K parent docs and ~1M child docs. We're essentially doing what's described here: http://joelabrahamsson.com/grouping-in-elasticsearch-using-child-documents/

When searching for parent docs and filtering using has_child it works as expected when the has_child filter contains a filter that limits the possible child docs to ~200K. The same goes when the number of child docs in the index is lower.

When we we however use the exact same query/filters with the exception that the has_child filter only limits the possible child docs to > ~500K we start seeing results that can't possibly be right. Also, when we run the same query again it produces a different result.

So, it seems to me that when the number of child docs become large the search results become inconsistent. The result does not however contain any indication that something has gone wrong (10 shards, 10 successful).

We're using five small nodes where ES has 1GB memory on each. The relevant index has 10 shards and 1 replica.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions