[Koha-bugs] [Bug 29921] Allow to index in Elasticsearch all records modified since a given date

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Feb 15 08:50:36 CET 2022


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

Julian Maurice <julian.maurice at biblibre.com> changed:

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

--- Comment #2 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 130594
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130594&action=edit
Bug 29921: Allow to index in ES all records modified since a given date

This patch adds an option `--modified-since` to rebuild_elasticsearch.pl
If used, all records modified since the given date will be indexed.

For biblios it uses biblio_metadata.timestamp and items.timestamp
For authorities it uses auth_header.modification_time.

Test plan:
1. Create several biblio records and items at different times (or update
   manually the columns specified above)
2. Look at the records modification time:
    SELECT MAX(GREATEST(bm.timestamp, COALESCE(i.timestamp, 0))) ts
    FROM biblio_metadata bm
    LEFT JOIN items i ON (bm.biblionumber = i.biblionumber)
    GROUP BY bm.biblionumber
    ORDER BY ts
3. Run misc/search_tools/rebuild_elasticsearch.pl -b -v --modified-since
"$DATE"
   $DATE can be a date (YYYY-MM-DD) or a datetime (YYYY-MM-DD HH:MM[:SS])
4. Verify that the correct number of records have been indexed

(do the same for authorities:)
5. Create several authority records at different times (or update
   manually the columns specified above)
6. Look at the records modification time:
    SELECT modification_time FROM auth_header ORDER BY modification_time
7. Run misc/search_tools/rebuild_elasticsearch.pl -a -v --modified-since
"$DATE"
   $DATE can be a date (YYYY-MM-DD) or a datetime (YYYY-MM-DD HH:MM[:SS])
8. Verify that the correct number of records have been indexed

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


More information about the Koha-bugs mailing list