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

            Bug ID: 42960
           Summary: Database update 25.12.00.059 attempts Elasticsearch
                    mapping update when SearchEngine is Zebra
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: 26.05
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Installation and upgrade (command-line installer)
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]
  Target Milestone: ---

When upgrading a Koha instance to 26.05, db revision 25.12.00.059 (Bug 40658 -
Ensure local-number is sortable) unconditionally instantiates
Koha::SearchEngine::Elasticsearch::Indexer and calls update_mappings().

This happens even when the instance has SearchEngine = Zebra.

On a Zebra-only instance without Elasticsearch configured, koha-upgrade-schema
fails and blocks the entire schema upgrade:

  Upgrade to 25.12.00.059: Bug 40658 - Ensure local-number is sortable
  ERROR: Exception 'Koha::Exception' thrown 'Unable to update mappings for
index "koha_lise_biblios". Reason was: "". Index needs to be recreated and
reindexed'

Reproduced in koha-testing-docker with KOHA_IMAGE=26.05, SearchEngine=Zebra, by
resetting Version to 25.1200058 and setting local-number sort=0.

Expected behavior:
- The DB revision should still set search_marc_to_field.sort = 1.
- Elasticsearch mappings should only be updated if SearchEngine is
Elasticsearch.
- Zebra-only instances should not require Elasticsearch to complete
koha-upgrade-schema.

Proposed fix:
Guard the Elasticsearch mapping update with:

  if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) { ... }

and report that the ES mapping update was skipped otherwise.

-- 
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