rs-pro / mongoid-elasticsearch

DEPRECATED - Consider using SearchKick https://github.com/ankane/searchkick
MIT License
61 stars 23 forks source link

URL parameter 'page' is not supported #9

Closed dangerousbeans closed 10 years ago

dangerousbeans commented 10 years ago

I'm trying to setup pagination, but including the page param is triggering some sort of whitelist.

search_command = { body: search_hash }
search_command.merge!({ page: param_hash[:page], wrapper: :load }) if param_hash[:page]

self.es.search( search_command )
glebtv commented 10 years ago

There is two separate parameter hashes, one for Elasticsearch (it is passed directly to elasticsearch gem) and one for additional mongoid-elasticsearch parameters (pagination, load wrapper, etc)

self.es.search({body: {}}, {page: 1})