I tried to use Post.search(keyword, :size => 10)
and Post.search(keyword).size(10)
. but non of these will work.
You can specify the size
option with the extended query DSL:
Post.search do
query { string keyword }
size 10
end
Or you can set the :per_page
option
Post.search(keyword, :per_page => 10)
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