Hello, I''m using Sphinx search engine with thinking_sphinx Ruby on Rails plugin to interface with it. I use it as follows: @topics = Topic.search(@search_phrase, :sphinx => {:limit => $SEARCH_TOPICS_PAGE_COUNT, :page => @page,:weights => [100,60,20,20,10]}, :per_page => $SEARCH_TOPICS_PAGE_COUNT, :page => @page) with indexing code in side topic.rb: define_index do indexes title, description indexes comment.description, :as => :comment_description indexes poll.poll_question, :as => :poll_question indexes categories.name, :as => :category_name has created_at,rating_score end it works fine except for weighting! I assume it should give title a weight of 100 as it''s first description 60 and so on... When I search it returns good results but it doesn''t sort it very well according to weighting! so if I have a keyword that exist in one topics title and another topics comment I want the one with the keyword in the title to show first. I might be setting the weights in wrong way? any ideas? Thanks, Tam -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---