All,
I'm preparing to upgrade a standalone Solr server from 7.7.3 -> 8.11.2
and I wanted to confirm a few things.
First, I'm assuming that the new server will be willing to open and
modify the existing index after the upgrade, because I haven't seen
anything to suggest that wouldn't be the case, but please let me know if
I'm wrong about that.
Second, I understand that a complete re-index is appropriate, and that
if I were to eventually upgrade to Solr 9 (which is also in the plan), I
would have to ensure that the index has been "properly" upgraded to an
8.x-style index in order for Solr 9 to open it and re-index, etc.
I'm using a Java-based process via SolrJ to perform the re-index. My
re-index process looks something like this:
1. (Optional) solr.deleteByQuery("*:*")
2. for each document :
2a. SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", primary-identifier);
...
2b. solr.add(doc)
Is the above enough to generate a "new" 8.x-style index that will be
acceptable in the future? Is it necessary to perform step (1) and delete
all documents first, or if I freshen ALL documents will I end up with a
completely new index?
Is there a way I can inspect the index afterward to ensure I've been
successful? Some kind of magic-number in file headers or an API call I
can make to ask about the version-ness of the index?
Thanks,
-chris