public class FullTextIndexer2
extends java.lang.Object
FullTextIndexer
with adequate functionality.
Exists as a stand-in while Hibernate / Spring upgrade issues remain unresolved.
Ignores the 5.4 full-text thread's configuration properties:
omero.search.repetitions
omero.search.reporting_loops
In not using the the 5.4 event log loader also ignores:
omero.search.batch
omero.search.event_log_loader
omero.search.excludes
omero.search.max_partition_size
Further, the value of omero.search.cron
is ignored except for that a blank value still disables the indexing thread.
The start()
and stop()
methods are the means by which Spring controls the indexing thread's lifecycle.
The start()
method schedules the OPTMIIZE Quartz job.
Interplay among the Quartz jobs is:
Constructor and Description |
---|
FullTextIndexer2(org.quartz.Scheduler scheduler,
org.hibernate.SessionFactory sessionFactory,
org.hibernate.search.bridge.FieldBridge bridge,
java.lang.String countKey,
java.lang.String actionsList,
java.lang.String includeTypesList)
Construct a new indexer.
|
Modifier and Type | Method and Description |
---|---|
void |
index()
Index a batch of model objects.
|
void |
note()
Note which event log entries were processed.
|
void |
optimize()
Defragment the search index.
|
void |
prepare()
Query the database for new event log entries indicating model objects to process.
|
void |
purge()
Purge a batch of model objects.
|
void |
setCronExpression(java.lang.String cronExpression) |
void |
start()
Start the indexer.
|
void |
stop()
Stop the indexer.
|
public FullTextIndexer2(org.quartz.Scheduler scheduler, org.hibernate.SessionFactory sessionFactory, org.hibernate.search.bridge.FieldBridge bridge, java.lang.String countKey, java.lang.String actionsList, java.lang.String includeTypesList)
scheduler
- the Quartz scheduler for the indexing jobssessionFactory
- the Hibernate session factorybridge
- the field bridge to set when indexingcountKey
- the name of the configuration key for tracking progress through the event logactionsList
- the event log actions to take note of, comma-separatedincludeTypesList
- the names of the model object classes to index, comma-separatedpublic void setCronExpression(java.lang.String cronExpression)
cronExpression
- the cron expression configured for triggering indexingpublic void start()
public void stop()
public void prepare()
public void index()
public void purge()
public void note()
public void optimize()