No results for top_children query; same has_child query works

Hi all,

I've got a situation where running a top_children query returns no
results; running the same query wrapped in a has_child returns the
expected result. I know that top_children may miss parent document
results in the case where there are lots of matching children per
parent; but since in this case top_children returns nothing at all, it
seems that that's not what's going on.

I can try to put together a reduction, but first just wanted to make
sure my understanding of top_children/has_child is correct, and that
what I'm describing is not expected behavior.

Thanks!
Mat

It sounds strange, it should return a value… . A recreation would help, thanks!

On Tuesday, February 7, 2012 at 12:10 AM, Matthew A. Brown wrote:

Hi all,

I've got a situation where running a top_children query returns no
results; running the same query wrapped in a has_child returns the
expected result. I know that top_children may miss parent document
results in the case where there are lots of matching children per
parent; but since in this case top_children returns nothing at all, it
seems that that's not what's going on.

I can try to put together a reduction, but first just wanted to make
sure my understanding of top_children/has_child is correct, and that
what I'm describing is not expected behavior.

Thanks!
Mat

Finally put together a reduction for it -- the kicker seems to be
having a nested field in the parent type with the same name as the
field you're searching in the child type. I've opened a ticket:

Thanks!
Mat

On Feb 7, 5:13 am, Shay Banon kim...@gmail.com wrote:

It sounds strange, it should return a value… . A recreation would help, thanks!

On Tuesday, February 7, 2012 at 12:10 AM, Matthew A. Brown wrote:

Hi all,

I've got a situation where running a top_children query returns no
results; running the same query wrapped in a has_child returns the
expected result. I know that top_children may miss parent document
results in the case where there are lots of matching children per
parent; but since in this case top_children returns nothing at all, it
seems that that's not what's going on.

I can try to put together a reduction, but first just wanted to make
sure my understanding of top_children/has_child is correct, and that
what I'm describing is not expected behavior.

Thanks!
Mat