Delete / unpublish not removing node from search index

ben.scott - September 8, 2009 - 10:33
Project:Search Lucene API
Version:6.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

If I delete / unpublish a node, it still remains in the search results. If the node's deleted, the search results have 'Page not found' and 'The contents of the page could not be retrieved'.

There seems to be an issue with _luceneapi_node_delete_document($index, $node) not deleting from the index. Any ideas how I can fix this?

Thanks for any help,

Ben

#1

cpliakas - September 8, 2009 - 14:21

Hi Ben.

This is a big problem and I will look into it as soon as I can to see if I can replicate the behavior you described. I am getting my feet back on the ground after Drupalcon Paris, so it may take me a couple of days to post my findings. Any help in determining the cause would be greatly appreciated.

Thanks for posting,
Chris

#2

ben.scott - September 8, 2009 - 16:13

Hi Chris -

Hope you had a great time at Drupalcon Paris!

I think I've tracked down the bug - just need to commit changes to the index when stuff's deleted. I've attached a patch which fixes it for me.

Cheers,

Ben

AttachmentSize
commit.patch 179 bytes

#3

cpliakas - September 10, 2009 - 18:03
Status:active» needs review

Thanks for the patch! I will test it out to see if it has any unintended consequences, but I don't suspect that it will.

#4

cpliakas - September 13, 2009 - 19:48

The fix has been committed to all 1.0 branches of Search Lucene API #262374 #262372. I also added the commit() to a couple other locations in addition to the one submitted in your patch.

I cannot replicate the issue on either my Windows or Linux machine, so if possible it would be great if you or anyone else who is experiencing the problem could test the development snapshot for the 1.0 branch (available on 9/14) which will ultimately become the 1.6 release. I don't like releasing blind, so I will release 1.6 version when I get confirmation that everything worked :-).

In general, the changes are supposed to be committed when the script finishes. The Zend_Search_Lucene class in lib/Zend_Search_Lucene.php defines a destructor method which calls the commit() method. I am curious to know why either the destructor isn't being called or the commit() method is failing in your environment. I guess it is not a major issue, as the fix you submitted should work in all cases and is probably the best solution.

Thanks for your help and for discovering the issue / solution,
Chris

#5

cpliakas - September 24, 2009 - 01:43
Status:needs review» fixed

Marking as fixed, because all my tests have shown that the changes do not break anything, They also work with unit tests in the 2.0 branch. This fix will be reflected in the 1.6 release.

#6

ben.scott - September 25, 2009 - 15:11

Hi Chris -

Sorry for not helping with this: I wasn't following this thread - just came back to check out the new module release and saw your post. But I've just tested the 1.6 version and it's now working perfectly for me - thanks very much.

Cheers,

Ben

#7

cpliakas - September 25, 2009 - 15:13

Ben,

No problem, and thanks for confirming that the release works for you.

~Chris

#8

System Message - October 9, 2009 - 15:20
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.