I think I figured out the problem, just not sure on a solution yet.

If my search code looks like this:

filters = Hash.new
filters.merge!({ :deleted => false })
filters.merge!({ :copyrighted => false })
filters.merge!({ :personal => false })
filters.merge!({ :group_private => false })

@results = ThinkingSphinx.search search, :with =>
filters, :retry_stale => true, :match_mode => :any, :per_page =>
@per_page, :page => params[:page]

Basically what I am seeing is that under Sphinx 0.9.9 I get back no
results because not every model has all of those columns being
filtered on.  If I take out the filters and only use the deleted
filter which every model does have then I do get back results.  Under
0.9.8 I am able to use the above filters with no problem and get back
the correct results from all the models whether they have the column
or not.

Any ideas?  Should I not be using filters like this?

Thanks
Ryan


On Oct 7, 1:22 am, Pat Allan <[email protected]> wrote:
> I'm really pulling at straws now... but what happens if you remove the 
> address line in your sphinx.yml? Or change it to 127.0.0.1?
>
> --
> Pat
>
> On 05/10/2010, at 8:52 AM, Ryan wrote:
>
>
>
> > Yeah, no other searchd running after ts:stop.
>
> > Running that via script/console gets me this output:
>
> >>> ThinkingSphinx::Configuration.instance.version
> > => "0.9.9"
>
> > I've still been trying to get it to work on our staging with no luck
> > on 0.9.9.  Its strange since it works so good with 0.9.8.
>
> > On Oct 2, 2:35 am, Pat Allan <[email protected]> wrote:
> >> Hi Ryan
>
> >> Can you run ts:stop, and then confirm that there are no other searchd 
> >> processes running via 'ps aux | grep searchd'?
>
> >> I know it's a little obvious, but doesn't hurt to double check.
>
> >> If that's all fine, what's the output of the following in script/console:
> >>   ThinkingSphinx::Configuration.instance.version
>
> >> Cheers
>
> >> --
> >> Pat
>
> >> On 02/10/2010, at 3:15 AM, Ryan wrote:
>
> >>> All I ever see in searchd.log is messages about rotating index.  In
> >>> searchd.query.log I see the search messages from thinking sphinx even
> >>> though I get back no results.  When I use the search CLI I don't seem
> >>> to see anything in any log file even though I do get results.
>
> >>> My sphinx.yml looks like this:
>
> >>> production:
> >>>  searchd_file_path: "/usr/local/site/staging/indexes/"
> >>>  address: 0.0.0.0
> >>>  log: '/usr/local/websites/staging/site/current/log/searchd.log'
> >>>  query_log: '/usr/local/websites/staging/site/current/log/
> >>> searchd.query.log'
> >>>  pid_file: '/usr/local/websites/staging/site/current/log/
> >>> searchd.production.pid'
> >>>  bin_path: '/usr/local/bin'
> >>>  mem_limit: 256M
>
> >>> I've also tried changing the address to listen as it looks like thats
> >>> what 0.9.9 wants now but still no luck getting results under 0.9.9.
>
> >>> Thanks for you help,
> >>> Ryan
>
> >>> On Oct 1, 6:53 am, Pat Allan <[email protected]> wrote:
> >>>> Hi Ryan
>
> >>>> Is there anything in the searchd.log when you're querying via TS? Is 
> >>>> that any different to what you see with the search CLI tool?
>
> >>>> Also: what's the contents of your config/sphinx.yml file?
>
> >>>> --
> >>>> Pat
>
> >>>> On 30/09/2010, at 4:57 AM, Ryan wrote:
>
> >>>>> Thanks for the reply Pat.  Yeah we tried doing a rebuild with no
> >>>>> luck.  I've tried searching one model or many models and still no
> >>>>> results.  We are indexing about 20 different models currently.
>
> >>>>> Here is an example of one model's define_index that I tried searching
> >>>>> on alone:
>
> >>>>> define_index do
> >>>>>    indexes school.name
> >>>>>    has id, :as => :school_id
>
> >>>>>    set_property :enable_star => 1
> >>>>>    set_property :min_prefix_len => 3
> >>>>>    set_property :delta => true
> >>>>>  end
>
> >>>>> If I search it through the sphinx command line tool I get back results
> >>>>> but when I use thinking sphinx I get back no results with 0.9.9.  Soon
> >>>>> as we switch back to 0.9.8 results show up again in thinking sphinx.
>
> >>>>> Thanks
> >>>>> Ryan
>
> >>>>> On Sep 28, 4:26 pm, Pat Allan <[email protected]> wrote:
> >>>>>> Hi Ryan
>
> >>>>>> I'm going to start with the basics, though I'm sure you've done this 
> >>>>>> already: have you run 'rake ts:rebuild' (or the separate equivalent 
> >>>>>> tasks: ts:stop, ts:in, ts:start)?
>
> >>>>>> If that doesn't help, how many models are you indexing? Can you choose 
> >>>>>> one, search on just that, and tell us what the define_index block for 
> >>>>>> it is?
>
> >>>>>> Cheers
>
> >>>>>> --
> >>>>>> Pat
>
> >>>>>> On 29/09/2010, at 5:03 AM, Ryan wrote:
>
> >>>>>>> We are currently running Thinking Sphinx 1.3.20 and Sphinx 0.9.8 and
> >>>>>>> everything is working great.  We tried upgrading Sphinx to 0.9.9 and
> >>>>>>> every search from thinking sphinx gets no results returned.  I see the
> >>>>>>> search come through in the searchd.query.log.  We also did the same
> >>>>>>> search via command line and sphinx is returning results so it seems to
> >>>>>>> be a problem with thinking sphinx or how we have it configured.
>
> >>>>>>> Are we maybe missing a config file change that needs to happen for
> >>>>>>> Sphinx 0.9.9?
>
> >>>>>>> Thank you for you help.
>
> >>>>>>> --
> >>>>>>> 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 
> >>>>> 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 
> >>> 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 
> > 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.

Reply via email to