Getting arrays of nil as search results

4 views
Skip to first unread message

mhodgson

unread,
Jul 25, 2008, 2:30:22 PM7/25/08
to Thinking Sphinx
Hey guys, could use a little insight. I seem to be getting a lot of
searches returning arrays of nil objects. Funny thing is, as soon as I
run the indexer, these go away. My gut says that sphinx must be trying
to return objects that have since been deleted from the database.
Isn't there a callback that tells sphinx that the object is deleted?
Any ideas why this might be broken?

Thanks for your help!

-Matt

Coilcore

unread,
Jul 29, 2008, 3:29:09 AM7/29/08
to Thinking Sphinx
Are you posibly calling #delete or #delete_all? Those methods do not
run the lifecycle callbacks the way #destroy and #destroy_all will.

Coilcore

unread,
Jul 29, 2008, 3:39:16 AM7/29/08
to Thinking Sphinx
Hmm, it occurs to me that the destroy methods would not be able to
modify the index unless the indexer was run. So also make sure you
have delta indexes enabled if you want these changes to appear
automatically.

Though unlike additions, I'm not sure that removing records would
really work with delta indexes, though I've not tried it. Yikes.

ts

unread,
Jul 29, 2008, 7:14:29 AM7/29/08
to thinkin...@googlegroups.com
On Tue, Jul 29, 2008 at 1:09 PM, Coilcore <coil...@gmail.com> wrote:

Hmm, it occurs to me that the destroy methods would not be able to
modify the index unless the indexer was run.  So also make sure you
have delta indexes enabled if you want these changes to appear
automatically.

Though unlike additions, I'm not sure that removing records would
really work with delta indexes, though I've not tried it.  Yikes.

Coilcore: I've observed that calling destroy on an object also removes it from the delta indexes.

-- Srini

mhodgson

unread,
Jul 29, 2008, 10:42:16 AM7/29/08
to Thinking Sphinx
Hmm, so it sounds like we need to hurry up and figure out a good way
to run the delta indexer. I tried it before and it was overwhelmed in
the current implementation because changes were happening so fast.
I'll look into it.


On Jul 29, 7:14 am, ts <sr.ini...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages