So I have this straightforward query that I’m trying to run
Tire.search('posts', :size => 15) do
query{ string '*'}
facet('keywords'){ terms :keywords, :global => true }
end.results.facets['keywords']['terms'].each_with_index{|x, i| puts "#{i} - #{x.inspect}" }
but no matter what I do it keeps returning 10 results
this works correctly though
Tire.search('posts', :size => 15) do
query{ string '*' }
facet('keywords'){ terms :keywords }
end.results.each_with_index{|x, i| puts "#{x.title} - #{i}" } and false
What am I doing wrong?
To control the number of entries in the returned facets,
you need to set the size in the facet definition:
The
sizeparameter for theTire.searchcontrols how many results you want to retrieve.