Bug 26903: Pass record ids and records through to update_index when passed to index_r...
authorNick Clemens <nick@bywatersolutions.com>
Fri, 13 Nov 2020 16:33:40 +0000 (16:33 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 17 Nov 2020 10:51:25 +0000 (11:51 +0100)
commit853a56cc7ae6c089f0f113943b77530d8c3a15c8
treef63d59487b5e08c2be118aca4938413d866b60cf
parent8a955f9a0ac65866541111e6242f2b57e4465ce5
Bug 26903: Pass record ids and records through to update_index when passed to index_records

When both a record and record_id are passed to index_records the data should be passed through
to update_index. We missed copying over the record ids to the variable we use as a check.

To test:
1 - Set searchEngine system preference to Elasticsearch
2 - Reindex your db
3 - Search authorities
4 - Edit a record and add 'testwaffle' to the main heading
5 - Search authorities for 'testwaffle' - no results
6 - Apply patch
7 - Edit the record again, change 'testwaffle' to 'testpancake'
8 - Search authorities for 'testpancake' - result!
9 - Confirm imported authorities and authorities added via Z39 are correctly indexed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SearchEngine/Elasticsearch/Indexer.pm