Displaying 3 results from an estimated 3 matches for "name_for_sort".
2007 Jul 13
8
More sorting problems with untokenized index
I''m having problems sorting on untokenized fields. I have one field that
sorts fine, but there are others that seem to sort on a different field.
Here''s the index description:
acts_as_ferret
:remote=>true,:fields=>{:name=>{:boost=>2},:name_for_sort=>{:index =>
:untokenized},
:city=>{:boost=>2}, :city_for_sort=>{:index=>:untokenized},
:state=>{:boost=>2}, :state_for_sort=>{:index=>:untokenized},
:tag_list=>{:boost=>0},:tag_list_for_sort=>{:boost=>0},
:date_summary=>{:boost=>1},...
2007 Nov 16
1
problem with searching plurals (with apostrophe)
...)
i have this
:Stores Model
acts_as_ferret :fields => {:name => { :boost => 2 ,:store => :yes},
:short_desc => { :boost => 1.5,:store =>
:yes },
:tag_list => {:boost => 1 },
:name_for_sort => {:index => :untokenized}
}
and i search using this code in my Stores controller
@products = Store.find_by_contents params[:q].to_s.upcase+"*"
for e.g i have a Stores with name as
"benhank''s coffee outlet"
when i sear...
2007 Jun 15
2
indexed ''text'' (not string) column not used when searching, unless explicitely specified!!
...:type => {:store => :yes},
:extra => {:store => :yes},
:slaves_list => {:store => :yes, :boost => 10 },
:masters_list => {:store => :yes, :boost => 10 },
:function => {:store => :yes},
:name_for_sort=> {:index => :untokenized}
}
TIA
Alain