When deleteing an item, the iten can still be found in the index. it's similar to bug 26507 that reindexing occurs before the item is actually deleted from the db. Working on sumitting a patch.
Created attachment 112030 [details] [review] Index after item deletion
After deleting an item it is still searchable in the index. Similar to bug 26507 where record is reindexed before the database is changed. To test: 1. Delete an item 2. Search the barcode in the main search box. You'll find the original record but wiht hte deleted item missing. 3. Apply patch. 4. Repeat steps 1-2 (with another item). No record should be found.
Can't reproduce using ElasticSearch, is that a specific Zebra problem ?
No we're using ES as well. The issue is in the Koha::Itemm->delete call where indexing takes place before deletion. We're on 20.05.03 and the problem is there. The indexing call is changed in master but the order of events is the same.
Created attachment 112401 [details] [review] Bug 26750: Deleted items not indexed After deleting an item it is still searchable in the index. Similar to bug 26507 where record is reindexed before the database is changed. To test: 1. Delete an item 2. Search the barcode in the main search box. You'll find the original record but wiht hte deleted item missing. 3. Apply patch. 4. Repeat steps 1-2 (with another item). No record should be found. Note to test you have to have the indexer running, not the cron job, and it needs to be running fast so that the index is updated before the delete takes place Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Created attachment 112435 [details] [review] Bug 26750: Deleted items not indexed After deleting an item it is still searchable in the index. Similar to bug 26507 where record is reindexed before the database is changed. To test: 1. Delete an item 2. Search the barcode in the main search box. You'll find the original record but wiht hte deleted item missing. 3. Apply patch. 4. Repeat steps 1-2 (with another item). No record should be found. Note to test you have to have the indexer running, not the cron job, and it needs to be running fast so that the index is updated before the delete takes place Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Logging and item hooks still get necessary info after this and indexing works, nice one!
Pushed to master for 20.11, thanks to everybody involved!
backported to 20.05.x for 20.05.06
doesn't apply cleanly for 19.11.x, please rebase
(In reply to Aleisha Amohia from comment #10) > doesn't apply cleanly for 19.11.x, please rebase This bug was introduced by Bug 23463 so shouldn't exist in 19.11
(In reply to Björn Nylén from comment #11) > (In reply to Aleisha Amohia from comment #10) > > doesn't apply cleanly for 19.11.x, please rebase > > This bug was introduced by Bug 23463 so shouldn't exist in 19.11 Thanks, I'll add this to the bug report.