Create bulk request for one List<LuceneWork> where possible

Description

The bulk API allows to execute several commands in one go, reducing the number of HTTP requests.

In a first step, we can create bulks in the context of one index manager (i.e. per invocation of performOperations(List<LuceneWork> queue, IndexingMonitor monitor). Bulks can also be used across indexes, so in a second step we could bulk on a larger scope (all updates originating from one commit/flush), this will require us to establish some sort of context which is shared between index managers for in the scope of one commit/flush. This issue is to implement the first step.

Note that not all requests are bulkable, most notably not delete-by-query. When encountering such non-bulkable action, the current bulk needs to be issued, that action be executed and a new bulk must be started. Atm. only purge-all is affected by this, so in most cases we can build one bulk per index manager / index type.

Environment

None

Status

Assignee

Gunnar Morling

Reporter

Gunnar Morling

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major
Configure