Displaying 1 result from an estimated 1 matches for "find_result".
Did you mean:
findresult
2006 Jul 19
4
sorting and pagination
...t the results sorted by a field called date_registered and have
this working with pagination.
here is what i''m doing at the moment:
################################
acts_as_ferret :fields=> [''short_description'',...,''date_registered'']
def VoObject.find_results(query,page)
sort_fields = []
sort_fields << Ferret::Search::SortField.new("date_registered",
:reverse => :false)
results2 = VoObject.find_by_contents(query,:num_docs=> 2000000,:sort
=>sort_fields )
num = results2.size
if page == 1
page = 0
else
page = (p...