Adds a batch processing mode for Lucene indexes.
Can be controlled by calling DSIndexer.setBatchProcessingMode(boolean).
NB: If you set batch processing mode to true, ensure that you set it to 'false' at the end of the batch to flush any unwritten documents.
The size of the batch can be controlled by setting a numeric value in dspace.cfg for the property: search.batch.documents
By default, the size of the batch is 20 documents.
Additionally, there is the possibility to create a 'delayed index flusher'. If a web application pushes multiple search requests (ie. a barrage or sword deposits, or multiple quick edits in the ui), then this will combine them into a single index update (up to the limit of the batch defined above).
To use the delayed update, set the property 'search.index.delay' in dspace.cfg to the number of milliseconds to wait for an update. eg.
search.index.delay = 5000
will hold a Lucene update in a queue for up to 5 seconds. After 5 seconds - or the batch limit above is reached - all waiting updates will be written to the Lucene index.