Displaying 3 results from an estimated 3 matches for "score_rev".
2006 Oct 16
10
Sorting by score
Hi I think this is a very easy question but here goes:
I want to sort my results by a boolean field and then by score, I
thought this would be a default configuration but apparently not.
sort_fields = []
sort_fields << Ferret::Search::SortField.new(:sponsored, :reverse =>
:true)
that is my current code, how do iu alter it so that the results are then
sorted by highest score first?
2008 Mar 01
3
Possible bug when creating a Ferret::Search::Sort object?
.../usr/bin/env ruby
require ''rubygems''
require ''ferret''
Ferret::Search::Sort.new
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE,
Ferret::Search::SortField::DOC_ID
],
false
)
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE_REV,
Ferret::Search::SortField::DOC_ID_REV
],
false
)
Ferret::Search::Sort.new(
[
Ferret::Search::SortField::SCORE,
Ferret::Search::SortField::DOC_ID
],
true
)
You should get something like this when creating the last object:
$ruby sort.rb
sort.rb:23: [BUG] Segmentation fault
r...
2007 May 22
1
Bug in Ferret::Search::SortField::SCORE ??
i have been trying to get this to work for a while now. my controller
is
sort = [ Ferret::Search::SortField::SCORE_REV ]
@results = Record.multi_search(params[:search_terms], [ Link, Post,
Event ], {:limit => :all, :sort => sort })
and in my view i just render a conglomeration of the appropriate
partials for each model. it seems that no matter what i do, i can''t get
the results to be ordered by t...