Getting more than 10 results with Chewy Gem - ElasticSearch & Rails -


with chewy gem, if run:

myindex.filter{attribute1?}.count 

it return 10 occurences.

i know elasticsearch default , have read this question, says should set param size on url big number, occurrences.

the problem can't seem find set url params request elasticsearch server on chewy gem, request one, internally:

localhost:9200/foo/_search?size=500000... 

update:

well... minutes after i've posted question, seem have found solution. if use limit function this:

myindex.filter{attribute1?}.limit(100000000).count 

i seem number of occurences expecting. ask, right way?

you can confirm default limit , find more information referring docs on elasticsearch's , size params.

if wondering whether there way retrieve results matching particular query without specifying arbitrary large constant, not think there is.

looking @ chewy gem's github repo , examples have in readme, using .limit(s) , .offset(f) correct way of getting , size params in actual elasticsearch request chewy make.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -