Get Count Using has-child query

Hi ,

  1. How to get document count in an index using child query.?

    I am using the query to get count is......

    curl -XGET 'http://localhost:9200/dbtest/parent/_count' -d
    '{"has_child" : {"type" : "child", "query" :{ "term" :
    { "myfield": "test" } }} }'

    But i am getting like this...........

{"count":0,"_shards":{"total":2,"successful":0,"failed":2,"failures":
[{"index":"dbtest","shard":
0,"reason":"BroadcastShardOperationFailedException[[dbtest]0] ];
nested:"},{"index":"dbtest","shard":
1,"reason":"BroadcastShardOperationFailedException[[dbtest]1] ];
nested: "}]}}

Can any one help me.........

Count API does not support child query, just issue a search request with 0 size and look at the total hits.
On Tuesday, January 11, 2011 at 10:42 AM, Arulkumar wrote:

Hi ,

  1. How to get document count in an index using child query.?

I am using the query to get count is......

curl -XGET 'http://localhost:9200/dbtest/parent/_count' -d
'{"has_child" : {"type" : "child", "query" :{ "term" :
{ "myfield": "test" } }} }'

But i am getting like this...........

{"count":0,"_shards":{"total":2,"successful":0,"failed":2,"failures":
[{"index":"dbtest","shard":
0,"reason":"BroadcastShardOperationFailedException[[dbtest]0] ];
nested:"},{"index":"dbtest","shard":
1,"reason":"BroadcastShardOperationFailedException[[dbtest]1] ];
nested: "}]}}

Can any one help me.........

ok, pushed support for it: Shared Gateway: Allow to set the number of concurrent streams doing snapshot operations · Issue #621 · elastic/elasticsearch · GitHub.
On Tuesday, January 11, 2011 at 10:01 PM, Shay Banon wrote:

Count API does not support child query, just issue a search request with 0 size and look at the total hits.
On Tuesday, January 11, 2011 at 10:42 AM, Arulkumar wrote:

Hi ,

  1. How to get document count in an index using child query.?

I am using the query to get count is......

curl -XGET 'http://localhost:9200/dbtest/parent/_count' -d
'{"has_child" : {"type" : "child", "query" :{ "term" :
{ "myfield": "test" } }} }'

But i am getting like this...........

{"count":0,"_shards":{"total":2,"successful":0,"failed":2,"failures":
[{"index":"dbtest","shard":
0,"reason":"BroadcastShardOperationFailedException[[dbtest]0] ];
nested:"},{"index":"dbtest","shard":
1,"reason":"BroadcastShardOperationFailedException[[dbtest]1] ];
nested: "}]}}

Can any one help me.........

Oops, wrong reply to, this change is not related to this...
On Tuesday, January 11, 2011 at 10:05 PM, Shay Banon wrote:

ok, pushed support for it: Shared Gateway: Allow to set the number of concurrent streams doing snapshot operations · Issue #621 · elastic/elasticsearch · GitHub.
On Tuesday, January 11, 2011 at 10:01 PM, Shay Banon wrote:

Count API does not support child query, just issue a search request with 0 size and look at the total hits.
On Tuesday, January 11, 2011 at 10:42 AM, Arulkumar wrote:

Hi ,

  1. How to get document count in an index using child query.?

I am using the query to get count is......

curl -XGET 'http://localhost:9200/dbtest/parent/_count' -d
'{"has_child" : {"type" : "child", "query" :{ "term" :
{ "myfield": "test" } }} }'

But i am getting like this...........

{"count":0,"_shards":{"total":2,"successful":0,"failed":2,"failures":
[{"index":"dbtest","shard":
0,"reason":"BroadcastShardOperationFailedException[[dbtest]0] ];
nested:"},{"index":"dbtest","shard":
1,"reason":"BroadcastShardOperationFailedException[[dbtest]1] ];
nested: "}]}}

Can any one help me.........

thank you shay......

On Jan 13, 12:23 am, Shay Banon shay.ba...@elasticsearch.com wrote:

Oops, wrong reply to, this change is not related to this...

On Tuesday, January 11, 2011 at 10:05 PM, Shay Banon wrote:

ok, pushed support for it:Shared Gateway: Allow to set the number of concurrent streams doing snapshot operations · Issue #621 · elastic/elasticsearch · GitHub.
On Tuesday, January 11, 2011 at 10:01 PM, Shay Banon wrote:

Count API does not support child query, just issue a search request with 0 size and look at the total hits.
On Tuesday, January 11, 2011 at 10:42 AM, Arulkumar wrote:

Hi ,

  1. How to get document count in an index using child query.?

I am using the query to get count is......

curl -XGET 'http://localhost:9200/dbtest/parent/_count'-d
'{"has_child" : {"type" : "child", "query" :{ "term" :
{ "myfield": "test" } }} }'

But i am getting like this...........

{"count":0,"_shards":{"total":2,"successful":0,"failed":2,"failures":
[{"index":"dbtest","shard":
0,"reason":"BroadcastShardOperationFailedException[[dbtest]0] ];
nested:"},{"index":"dbtest","shard":
1,"reason":"BroadcastShardOperationFailedException[[dbtest]1] ];
nested: "}]}}

Can any one help me.........