Hey Pat, thanks for your response. Too bad you can't help – that's what I feared. :-) I'll try to investigate when I come back to the bug and I'll let you know if it's a bug in TS/Riddle that I can reproduce.
Cheers, - Clemens Clemens Kofler http://www.railway.at [email protected] railway - welcome aboard! On Feb 14, 2011, at 1:26 AM, Pat Allan wrote: > Hi Clemens > > Sorry it's taken me so long to get back to you on this. Unfortunately, I > don't think I'm much help... I've no idea why the query for two facets > doesn't work - there's a scenario for that in TS's feature set, which I just > ran against 1.10-beta again just to make sure - it's green. > > Debugging facet counts is messy via email... happy to investigate on my > machine if you're willing to go that far - that said, you seem to have a good > understanding of how TS and Sphinx work, so not sure if that's worth the > effort. > > I guess I'd begin by choosing one query that's returning the wrong results, > and then checking the raw Sphinx results and the index SQL query to make sure > at each stage we're getting the results we actually want. > > -- > Pat > > On 04/02/2011, at 9:57 PM, Clemens Kofler wrote: > >> Hi, >> >> I'm having strange issues with facets after updating to Sphinx 1.10 >> beta (including a little hack – I'll come to that in a second). >> >> Here's roughly what's happening (on the console, but it's the same via >> the web): >>>> Product.facets(:facets => [:category_path, :brand]) >> Riddle::ResponseError: No response from searchd (status: , version: ) >> from /Users/clemens/.rvm/gems/ruby-1.8.7-p302@rpx/gems/riddle-1.2.2/ >> lib/riddle/client.rb:611:in `request' >> ... >>>> Product.facets(:facets => :brand) >> => {:brand=>{2583853161=>63, ... } >>>> Product.facets(:facets => :category_path) >> => {:category_path=>{"2087,2173"=>1, ... } >> >> So I can get both facets separately with no issues but if I try to >> query them at once it doesn't work. >> >> Here's the index and the aforementioned hack as well as my stab at >> "treed facets": https://gist.github.com/810978 >> >> A word on the structure of categories: Each product belongs to a >> category and categories are part of a tree where I also store the path >> (say, Electronics > Computers > Portable could be ids 1, 2 and 3, so >> the path would be 1,2,3). The first MVA is so I can use it in a filter >> (:with => { :category_ids => [1] } should return all products >> categorized in category 1 and any of its children), the second MVA is >> so I can re-create the tree from the facet without having to >> instantiate products/categories (can't do that with the first MVA >> because it sorts the ids so a path of "1,100,10" would become >> "1,10,100" which is not the correct tree structure anymore and >> therefore messes up my facets). >> >> I mention this because another problem happens here: Facet counts get >> messed up because some records don't seem to be counted in the facets >> although they are (or should be) in the index. For example, the facet >> value for a (parent) category named "Accessoires" might be 15 but when >> I search with the same parameters I get 16 hits. It's not an off-by- >> one error because for other facets there are different error margins. >> I've tried debugging it by taking a look at the index SQL but the only >> thing I see in common is that the CRC32 of the missing records seems >> different: >> "22,25" => 3446997767 >> "22,28" => 3015999418 >> "22,29" => 3301134124 >> but >> "22,27" => 595288619 >> >> It seems that the records with the "different" CRC32 values aren't >> picked up by the facets. I've tried debugging the shit out of TS ;-) >> and inspected pretty much every step of the facet search and can't >> find the "22,27" value anywhere – I have no idea why it's not there. >> >> The env: >> - Ruby 1.8.7 >> - Rails 3.0.3 >> - Thinking Sphinx 2.0.2 >> - Riddle 1.2.2 >> - Sphinx 1.10-beta >> >> I hope the problems are somewhat clear. I'd be grateful for any >> pointers where to look for errors. >> >> Thanks in advance, >> - C. >> >> -- >> 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. > -- 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.
