You have to update in 1 extra steps: 2.x -> 3.6.2 and then you can use the index in 4.0, because it can read 3.x indexes. To upgrade to Lucene 3.6, download lucene-core-3.6.2.jar and run: $ java -cp lucene-core-3.6.2.jar org.apache.lucene.index.IndexUpgrader <indexDir>
After that the binary index format is on the version number 3.6, which can be read by 4.0. A direct update from 2.x to 4.0 is not possible. Also keep in mind that upgrading the index only updates the index format not its contents. Depending on the analyzers you used, you might need to reindex, because the text analysis will behave different in newer Lucene versions resulting in Queries no longer returning results. To make the used analyzers behave like the ones you used in Lucene 2.4, you have to pass Version.LUCENE_24 as matchVersion parameter to your analyzer. But I still recommend to reindex all your data, especially when the version difference is so big. In that case, you can use the newer Analyzer versions (Version.LUCENE_40). ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: saisantoshi [mailto:saisantosh...@gmail.com] > Sent: Wednesday, January 23, 2013 1:30 AM > To: java-user@lucene.apache.org > Subject: Are Search Index directories backward comptabile? ( when > upgrading to latest lucene version) > > While upgrading from one version to another version ( in our case : 2.4 - > 4.0). > Do we need to flush out the existing search index directory and rebuild new > one. What are the best practices here? Are the existing search index > directories not backward compatible? > > Thanks > Sai > > > > -- > View this message in context: http://lucene.472066.n3.nabble.com/Are- > Search-Index-directories-backward-comptabile-when-upgrading-to-latest- > lucene-version-tp4035494.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org