karmi/tire — Issue #233: how to paginate in DLS?
Author: banditj
Created: 2012-02-06 20:19:35+00:00
State: open

i m using
VProducts.tire.search(@search, :per_page=>Kaminari.config.default_per_page, :page=>params[:page] || 1)
to do regular search with pagination and kaminari

Now VGroups have VProducts
and i would like to search within the products of a group too

@v_products = Tire.search 'v-products' do
query do
string @search
boolean do
must { string 'v_group_id:' + @v_group.id.to_s }
end
end
sort { by :name, 'desc' }
end

This didn't. Next problem will be (if somebody could help me with this):
how do I set page and per_page in the DSL