setIndexCreatedVersionMajor
Expert: set the compatibility version to use for this index. In case the index is created, it will use the given major version for compatibility. It is sometimes useful to set the previous major version for compatibility due to the fact that IndexWriter.addIndexes only accepts indices that have been written with the same major version as the current index. If the index already exists, then this value is ignored. Default value is the major of the latest version.
NOTE: Changing the creation version reduces backward compatibility guarantees. For instance an index created with Lucene 8 with a compatibility version of 7 can't be read with Lucene 9 due to the fact that Lucene only supports reading indices created with the current or previous major release.
Parameters
the major version to use for compatibility