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

--- Comment #42 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 199627
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199627&action=edit
Bug 42508: Support index-specific ES server configuration

This patch allows configuring a dedicated Elasticsearch server for the
patrons index via the existing <elasticsearch> block in koha-conf.xml:

    <elasticsearch>
        <server>127.0.0.1:9200</server>
        <index_name>koha_instance</index_name>
        <patrons_server>patron-es:9200</patrons_server>
    </elasticsearch>

Changes:
- Constructor reads config once and stores it on the instance
- Checks for <{index}_server> key (e.g., patrons_server) to override nodes
- get_elasticsearch_params returns stored config without re-reading
- Falls back to <server> when no index-specific server is configured

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
   k$ prove t/Koha/SearchEngine/Elasticsearch/Indexer/Patrons.t
=> SUCCESS: Tests pass!
3. Verify existing ES biblio/authority search works unchanged
4. Optionally add <patrons_server> to the <elasticsearch> block
5. Rebuild patron index
=> SUCCESS: Uses the separate server
6. Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
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