I am new to Elastic Search. Is there any way to get all the search results for a search keyword? Elastic Search is limited to 10 or else we can set the size but we need to get the size??
Yes, the default number of search results is 10.
You need to set the size
parameter on the query.
I don't think you an say "all results", though, there must always be a size limit.
If you use the JAVA API you can simple get the total hit number from the SearchResponse
SearchRequestBuilder srb = ..
SearchResponse sr = srb.execute().actionGet();
long totalHits = sr.getHits().getTotalHits();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With