# Confused result sets: total hit is equal to 1 but but "hits" is an empty JSON list

**URL:** https://discuss.elastic.co/t/confused-result-sets-total-hit-is-equal-to-1-but-but-hits-is-an-empty-json-list/5538
**Category:** Elasticsearch
**Created:** [October 7, 2011, 10:19am UTC](https://discuss.elastic.co/t/confused-result-sets-total-hit-is-equal-to-1-but-but-hits-is-an-empty-json-list/5538 "2011-10-07T10:19:20Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pcdinh](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@pcdinh](https://discuss.elastic.co/u/pcdinh)
#### Post date: [October 7, 2011, 10:19am UTC](https://discuss.elastic.co/t/confused-result-sets-total-hit-is-equal-to-1-but-but-hits-is-an-empty-json-list/5538/1 "2011-10-07T10:19:20Z")

</div>

Hi,

I just upgraded my ES to 0.17.8 from 0.17.7 successfully. However, I got an  
issue with the response

root@es1:~$  
root@es1:~$ curl -XGET [http://localhost:9200/atest/exp/\_search?pretty=true](http://localhost:9200/atest/exp/_search?pretty=true)  
-d'{

> "fields":[  
> "account\_id"  
> ],  
> "query":{  
> "query\_string":{  
> "use\_dis\_max":true,  
> "fields":[  
> "names"  
> ],  
> "query":"phuongthao.le"  
> }  
> },  
> "from":30,  
> "size":20  
> }'  
> curl: /opt/lib/libcurl.so.4: no version information available (required by  
> curl)  
> {  
> "took" : 24,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 1,  
> "max\_score" : 7.20773,  
> "hits" :   
> }  
> }root@es1:~$

The response gets me confused. It says there is a match (total = 1,  
max\_score: 7.2) but there is no document (hits = )

I have tried another keyword that I know should not have any match

root@es1:~$ curl -XGET [http://localhost:9200/atest/exp/\_search?pretty=true](http://localhost:9200/atest/exp/_search?pretty=true)  
-d'{

> "fields":[  
> "account\_id"  
> ],  
> "query":{  
> "query\_string":{  
> "use\_dis\_max":true,  
> "fields":[  
> "names"  
> ],  
> "query":"xxxxxxxxxxxxxxxxx"  
> }  
> },  
> "from":30,  
> "size":20  
> }'  
> curl: /opt/lib/libcurl.so.4: no version information available (required by  
> curl)  
> {  
> "took" : 2,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 5,  
> "successful" : 5,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 0,  
> "max\_score" : null,  
> "hits" :   
> }  
> }root@es1:~$

The response is OK now. There is no match so total = 0, max\_score is null  
and hits =

So I think that the first query response can be a bug.

There is no exception logged in Elasticsearch log file

[2011-10-07 07:13:33,524][INFO][node] [Big Man]  
{elasticsearch/0.17.8}[16423]: initializing ...  
[2011-10-07 07:13:33,530][INFO][plugins] [Big Man] loaded  
, sites   
[2011-10-07 07:13:37,993][INFO][node] [Big Man]  
{elasticsearch/0.17.8}[16423]: initialized  
[2011-10-07 07:13:37,993][INFO][node] [Big Man]  
{elasticsearch/0.17.8}[16423]: starting ...  
[2011-10-07 07:13:38,289][INFO][transport] [Big Man]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish\_address  
{inet[/10.128.66.251:9300]}  
[2011-10-07 07:13:41,451][INFO][cluster.service] [Big Man]  
new\_master [Big Man][YKOF0nVzTR-9RXt89Kp01w][inet[/10.128.66.251:9300]],  
reason: zen-disco-join (elected\_as\_master)  
[2011-10-07 07:13:41,598][INFO][discovery] [Big Man]  
es1/YKOF0nVzTR-9RXt89Kp01w  
[2011-10-07 07:13:42,132][INFO][http] [Big Man]  
bound\_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish\_address  
{inet[/10.128.66.251:9200]}  
[2011-10-07 07:13:42,132][INFO][node] [Big Man]  
{elasticsearch/0.17.8}[16423]: started  
[2011-10-07 07:13:44,313][INFO][gateway] [Big Man]  
recovered [16] indices into cluster\_state

Regards,

Dinh

---

<div class="post-metadata">

### Author: ![pcdinh](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@pcdinh](https://discuss.elastic.co/u/pcdinh)
#### Post date: [October 7, 2011, 10:31am UTC](https://discuss.elastic.co/t/confused-result-sets-total-hit-is-equal-to-1-but-but-hits-is-an-empty-json-list/5538/2 "2011-10-07T10:31:07Z")

</div>

Just ignore my email. I misunderstand the meaning of "total" field

Thanks

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 3:52am UTC](https://discuss.elastic.co/t/confused-result-sets-total-hit-is-equal-to-1-but-but-hits-is-an-empty-json-list/5538/3 "2017-07-06T03:52:37Z")

</div>


