Count operation with hasChild filter doesn't work

Hello.

If I query from parent type using hasChild filter, there are no problems.
Everything works as expected.
But if I do a count request with the same hasChild filter, then there is a
problem:
Type [myChildType] does not have parent mapping.

There is a workaround for this: use query instead of count and use total
count returned, but this isn't optimal solution of course:)

Regards
Wojciech Durczyński

Yes, its not supported. Use search_type=count and do a regular search, it
is as fast as the count endpoint.

2011/11/10 Wojciech Durczyński wojciech.durczynski@comarch.com

Hello.

If I query from parent type using hasChild filter, there are no problems.
Everything works as expected.
But if I do a count request with the same hasChild filter, then there is a
problem:
Type [myChildType] does not have parent mapping.

There is a workaround for this: use query instead of count and use total
count returned, but this isn't optimal solution of course:)

Regards
Wojciech Durczyński

Hey Shay,

Could you please explain why the count would be just as fast as a query? Is
that because count is implemented as a query and is just a convenience
operation?

Thanks

On Sunday, 13 November 2011 02:09:25 UTC-5, kimchy wrote:

Yes, its not supported. Use search_type=count and do a regular search, it
is as fast as the count endpoint.

2011/11/10 Wojciech Durczyński <wojciech....@comarch.com <javascript:>>

Hello.

If I query from parent type using hasChild filter, there are no problems.
Everything works as expected.
But if I do a count request with the same hasChild filter, then there is
a problem:
Type [myChildType] does not have parent mapping.

There is a workaround for this: use query instead of count and use total
count returned, but this isn't optimal solution of course:)

Regards
Wojciech Durczyński

--
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.