IndexUpgrader not upgrading indices?

tsuraan <[email protected]>
Newsgroups gmane.comp.jakarta.lucene.user
Message-ID <CALKcMw+V9CEVMokX0EAR+jy-xwMgesxBy5fyOQnW-Eb5jnjoAg@mail.gmail.com>
I have indices that were written with Lucene 9.x and upgraded using
IndexUpgrader to 10.x (along with the code that uses them). When
attempting to add new data to the upgraded indices (using the
IndexWriter.addIndexes method), I'm getting this exception:

```
java.lang.IllegalArgumentException: Cannot use addIndexes(Directory)
with indexes that have been created by a different Lucene version. The
current index was generated by Lucene 9 while one of the directories
contains an index that was generated with Lucene 10
0: org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:3050)
...
```

Do I have to do something more than IndexUpgrader to be able to use my
old indices with new Lucene? I've attached a full verbose log of an
IndexUpgrader run, and it looks like it was successful, but maybe I'm
missing something. Also the full contents of that angry Directory are
pasted in below. Thanks for any help!

-rw-rw-rw- 1 root root    0 Jul  1 00:02 write.lock
-rw-rw-rw- 1 root root 4.6K Aug 17 19:21 _hi7.fdx
-rw-rw-rw- 1 root root 9.1M Aug 17 19:21 _hi7.fdt
-rw-rw-rw- 1 root root  160 Aug 17 19:21 _hi7.fdm
-rw-rw-rw- 1 root root  607 Aug 17 19:21 _hi7.nvm
-rw-rw-rw- 1 root root 771K Aug 17 19:21 _hi7.nvd
-rw-rw-rw- 1 root root 1.7K Aug 17 19:21 _hi7_Lucene104_0.tmd
-rw-rw-rw- 1 root root 492K Aug 17 19:21 _hi7_Lucene104_0.tip
-rw-rw-rw- 1 root root  68M Aug 17 19:21 _hi7_Lucene104_0.tim
-rw-rw-rw- 1 root root  112 Aug 17 19:21 _hi7_Lucene104_0.psm
-rw-rw-rw- 1 root root 121M Aug 17 19:21 _hi7_Lucene104_0.pos
-rw-rw-rw- 1 root root  40M Aug 17 19:21 _hi7_Lucene104_0.doc
-rw-rw-rw- 1 root root 1.9K Aug 17 19:21 _hi7_Lucene90_0.dvm
-rw-rw-rw- 1 root root 3.0M Aug 17 19:21 _hi7_Lucene90_0.dvd
-rw-rw-rw- 1 root root  210 Aug 17 19:21 _hi7.kdm
-rw-rw-rw- 1 root root 1.1K Aug 17 19:21 _hi7.kdi
-rw-rw-rw- 1 root root 271K Aug 17 19:21 _hi7.kdd
-rw-rw-rw- 1 root root 4.6K Aug 17 19:21 _hi7.fnm
-rw-rw-rw- 1 root root  594 Aug 17 19:21 _hi7.si
-rw-rw-rw- 1 root root 1.4K Aug 17 19:22 _hi8_Lucene104_0.tmd
-rw-rw-rw- 1 root root  557 Aug 17 19:22 _hi8.si
-rw-rw-rw- 1 root root  137 Aug 17 19:22 _hi8.nvd
-rw-rw-rw- 1 root root  471 Aug 17 19:22 _hi8_Lucene90_0.dvd
-rw-rw-rw- 1 root root  112 Aug 17 19:22 _hi8_Lucene104_0.psm
-rw-rw-rw- 1 root root 2.6K Aug 17 19:22 _hi8_Lucene104_0.pos
-rw-rw-rw- 1 root root  525 Aug 17 19:22 _hi8_Lucene104_0.tip
-rw-rw-rw- 1 root root  607 Aug 17 19:22 _hi8.nvm
-rw-rw-rw- 1 root root   98 Aug 17 19:22 _hi8.kdd
-rw-rw-rw- 1 root root 4.6K Aug 17 19:22 _hi8.fnm
-rw-rw-rw- 1 root root  402 Aug 17 19:22 _hi8_Lucene104_0.doc
-rw-rw-rw- 1 root root   69 Aug 17 19:22 _hi8.kdi
-rw-rw-rw- 1 root root 1.9K Aug 17 19:22 _hi8_Lucene90_0.dvm
-rw-rw-rw- 1 root root 9.4K Aug 17 19:22 _hi8_Lucene104_0.tim
-rw-rw-rw- 1 root root  157 Aug 17 19:22 _hi8.fdm
-rw-rw-rw- 1 root root  200 Aug 17 19:22 _hi8.kdm
-rw-rw-rw- 1 root root   64 Aug 17 19:22 _hi8.fdx
-rw-rw-rw- 1 root root  798 Aug 17 19:22 _hi8.fdt
-rw-r--r-- 1 root root  306 Aug 19 14:18 segments_eq7


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.