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

            Bug ID: 40577
           Summary: Bulk biblio ES index update after auth change
 Change sponsored?: ---
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Searching - Elasticsearch
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

In C4::AuthoritiesMarc->merge, when merging two authorities (which is also
called after ModAuthority), we check if there are biblios linked with the auth
and if the auth data materialzied into those biblios needs update. If we do
have a "trivial" update of the biblio (lines 1787ff), see below, we index each
biblio on its own:

 if (  !$update
       && $reindex_if_needed
       && $syspref_include_see_from )
 {
       my $indexer = Koha::SearchEngine::Indexer->new( { index =>
$Koha::SearchEngine::BIBLIOS_INDEX } );
       $indexer->index_records( $biblio->biblionumber, "specialUpdate",
"biblioserver" );
 }

This will create one background job per biblio.

But we could easily just create on background job for all those modifications,
which should improve performance.

I'm proposing a very small change, where instead of calling
indexer->index_records, we push $biblio->biblionumber on an array. And after
looping through all the biblios, we create one index job using that array.

If there is some consensus that that's a good idea, I can implement it and
write a test plan...

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to