Search indexing failures
A node that is not in the search index does not cause any visible error: it simply does not show up in the searches. Available at Administration > Statistics > Search Indexing Failures, this feature lists the nodes affected, so the administrator can find out and act before a user misses a result:
- Nodes that could not be indexed. When indexing fails, the error is registered with the node UUID and path, the cause and the error date. A node keeps a single entry, the latest one.
- Nodes that the nightly Search Index Check task did not find in the search index (see below).
- To search, fill in the Filter by UUID, name or message field and click the search icon. The filter is case-insensitive and matches any part of the node UUID, the document name or the error message.
- Click the info icon to view the details, including the stack trace.
- Click the delete icon to delete the entry only, without touching the node.
- Click the Delete all button to delete every entry shown by the current filter (all of them, not only the current page).
Once the cause is fixed, index the nodes again with Rebuild Indexes, linked from the page itself.
Nightly search index check
Section titled “Nightly search index check”The Search Index Check task runs every day at 23:30 (see Built-in crontab tasks) and compares the search index with the database:
- For each node type (documents, folders, emails and records) and tenant, it compares how many nodes there are in the database and in the search index. A difference is counted again one minute later, so that the changes being indexed at that moment are not reported.
- It looks for up to 1,000 nodes of each type modified between 25 and 1 hours ago in the search index, to tell which ones are missing. The last hour is left out, as those changes may still be waiting to be indexed.
What it finds is registered on this page. Every day at 00:00, the Search Indexing Issues task emails the administrator a report with the entries of the previous day and stores it in Repository Reports.
Search index not writable
Section titled “Search index not writable”The most common cause of indexing failures is that the user running OpenKM cannot write in the search index directory (repository/index). It usually happens after starting OpenKM once with another user, such as root, which leaves index files the usual user cannot write.
- At startup, OpenKM checks the index directory before opening it. If there are files or folders it cannot write, the log shows an ERROR from
com.openkm.search.IndexDirectoryCheckwith the user, the first files affected with their owner, and how to fix it. When the whole index is affected, OpenKM does not start; this ERROR is the first one in the log and explains why. - While the problem lasts, the administration home page shows the Search index not writable warning below the menu. It disappears as soon as the permissions are fixed, without restarting.
To fix it, stop OpenKM and give the files back to the user that runs it:
- On Linux, for example:
chown -R openkm /opt/tomcat/repository/index - On Windows, give the account that runs the OpenKM service write permission on the folder and its contents.