: - check maxDoc() : - iterate from 0 to maxDoc() and process doc if it is not deleted
For the record: that is exactly what MatchAllDocsQuery does ... except that you have an off by one error (maxDoc returns 1 more then the largest possible document number). Even if you don't want the Query API, just use MatchAllDocs to handle the details for you and save yourself some code... Scorer allDocs = (new MatchAllDocs()).weight(searcher).scorer(reader); while (allDocs.next()) { int doc = allDocs.doc() ...do stuff.. } -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]