Paul,
>Hello,
>
>Is it possible to enumerate ALL the documents in a Lucene index, say for
>house-keeping purposes.
Off the top of my head:
for (int docNr = 0; docNr < indexReader.maxDoc(); docNr++) {
if (! indexReader.isDeleted(docNr)) {
Document enumeratedDoc = indexReader.document(docNr);
...
}
}
>Thanks in advance,
My pleasure. It might work, but I may have misspelled something,
and my builtin Java syntax checker has not been used for quite
some time. I'm currently playing with Lucene from jython:
for docNr in range(indexReader.maxDoc()):
if not indexReader.isDeleted(docNr):
enumeratedDoc = indexReader.document(docNr)
...
Have fun,
Ype
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>