How do I get code written for Lucene 1.4.x to work with Lucene 2.x?
The upgrade path for Lucene 2.0 was designed around the notion of clear deprecation warnings. Any code designed to use the APIs in Lucene 1.4.x should compile/function with Lucene 1.9 — however many compile time deprecation warnings will be generated identifying methods that should no longer be used, and what new methods should be used instead. If you have code that worked with Lucene 1.4.x, and you want to “port” it to Lucene 2.x you should start by downloading the 1.9 release of Lucene, and compile the code against it. Make sure deprecation warnings are turned on in your development environment, and gradually change your code until all deprecation warnings go away (the DateField class is an exception, it has not been removed in Lucene 2.0 yet). At that point, your code should work fine with Lucene 2.x. If you are looking at example code (in an article or book perhaps) and just need to understand how the example would change to work with 2.0 (without needing to actually compile it) y
Related Questions
- Why not translate the prototype model written in Excel into the C++ code by hand, employing human experts, such as financial quants or programmers?
- How do you get the error code when an object fails to be written or deleted on the Windows CE-based device?
- How do I get code written for Lucene 1.4.x to work with Lucene 2.x?