Hi Chris

.results is a hash, and the most relevant key is :matches, which is an array of 
hashes containing the information about the matching documents. So that's the 
first thing to check (ie: if that's empty, then it's not a TS bug). There may 
also be warnings/errors - I'm not sure if that'll appear in .results, but it 
*should* appear in the logs, so that's another good place to look.

Cheers

-- 
Pat

On 11/07/2010, at 3:23 PM, Chris McCann wrote:

> Pat,
> 
> I've added the .results output to the logging I'm doing but I'm not
> sure what I should be looking for.  If you were trying to solve this
> problem what would you hope to see in that output that would point out
> potential issues?
> 
> Thanks,
> 
> Chris
> 
> On Jul 9, 8:41 am, Pat Allan <[email protected]> wrote:
>> Hi Chris
>> 
>> Unfortunately, I've never seen this problem before... it's certainly an odd 
>> one. I know it's probably hard to reproduce, but if you can log what the 
>> value of Model.search(args).results is, that'd be fantastic - as that's the 
>> raw Sphinx results (as a bundle of hashes and arrays), and should confirm 
>> whether the problem is happening in TS or Sphinx - though I'm pretty certain 
>> it's the latter.
>> 
>> It's probably worth searching/asking on the Sphinx forums as 
>> well:http://sphinxsearch.com/forum/forum.html?id=1
>> 
>> Good luck!
>> 
>> --
>> Pat
>> 
>> On 09/07/2010, at 4:48 PM, Chris McCann wrote:
>> 
>>> We're having an issue in a Rails 2.3.5 app with thinking_sphinx 1.3.16
>>> in terms of inconsistent search results for the same inputs to TS.
>>> We're using MySQL 5.1.41.
>> 
>>> I've checked the parameters passed into the model's .search() method
>>> on every call.  With identical inputs the correct results are usually
>>> returned, but on occasion some of the expected results will be
>>> missing.  This is on a development database that only I am hitting, so
>>> there's nothing happening to the underlying data between these search
>>> calls.
>> 
>>> The development log also shows that sphinx is returning different
>>> results from the same inputs (my debug statements prefaced with >>>):
>> 
>>>>>> search_options    => {:page=>1, :per_page=>10, :sort_mode=>:desc, 
>>>>>> :order=>"created_at", :with=>{:specialty_ids=>[29], :location_ids=>[6, 
>>>>>> 2, 3, 4, 5]}}
>> 
>>>  Sphinx   Querying: ''
>>>  Sphinx (0.002381s)   Found 4 results
>> 
>>>>>> search_options    => {:page=>1, :per_page=>10, :sort_mode=>:desc, 
>>>>>> :order=>"created_at", :with=>{:specialty_ids=>[29], :location_ids=>[6, 
>>>>>> 2, 3, 4, 5]}}
>> 
>>>  Sphinx   Querying: ''
>>>  Sphinx (0.002279s)   Found 0 results
>> 
>>> We are using the :retry_stale => true setting as well.
>> 
>>> I'm at a loss for how to spelunk into the thinking_sphinx code to sort
>>> out what's going wrong.  If anyone has seen this behavior I'd love to
>>> hear what you did to fix or investigate it.  If not, any suggestions
>>> for a way forward to sort this out would be much appreciated.
>> 
>>> Cheers,
>> 
>>> Chris
>> 
>>> --
>>> 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 
>>> athttp://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.

Reply via email to