DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21189>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21189 Hits.length() returns to large value [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX ------- Additional Comments From [EMAIL PROTECTED] 2003-06-30 18:12 ------- The problem is that, by deleting documents, you're changing the set of documents that the Hits has cached. It's trying to fetch the 101st hit, which, now that 100 hits have been deleted, is now the first hit. There are several ways to do this which won't run into this problem. The simplest is to replace the deleting loop with: reader.delete(new Term("k", "v")); If you really need to delete the results of a query, then do something like: searcher.search(q, new HitCollector() { public void collect(int d, float s) { reader.delete(d); } }; Hits is designed for read-only browsing of results. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]