ES response limited to 10

HI,
Once we Index the documents, search on the index is limited to 10.
How can we increase the response limit, or fetch the entire resultset ?

Thanks
saiyan

Default return size is 10.

Fetching the entire result set is not efficient if you have many
documents. The scan search type would be better suited for this task:

--
Ivan

On Tue, Jul 3, 2012 at 12:11 PM, saiyan sadhuajaykumar@gmail.com wrote:

HI,
Once we Index the documents, search on the index is limited to 10.
How can we increase the response limit, or fetch the entire resultset ?

Thanks
saiyan

Thanks Ivan for your reply.

GET http://localhost:9200/twitter/tweet/_search?q=user:ES&size=2

is working fine, but if the same query when given in request body(as below) shows 10 results,

GET http://localhost:9200/twitter/tweet/_search
{
"from" : 0, "size" : 2,
"query" : {
"term" : { "user" : "ES" }
}
}

The same has been tried with search_type options,
guess the size parameter is not being taken from request body.

Thanks

On Wednesday, 4 July 2012 00:46:25 UTC+5:30, Ivan Brusic wrote:

Default return size is 10.

Elasticsearch Platform — Find real-time answers at scale | Elastic

Fetching the entire result set is not efficient if you have many
documents. The scan search type would be better suited for this task:

Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic

--
Ivan

On Tue, Jul 3, 2012 at 12:11 PM, saiyan sadhuajaykumar@gmail.com wrote:

HI,
Once we Index the documents, search on the index is limited to 10.
How can we increase the response limit, or fetch the entire resultset ?

Thanks
saiyan

I use the Java API, so I am not too familiar with the REST syntax.
When in doubt, look at the code on github to find out what parameters
are supported.

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/rest/action/search/RestSearchAction.java
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/search/SearchRequest.java
https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/search/internal/InternalSearchRequest.java

However, reading the class comments of the last class
(InternalSearchRequest), it appears your syntax should be valid. I
would try to do an end-to-end test case and gist the results in case
it is a bug.

Cheers,

Ivan

--
Ivan

On Mon, Jul 16, 2012 at 12:08 AM, saiyan sadhuajaykumar@gmail.com wrote:

Thanks Ivan for your reply.

GET http://localhost:9200/twitter/tweet/_search?q=user:ES&size=2

is working fine, but if the same query when given in request body(as below)
shows 10 results,

GET http://localhost:9200/twitter/tweet/_search

{
"from" : 0, "size" : 2,
"query" : {
"term" : { "user" : "ES" }
}
}

The same has been tried with search_type options,
guess the size parameter is not being taken from request body.

Thanks

On Wednesday, 4 July 2012 00:46:25 UTC+5:30, Ivan Brusic wrote:

Default return size is 10.

Elasticsearch Platform — Find real-time answers at scale | Elastic

Fetching the entire result set is not efficient if you have many
documents. The scan search type would be better suited for this task:

Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic

--
Ivan

On Tue, Jul 3, 2012 at 12:11 PM, saiyan sadhuajaykumar@gmail.com wrote:

HI,
Once we Index the documents, search on the index is limited to 10.
How can we increase the response limit, or fetch the entire resultset ?

Thanks
saiyan