Questions on tokenized x untokenized and date sorting

Gents, does this definition will allow me to search inside title,
sub_title and url and sort by score, rank_sort, last_updated_at_sort ?

acts_as_ferret :fields => { :title => {:boost => 2, :store => :yes},
:sub_title => {:store => :yes},
:url => {:store => :yes},
:rank_sort => {:index => :untokenized},
:last_updated_at_sort => {:index =>
:untokenized_omit_norms, :term_vector => :no}},
:remote => true

def rank_sort
begin
return self.rank_links.to_i
rescue
return nil
end
end

def last_updated_at_sort
begin
self.last_updated_at.to_i
rescue
return nil
end
end

On Wed, Mar 28, 2007 at 10:55:07PM +0200, Manoel L. wrote:

Gents, does this definition will allow me to search inside title,
sub_title and url and sort by score, rank_sort, last_updated_at_sort ?

looks good. Be sure to specify :int as the sort type when you sort
by rank_sort or last_updated_at_sort, or left-pad the values to a fixed
length with ‘0’.

Jens


Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[email protected] | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa