如何才能从Elastic search 中获得所有结果,因为结果仅显示限制为10.我收到了这样的问题:
@data = Athlete.search :load => true do
size 15
query do
boolean do
must { string q, {:fields => ["name", "other_names", "nickname", "short_name"], :phrase_slop => 5} }
unless conditions.blank?
conditions.each do |condition|
must { eval(condition) }
end
end
unless excludes.blank?
excludes.each do |exclude|
must_not { eval(exclude) }
end
end
end
end
sort do
by '_score', "desc"
end
end
我已将限制设置为15,但我不想将其设为无限,这样我就可以获得所有数据