Hey all, I'm having a problem getting TS to acknowledge
the :field_weights I am setting for my search. I have tried to boil
this problem down to be as simple as possible, but am having a hard
time figuring out where to dig in debugging it. Here is my model:
class Item < ActiveRecord::Base
define_index do
indexes title, :sortable => true
indexes description
indexes item_tags.tag_name, :as => :tag_names
indexes categories.name, :as => :category_names
....
end
...
end
I have a database with a bunch of items, some of which have the word
"bizarre" in their titles, some of which have been tagged as
"bizarre." But I can run either of these two searches and I get
identical results:
Item.search("bizarre", :field_weights => {"title" => 1, "tag_names" =>
20 })
Item.search("bizarre", :field_weights => {"title" => 20, "tag_names"
=> 1 })
I have tried a variety of ideas... increasing and decreasing the
arbitrarily chosen weight of "20", searching with different words,
setting different match modes, using symbols to name the indexes
instead of strings, and even different queries... all for naught. No
matter what I try, I continue to get the same set of results
regardless of my field_weights. I also tried a couple tests using the
set_property version of field weights, and this too had no effect on
my results.
I'm running Sphinx 0.9.8-release (r1371) with a release of TS that I
grabbed a couple months ago (new enough to have grouping working,
0.9.9?).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---