Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

Pagination with MultiSearch #891

Open
mengqing opened this issue Oct 14, 2013 · 1 comment
Open

Pagination with MultiSearch #891

mengqing opened this issue Oct 14, 2013 · 1 comment

Comments

@mengqing
Copy link

Hi I'm trying to use pagination on the multi search without any success.

Can anyone point some direction on how this can be achieved?

Thanks

@adamcarlile
Copy link

It currently appears to be broken, however the work around is to explicitly declare the window and page within the search block

options = { load: true, page: (params[:page] || 1), size: 15 }
@search = Tire.search(['index_1', 'index_2'], options) do
  query { string 'search term' }
  from options[:size].to_i * (options[:page].to_i-1)
end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants