So? What's wrong here?

You asked for 5 docs and you get 5.

I'm missing something I guess.

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 6 juin 2014 à 20:02, Дмитрий Киселев <[email protected]> a écrit :
> 
> Sorry, there littlebit different dataset.
> Here is answer with same data and 1 shard
> {
>   "took" : 63,
>   "timed_out" : false,
>   "_shards" : {
>     "total" : 1,
>     "successful" : 1,
>     "failed" : 0
>   },
>   "hits" : {
>     "total" : 3879,
>     "max_score" : 1.0,
>     "hits" : [ {
>       "_index" : "gazetteer",
>       "_type" : "location",
>       "_id" : "adrpnt-0004074128-w145925740-regular",
>       "_score" : 1.0
>     }, {
>       "_index" : "gazetteer",
>       "_type" : "location",
>       "_id" : "adrpnt-0007815983-w175372179-regular",
>       "_score" : 1.0
>     }, {
>       "_index" : "gazetteer",
>       "_type" : "location",
>       "_id" : "adrpnt-0013765594-w145949343-regular",
>       "_score" : 1.0
>     }, {
>       "_index" : "gazetteer",
>       "_type" : "location",
>       "_id" : "adrpnt-0015203925-w147150792-regular",
>       "_score" : 1.0
>     }, {
>       "_index" : "gazetteer",
>       "_type" : "location",
>       "_id" : "adrpnt-0016087997-w162848733-regular",
>       "_score" : 1.0
>     } ]
>   }
> }
> 
> 
> 2014-06-06 19:54 GMT+02:00 David Pilato <[email protected]>:
>> The total hit number is really inconsistent:
>> 
>> With one shard you get: 656523
>> With 5 shards you get: 3879
>> 
>> I think you are doing something wrong but I can't tell more without looking 
>> at the full source code.
>> Could you share how you actually execute the query?
>> 
>> Are you sure your Java client is connected to the right instance/cluster?
>> 
>> 
>> -- 
>> David Pilato | Technical Advocate | Elasticsearch.com
>> @dadoonet | @elasticsearchfr
>> 
>> 
>>> Le 6 juin 2014 à 19:49:47, Дмитрий Киселев ([email protected]) a 
>>> écrit:
>>> 
>>> This is with 5 shards.
>>> {
>>>   "took" : 81,
>>>   "timed_out" : false,
>>>   "_shards" : {
>>>     "total" : 5,
>>>     "successful" : 5,
>>>     "failed" : 0
>>>   },
>>>   "hits" : {
>>>     "total" : 3879,
>>>     "max_score" : 1.0,
>>>     "hits" : [ {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0016087997-w162848733-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0088827105-n2270743905-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0097856729-n2270743903-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0145983393-w154644839-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0209772668-n1884206099-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0015203925-w147150792-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0017569140-n2495059507-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0071389729-w147150672-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0130455978-w145925771-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0139624280-w147150701-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0079711118-w194531715-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0096243499-w194531714-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0162691059-w164700540-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0202220208-w164698447-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0287053820-n2270743890-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0013765594-w145949343-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0026389358-w147150656-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0093401200-w162848869-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0203517601-n2270743895-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0217217459-n2270743898-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0004074128-w145925740-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0007815983-w175372179-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0039697750-w164700428-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0053473990-w271448695-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0129549665-w162848862-regular",
>>>       "_score" : 1.0
>>>     } ]
>>>   }
>>> }
>>> 
>>> And this is with one shard
>>> {
>>>   "took" : 123,
>>>   "timed_out" : false,
>>>   "_shards" : {
>>>     "total" : 1,
>>>     "successful" : 1,
>>>     "failed" : 0
>>>   },
>>>   "hits" : {
>>>     "total" : 656523,
>>>     "max_score" : 1.0,
>>>     "hits" : [ {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0675290941-w116699544-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0675314442-n1557245109-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0675335611-w210502362-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0675352866-w245359553-regular",
>>>       "_score" : 1.0
>>>     }, {
>>>       "_index" : "gazetteer",
>>>       "_type" : "location",
>>>       "_id" : "adrpnt-0675354643-w235622232-regular",
>>>       "_score" : 1.0
>>>     } ]
>>>   }
>>> }
>>> 
>>> 
>>> 2014-06-06 19:40 GMT+02:00 David Pilato <[email protected]>:
>>>> Can you print also the full response object (toString()) as well?
>>>> 
>>>> -- 
>>>> David Pilato | Technical Advocate | Elasticsearch.com
>>>> @dadoonet | @elasticsearchfr
>>>> 
>>>> 
>>>>> Le 6 juin 2014 à 19:24:00, Дмитрий Киселев ([email protected]) a 
>>>>> écrit:
>>>>> 
>>>>> Yep.
>>>>> 
>>>>> System.out.println(searchQ.toString());
>>>>> 
>>>>> {
>>>>>   "from" : 0,
>>>>>   "size" : 5,
>>>>>   "query" : {
>>>>>     "match_all" : { }
>>>>>   },
>>>>>   "explain" : false,
>>>>>   "fields" : [ ]
>>>>> }
>>>>> 
>>>>> Also, I think it's might be connected with sharding.
>>>>> I've tried to change number_of_shards to 1 and paging starts act as I 
>>>>> expect.
>>>>> 
>>>>> Set number_of_shards to 5 and get 25 hits.
>>>>> Set number_of_shards to 4 and get 20 hits.
>>>>> 
>>>>> It's seems like from and size applied to every shard separately in my 
>>>>> case.
>>>>> 
>>>>> --
>>>>> Thank you for your time. Best regards.
>>>>> Dmitry.
>>>>> --
>>>>> 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 [email protected].
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/elasticsearch/CAA9QNxOjT5wGmris_4uZ8_33uF6d51hzZ3Z%3DUvBKGbRV-YuR2Q%40mail.gmail.com.
>>>>> 
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>> 
>>>> --
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "elasticsearch" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/elasticsearch/p8RWVdqLcoI/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> [email protected].
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/elasticsearch/etPan.5391fd20.12200854.12ee%40MacBook-Air-de-David.local.
>>>> 
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> 
>>> 
>>> --
>>> Thank you for your time. Best regards.
>>> Dmitry.
>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/elasticsearch/CAA9QNxMC59nEgggzTA5eR83ibdCQiV5URr4CkynDH%2B2%2BKY4z7w%40mail.gmail.com.
>>> 
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "elasticsearch" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/elasticsearch/p8RWVdqLcoI/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elasticsearch/etPan.5392006e.4e6afb66.12ee%40MacBook-Air-de-David.local.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> Thank you for your time. Best regards.
> Dmitry.
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/elasticsearch/CAA9QNxM7zdsbSqz6B%3DkB1m0JzDJDXSQUa_UG3qQEH5CH1A0gDg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/DB3A3263-2C87-42CA-981D-3DF747144A95%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to