I am writing a shell script (csh) that has to determine the lucene index version and then based on that it has to upgrade the index to next version. So, if the lucene indices are on 2.x, I have to upgrade the indices to 3.x Finally the indices need to be upgraded to 6.x.
Since upgrading indices is a sequential process(2.x->3.x->4.x->5.x->6.x), I have to know the indices version before hand so that I can set the classpath properly and upgrade.
Please help me on this.