Hi Alan

Sphinx docs do say that grouping searches (which is what gets used for facets) 
aren't always entirely reliable, but I would expect that to be the case with 
big counts, not small ones. There's definitely nothing obviously wrong in what 
you're doing.

I guess we can start by looking at the generated sql_query value for your 
Product source in config/development.sphinx.conf, but I must admit, I'm not 
expecting that to point out any mistakes either... but let's see.

-- 
Pat

On 29/06/2010, at 7:54 AM, Alan wrote:

> It seems that the facet count issue has popped up from time to time,
> and I noticed that after getting the latest (1.3.17) and running
> against both 0.9.9 and 0.9.8 searchd that facets still occasionally
> return a number of 1 or 2 off. We were previously running an older
> version of TS and it was in that version as well.
> 
>>> Product.search_for_ids :conditions=>{:category=>"Cars", 
>>> :brand_name=>"Honda", :colors=>"Yellow"}
> =>[12345]
> 
>>> Product.facets :facets=>[:colors], :conditions=>{:category=>"Cars", 
>>> :brand_name=>"Honda",  :colors=>"Yellow"}
> => {:colors=>{"Yellow"=>2}}
> 
> #try it without sale_status
>>> Product.facets :facets=>[:colors], :conditions=>{:category=>"Cars", 
>>> :brand_name=>"Honda"}
> => {:colors=>{"Yellow"=>2}}
> 
> Our index looks like:
> class Product
> define_index do
> indexes category.name, :as=>:category, :facet=>true
> indexes brand.name, :as=>:category, :facet=>true
> indexes colors.name, :as=>:colors, :facet=>true #has many
> relationship, I have verified that Yellow shows up once.
> end
> 
> We use standard indexing(no deltas), but we still get some minor
> discrepancies in facet counts. Is there something obvious in my
> example that would account for this? I guess the odd thing is how
> search_for_ids differs from the facets call(one returns two products,
> the other two).
> 
> -- 
> 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.
> 

-- 
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.

Reply via email to