Search code examples
solrlucenesolr8

How to get the version of lucene index in solr


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


Solution

  • 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