3.5. Running and configuring entities reindexing

If full-text search was added to the project when some data is already added to the database, then this data should be indexed. You can add entities to the indexing queue with methods of app-core.fts:type=FtsManager JMX-bean. A convenient way to invoke JMX-bean method is JMX Console screen of Administration menu.

JMX-bean app-core.fts:type=FtsManager provides two methods for adding entities to the indexing queue:

  • reindexAll() – synchronously adds entities described in FTS config to the indexing queue. In case of large amounts of data this process can take a lot of time, so using the asyncReindexAll() is recommended.

  • asyncReindexAll() – entities are added to the indexing queue asynchronously in batches with the FtsManager.reindexNextBatch() method. The batch size is defined by the fts.reindexBatchSize configuration parameter. FtsManager.reindexNextBatch() method should be invoked by the scheduled tasks mechanism or by Spring scheduler. Indexing is not performed until indexing queue building is completed.