So you've got a MultiReader over some number of indexes, and in order to delete stuff matched with that MultiReader you need an IndexWriter for the specific index that holds the selected term. In Lucene 4.0. Is that right?
There are getSequentialSubReaders() and readerIndex(int docID) methods in the MultiReader hierarchy, and a directory() method in DirectoryReader, but that's pretty convoluted and readerIndex is protected so it may not work anyway. There's probably an easier way but I can't see it. Could you just loop round the indexes individually, opening a single reader on them one at a time? -- Ian. On Mon, Sep 24, 2012 at 12:21 PM, Naber, Peter <peter.na...@alfa.de> wrote: > Hi, > > to migrate my lucene application to the new lucene Version I have to change > all deprecated function to the recommended functions. > Now I am looking for a solution to migrate the > "multireader.deleteDocuments(Term)" to "IndexWriter.deleteDocuments(Term)" > easy. > The program has a maintenance run, which will read all Terms with a > multireader and look if the original source file at the filesystem exists. If > not, the Term will be delete. > Per Quarter of a year, a new index is created. > How can I determine the place of the Index in the Filesystem of a Term, to > open the right index with IndexWriter to delete the Term with Indexwriter ?? > > > > > > --------------------------------------------------------------------- > 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