mirror of https://github.com/apache/lucene.git
Make SegmentInfos#readCommit(Directory, String, int) public (#14027)
The corresponding readLatestCommit method is public and can be used to read segment infos from indices that are older than N - 1. The same should be possible for readCommit, but that requires the method that takes the minimum supported version as an argument to be public.
This commit is contained in:
parent
80a69348ce
commit
cb4cd024cc
|
@ -3,12 +3,15 @@ Lucene Change Log
|
|||
For more information on past and future Lucene versions, please see:
|
||||
http://s.apache.org/luceneversions
|
||||
|
||||
======================= Lucene 10.0.1 =======================
|
||||
======================== Lucene 10.0.1 =======================
|
||||
|
||||
Bug Fixes
|
||||
---------------------
|
||||
(No changes)
|
||||
|
||||
* GITHUB#14008: Counts provided by taxonomy facets in addition to another aggregation are now returned together with
|
||||
their corresponding ordinals. (Paul King)
|
||||
|
||||
* GITHUB#14027: Make SegmentInfos#readCommit(Directory, String, int) public (Luca Cavanna)
|
||||
|
||||
======================= Lucene 10.0.0 =======================
|
||||
|
||||
|
|
|
@ -284,7 +284,14 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
|
|||
return readCommit(directory, segmentFileName, Version.MIN_SUPPORTED_MAJOR);
|
||||
}
|
||||
|
||||
static final SegmentInfos readCommit(
|
||||
/**
|
||||
* Read a particular segmentFileName, as long as the commit's {@link
|
||||
* SegmentInfos#getIndexCreatedVersionMajor()} is strictly greater than the provided minimum
|
||||
* supported major version. If the commit's version is older, an {@link
|
||||
* IndexFormatTooOldException} will be thrown. Note that this may throw an IOException if a commit
|
||||
* is in process.
|
||||
*/
|
||||
public static final SegmentInfos readCommit(
|
||||
Directory directory, String segmentFileName, int minSupportedMajorVersion)
|
||||
throws IOException {
|
||||
|
||||
|
@ -307,7 +314,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentCommitInfo
|
|||
}
|
||||
|
||||
/** Read the commit from the provided {@link ChecksumIndexInput}. */
|
||||
static final SegmentInfos readCommit(
|
||||
public static final SegmentInfos readCommit(
|
||||
Directory directory, ChecksumIndexInput input, long generation, int minSupportedMajorVersion)
|
||||
throws IOException {
|
||||
Throwable priorE = null;
|
||||
|
|
Loading…
Reference in New Issue