Skip to content
Other versions

Loading…

Search configuration parameters

Property Type Description
spring.jpa.properties.hibernate.search Boolean This parameter can be used to disable Hibernate Search completely. This means you won’t be able to search documents or folders. By default, the search engine is enabled.
true

By default, OpenKM updates the search index when each change is committed (write-sync): when a request ends, the change can already be found in the searches. Since 8.2.11, the changes can be queued in the database instead (outbox-polling), and a background process indexes them.

Property Type Description
spring.jpa.properties.hibernate.search.coordination.strategy String How the changes reach the search index.
Allowed values:
- none: the change is indexed on commit (write-sync).
- outbox-polling: the change is saved in the OKM_HSEARCH_OUTBOX_EVENT table, in the same transaction, and indexed in the background.
none

When to use outbox-polling. In installations with many writes, the writes are much faster, because they do not wait for the index commit. The pending changes are kept in the database, so they are not lost on a restart or a crash of Tomcat. In tests with a mechanical disk and 200,000 documents, creating a document was 2 times faster with one client and almost 5 times faster with six, and setting a permission recursively was 12 times faster.

The drawback. A change takes a moment to appear in the searches: usually less than a second, and more under high load. Take it into account if users, scripts or integrations create a document and search for it right away.

Monitoring the queue. With outbox-polling, the OKM_HSEARCH_OUTBOX_EVENT table holds the changes not indexed yet:

  • Pending changes: select count(*) from OKM_HSEARCH_OUTBOX_EVENT where status = 'PENDING'
  • Changes that failed many times: select count(*) from OKM_HSEARCH_OUTBOX_EVENT where status = 'ABORTED'

A failed change is retried after 30 seconds. If the queue keeps growing or there are aborted changes, check the OpenKM log.