For the record, I find this to be an easy way to tell whether your collection is ready for upgrade:
curl "http://host:port/solr/collection/admin/segments" | grep createdVersionMajor | uniq If the createdVersionMajor is at least two behind the version to which you are upgrading, you will need to reindex from scratch (and indeed delete-everything is not sufficient). We generally include reindexing as part of our upgrade procedure so that we will be ready for the next upgrade (so that we can more quickly switch to the next version of Solr software, temporarily running with data from our current version, if that current version is determined to be "too old") -----Original Message----- From: Arrieta, Alejandro <aarri...@perrinsoftware.com> Sent: Thursday, September 5, 2024 7:35 PM To: users@solr.apache.org Cc: solr-user <solr-u...@lucene.apache.org> Subject: [EXTERNAL] Re: How to upgrade a core index to facilitate an upgrade Hello Christopher, Afaik Solr 9 and 8 checks the creation version of the collection/index. Creation version does not change if you empty the collection/index and index again in a newer Solr version. IndexUpgraderTool or changing luceneMatchVersion does not change the creation version either. I checked the binary files when I saw the same issue on Solr 8 and collections/indexes created in Solr4,5 and 6. Solr now supports only collection/index created with Solr-1 versions. Yes,You will need to create a new collection/index in Solr 8 if you plan to use it later on Solr 9. Hope this helps. Alejandro Arrieta On Thu, Sep 5, 2024 at 5:27 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > All, > > I'm looking at migrating from Solr 7.7.3 to Solr 8.11.3 and I can see > that the new version of Solr has no problem reading the old index files. > > When I look forward to 9.6.1, though, I can see that a quick test of > trying to open an index using the Lucene library that ships with Solr > 9.x reports an error: > > org.apache.lucene.index.IndexFormatTooOldException: Format version is > not supported (resource > BufferedChecksumIndexInput(NIOFSIndexInput(path="/var/solr/data/cschultz_patients/data/index/segments_3t0"))): > > This index was initially created with Lucene 7.x while the current > version is 9.10.0 and Lucene only supports reading the current and > previous major versions. This version of Lucene only supports indexes > created with release 8.0 and later by default. > > While Solr 8 is running, I have deleted all documents in the index and > re-indexed all my documents. After that, repeating the test still gives > that error. > > I can see in solrconfig.xml: > > <luceneMatchVersion>7.3.0</luceneMatchVersion> > > I'm guessing that, after migrating to Solr 8.x I could change this to > Lucene 8.whatever and re-index again, but would that have any effect? > > Will I have to actually delete and re-create the core from scratch in > order to get a Lucene-8-created index? > > -chris > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.