Ok, I stumbled upon this issue, and I'm wondering if this is a bug or
perhaps I'm not using TS correctly. Using the sample data models
below, I get the following behavior(assume I have two shoe sizes "10"
and "10.5", where both are strings).
Product.facets
#returns :shoe_size=>{"10"=>4, "10.5"=>5}
if I then run:
Product.facets :conditions=>{:shoe_size=>"10"}.for.size
I get 9, vs the expected 4.
Any idea why this happens? It's as if facets is doing an exact match,
but when I actually add on as a condition, it seems to do a partial
match?
Perhaps related to this.. Is the with vs condition parameter. Although
I get deprecation warnings about using :with vs :conditions, it seems
as if only :conditions works
**********
class Product
has_many shoe_options
def_index
indexes shoe_options.shoe_size :as=> shoe_size, :facet=>true
end
end
class ShoeOption
belongs_to shoe
end
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---