Displaying 1 result from an estimated 1 matches for "object_title".
2007 Dec 25
1
Does sort work for strings work?
Hi,
I am trying to get sorting working. I have had success with numbers
but when I try to sort my string fields nothing happens. I am using
the following code:
options = {}
s = Search::SortField.new(''object_title'', :reverse => false)
options[:sort] = s
@index.search_each("my query",options) do |id, score|
puts "-->Document #{id} found with a score of #{score}"
p @index[id].load
end
output:
-->Document 0 found with a score of 0.0534844100475311
{:date=>...