# Why all the hits are not displayed ... Do I miss a field in the query

**URL:** https://discuss.elastic.co/t/why-all-the-hits-are-not-displayed-do-i-miss-a-field-in-the-query/13119
**Category:** Elasticsearch
**Created:** [August 8, 2013, 6:51am UTC](https://discuss.elastic.co/t/why-all-the-hits-are-not-displayed-do-i-miss-a-field-in-the-query/13119 "2013-08-08T06:51:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Charles\_Moulliard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles_moulliard/32/1666_2.png) [@Charles\_Moulliard](https://discuss.elastic.co/u/Charles_Moulliard)
#### Post date: [August 8, 2013, 6:51am UTC](https://discuss.elastic.co/t/why-all-the-hits-are-not-displayed-do-i-miss-a-field-in-the-query/13119/1 "2013-08-08T06:51:16Z")

</div>

Hi,

When I run this query against indexes created in my elasticsearch node  
(version 1.0.0.Beta1-SNAPSHOT), I just get some results (10) while the  
number of hits is '105'. Do I miss something (parameter) in the query ?

Query :

curl -XPOST '[http://localhost:9200/\_search?pretty=true](http://localhost:9200/_search?pretty=true)' -d '  
{  
"query" : {  
"matchAll" : {}  
}  
}'

Result :

{  
"took" : 1,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 21,  
"successful" : 21,  
"failed" : 0  
},  
"hits" : {  
"total" : 105,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "aaa",  
"\_type" : "bbb",  
"\_id" : "1",  
"\_score" : 1.0, "\_source" : {"foo":"bar"}  
},  
...

Regards,

Charles

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Rafal\_Kuc\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rafal_kuc_3/32/799_2.png) [@Rafal\_Kuc\_3](https://discuss.elastic.co/u/Rafal_Kuc_3)
#### Post date: [August 8, 2013, 6:55am UTC](https://discuss.elastic.co/t/why-all-the-hits-are-not-displayed-do-i-miss-a-field-in-the-query/13119/2 "2013-08-08T06:55:34Z")

</div>

Hello!

By default ElasticSearch returns only 10 documents from all the ones that were found. You can modify how many documents you want to be returned, look at size and from parameters - [http://www.elasticsearch.org/guide/reference/api/search/from-size/](http://www.elasticsearch.org/guide/reference/api/search/from-size/).

However, remember that fetching too many results with a standard query is not advisable and will result in poor performance. If you wish to fetch all query results you should look at the scroll functionality - [http://www.elasticsearch.org/guide/reference/api/search/scroll/](http://www.elasticsearch.org/guide/reference/api/search/scroll/)

_--_

Regards,

Rafał Kuć

Sematext :: [http://sematext.com/](http://sematext.com/) _:: Solr - Lucene - ElasticSearch_

Hi,

When I run this query against indexes created in my elasticsearch node (version 1.0.0.Beta1-SNAPSHOT), I just get some results (10) while the number of hits is '105'. Do I miss something (parameter) in the query ?

Query :

curl -XPOST '[http://localhost:9200/\_search?pretty=true](http://localhost:9200/_search?pretty=true)' -d '

{

```
 "query" : {

     "matchAll" : {}

 }

```

}'

Result :

{

"took" : 1,

"timed\_out" : false,

"\_shards" : {

```
"total" : 21,

"successful" : 21,

"failed" : 0

```

},

"hits" : {

```
"total" : 105,

"max_score" : 1.0,

"hits" : [ {

  "_index" : "aaa",

  "_type" : "bbb",

  "_id" : "1",

  "_score" : 1.0, "_source" : {"foo":"bar"}

},

```

...

Regards,

Charles

--

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](mailto:elasticsearch+unsubscribe@googlegroups.com).

For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:22am UTC](https://discuss.elastic.co/t/why-all-the-hits-are-not-displayed-do-i-miss-a-field-in-the-query/13119/3 "2017-07-06T02:22:12Z")

</div>


