Post.search "socke", {:with=>{:user_id=>1}, :page=>1, :per_page=>10,
:field_weights=>{:text=>1, :tags=>100000},
:ranker=>:wordcount, :select=>"*, weight() * 10 + created_at / 100
as custom_weight", :order=>"custom_weight DESC"}irb(main):005:0> Post.find(7552).text.index('socke')
Post Load (1.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1 [["id", 7552]]
=> nil
irb(main):006:0> Post.find(7552).tags.index('socke')
Post Load (0.7ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1 [["id", 7552]]
=> nil
irb(main):007:0> Post.find(7552).text.index('sock')
Post Load (0.6ms) SELECT "posts".* FROM "posts" WHERE "posts"."id" = $1 LIMIT 1 [["id", 7552]]
=> 10251ThinkingSphinx::Index.define :post, with: :active_record, delta: true do
indexes :text
indexes :tags
has :user_id
has :created_at
end
--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
To post to this group, send email to thinkin...@googlegroups.com.
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Thinking Sphinx" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thinking-sphinx/gG9WWQAMV_E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to thinking-sphi...@googlegroups.com.