Since 4.X Lucene does not read anything pre 3.0 of indexes I tried to come up with ways to move over a 2.9 index into 4.0.
I will first try to explain the issue. The issue is that are legacy system stores information in Lucene going back to 2.4. I know this can causes issues and I have took steps to stop doing this for many parts of the system but not all. One of the reason this is bad is because now we use 4.0 of lucene yet still have 2.9 indexs that need to be able to be read in 4.0. The time consuming way would be for me to write something to create a new 4.0 index and read in each document from 2.9 to create a new document from those fields. This would take some time but doable.
The second solution I came up with and the quick one that seems to work is that I took a 3.4 lucene created a new index and then created a index reader on the 2.9 lucene index and then called addIndexs(2_9Reader) on the 3.4 writer. I moved this 3.4 index into 4.0 and it appears to read and write fine to this index.
The question I had is if this is safe to do? It appears to work as I needed but I'm not sure I understand why it works after going through the addIndexs code.