Bug 30834 - Trigger nightly reindex with a syspref
Summary: Trigger nightly reindex with a syspref
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-24 06:21 UTC by Magnus Enger
Modified: 2025-03-06 23:07 UTC (History)
3 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2022-05-24 06:21:05 UTC
Reindexing (at least with Zebra) leads to search not working for some duration of time, depending on the size of the catalogue. So often you want to do reindexing at night, when use of Koha is low. But remembering to start the indexing process before you go to bed at night is error prone. 

We could have a syspref called something like "DoReindexInTheMiddleOfTheNight", and a cronjob that runs "in the middle of the night", and checks the syspref. 

- If it has been set to "on", a reindex is triggered and the syspref is reset to "off".

- If it is set to "off", nothing happens.
Comment 1 Katrin Fischer 2023-06-18 12:58:16 UTC
I like the idea to make this somewhat available to libraries. Would also be very interesting for Elasticsearch where the users can change indexing in the GUI.
Comment 2 David Cook 2023-06-19 02:03:59 UTC
I don't think we'd want library users to have that kind of power. Reindexing a large collection can take a really long time.
Comment 3 Magnus Enger 2025-03-06 10:27:06 UTC
(In reply to David Cook from comment #2)
> I don't think we'd want library users to have that kind of power. Reindexing
> a large collection can take a really long time.

Yeah, but we would at least be sure it was triggered in the middle of the night. We could perhaps also make the syspref depend on a setting in koha-conf.xml, so that it could be made unavailable to libraries. (See also bug 28990.)

I was also thinking about how to make it possible to check if the reindex succeeded. One way could perhaps be to turn on verbose output, redirect to a file and then make the files viewable with the "Access files" tool.
Comment 4 David Cook 2025-03-06 23:07:16 UTC
(In reply to Magnus Enger from comment #3)
> (In reply to David Cook from comment #2)
> > I don't think we'd want library users to have that kind of power. Reindexing
> > a large collection can take a really long time.
> 
> Yeah, but we would at least be sure it was triggered in the middle of the
> night. We could perhaps also make the syspref depend on a setting in
> koha-conf.xml, so that it could be made unavailable to libraries. (See also
> bug 28990.)

Yeah, I think it would have to be based off something in koha-conf.xml as we'd want to turn it off for our libraries.

Actually, based off the original description, does this need to be something that is web accessible or is this more of a sysadmin thing?