2

My use case: I am currently on solr 5.5 and upgrading to solr 8.8

For this, I will need to do re-indexing on all machines where solr is installed. I need to do a check on the index version, if the index is made from the old version, then I will run the re-indexing logic, and if it already is the new version, I will skip the re-indexing.

Is there a way to detect the index version?

NOTE: the config files will already be updated to the new version so cannot use tag from solrconfig.xml

Shreya Patni
  • 64
  • 1
  • 7
  • in your case its a major upgrade...you have re-index all the data... – Abhijit Bashetti Mar 01 '21 at 03:38
  • Yes I understand that, but we want to avoid multiple re-indexing, so have to detect if re-indexing was already done. – Shreya Patni Mar 01 '21 at 09:29
  • It's up to your application or solr client to deal with the indexing logic, and thus to "know" what is indexed and what is to be (re)indexed, when this should happen etc. Now, even if the reindexing is triggered manually, don't you have some data in your database keeping track of (at least) the document's last indexing date ? – EricLavault Mar 01 '21 at 10:12

1 Answers1

2

HTTP GET request to retrive the info :

yoursolrhost:8983/solr/admin/info/system

It would be something like below

http://yoursolrhost:8983/solr/admin/info/system?wt=json
Abhijit Bashetti
  • 8,518
  • 7
  • 35
  • 47
  • 2
    Thank you, but this still detects the version from what is in the configuration files, not the version of the actual physical index – Shreya Patni Mar 01 '21 at 09:30