[Koha-bugs] [Bug 33019] Records not indexed in Elasticsearch ES when first catalogued

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 22 21:53:05 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33019

Aleisha Amohia <aleisha at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #148447|0                           |1
        is obsolete|                            |

--- Comment #10 from Aleisha Amohia <aleisha at catalyst.net.nz> ---
Created attachment 148572
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148572&action=edit
Bug 33019: Make sure ES records are indexed the first time

This patch ensures records are indexed when they are created.
Previously, we were launching the indexer inside of of a transaction.
This meant that the job was being enqueued, but not being found by the
worker, becaue it was not yet in the DB

This patch skips record indexing in the transaction, and moves the indexing
command after

To test:
1 - Make sure you are using ES, and the es indexer is running
2 - tail -f /var/log/koha/kohadev/*.log
3 - Create a new record
4 - Note error in es-indexer-output.log like:
    [2023/03/21 12:22:36] [WARN] No job found for id=157 main::
/kohadevbox/koha/misc/workers/es_indexer_daemon.pl (129)
5 - Apply patch
6 - Create another record
7  There should be no error
8 - Search for the record and confirm it can be found
9 - View the background jobs in admin, confirm the most recent job has
completed

Signed-off-by: Aleisha Amohia <aleishaamohia at hotmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list