RailsCasts Pro episodes are now free!

Learn more or hide this

okliv's Profile

GitHub User: okliv

Comments by


i cant get sorting to work for text field (not string one)

in model | ruby
searchable do 
  text :name
in controller | ruby
Sunspot.search(Article) do
  order_by :name, :asc

i have an exception:
Sunspot::UnrecognizedFieldError (No field configured for Article with name 'name')

if i reindex with string :name - it become sortable but i loosing possibility to nGram search on that field

did anyone have same issue and got solution to it?