[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
Thu Mar 23 10:03:17 CET 2023


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

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

--- Comment #12 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 148592
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148592&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>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

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


More information about the Koha-bugs mailing list