This tool keeps only the last commit in an index; for this
reason, if the incoming index has more than one commit, the tool
refuses to run by default. Specify -delete-prior-commits
to override this, allowing the tool to delete all but the last commit.
From Java code this can be enabled by passing true to
IndexUpgrader(Directory,Version,PrintStream,boolean).

Warning: This tool may reorder documents if the index was partially
upgraded before execution (e.g., documents were added). If your application relies
on "monotonicity" of doc IDs (which means that the order in which the documents
were added to the index is preserved), do a full forceMerge instead.
The MergePolicy set by IndexWriterConfig may also reorder
documents.

IndexUpgrader

Creates index upgrader on the given directory, using an IndexWriter using the given
matchVersion. You have the possibility to upgrade indexes with multiple commit points by removing
all older ones. If infoStream is not null, all logging output will be sent to this stream.