Thanks Adrien. Looks to be exactly what I need. -- Ian.
On Thu, Dec 19, 2024 at 1:27 PM Adrien Grand <jpou...@gmail.com> wrote: > Hi Ian, > > Indeed Lucene has been maintaining read-only support for 8.x indices > lately, see this method which lets you opt in for this: > > https://lucene.apache.org/core/10_0_0/core/org/apache/lucene/index/DirectoryReader.html#open(org.apache.lucene.index.IndexCommit,int,java.util.Comparator) > . > > So if you don't need adding, updating or deleting documents, this could be > a fit. > > On Thu, Dec 19, 2024 at 1:43 PM Ian Lea <ian....@gmail.com> wrote: > > > Hi > > > > On trying to open an old index using lucene 10.0.0 I'm getting > > this exception: > > > > Exception in thread "main" > > org.apache.lucene.index.IndexFormatTooOldException: Format version is not > > supported (resource > > > > > BufferedChecksumIndexInput(MemorySegmentIndexInput(path="/whatever.../segments_3"))): > > This index was initially created with Lucene 8.x while the current > version > > is 10.0.0 and Lucene only supports reading the current and previous major > > versions. This version of Lucene only supports indexes created with > release > > 9.0 and later by default. > > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:351) > > at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:295) > > at > > > > > org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:88) > > at > > > > > org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:77) > > at > > > > > org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:807) > > at > > > > > org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:110) > > at > > > > > org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:67) > > at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:60) > > > > which is clear enough and I can rebuild but the live indexes are big and > > 24x7 and I'm intrigued by "only supports ... by default". Is there > > something I can do to allow 10.0.0 to read 8.x indexes? That would help > > here. > > > > > > -- > > Ian. > > > > > -- > Adrien >