florian95-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Sep-08 10:55 UTC
Group By / Filters with UltraSphinx
Hi, I use last version of UltraSphinx but filters dont work... In my model : is_indexed :fields => [''content'', ''titre'', ''created_at'', {:field => ''lang'', :facet => true, :as => ''lang''}], :delta => true or is_indexed :fields => [''content'', ''titre'', ''created_at'', ''lang''], :delta => true In my controller : @search = Ultrasphinx::Search.new(:query => get_query_by_subject(@subject.id), :sort_mode => ''descending'', :sort_by => ''created_at'', :weights => {''titre'' => 5.0, ''content'' => 2.0}, :page => params[:page] || 1, :filters => {"lang" => "fr"}) Result : UsageError : field "lang" is invalid :conditions => {"lang" => "fr"} doesnt work too. I want to filter my results (lang, country, date, etc...) and group by title. Ultrasphinx doc doesnt speak about that. Just query work ^^ And I dont really understand what are "facets". Can you help me please ? Thank you, Florian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---