On Sat, 2011-09-17 at 03:57 +0200, Charlie Hubbard wrote: > I really just want to be called back when a new document is found by the > searcher, and I can load the Document, find my object, and drop that to a > file. I thought that's essentially what a Collector is, being an interface > that is called back whenever it encounters a Document that matches a query.
That is correct. It is a simple API so implementing your own ZIPCollector seems to be the best solution. Partly copied from Trejkaz: class ZIPCollector extends Collector { public void collect(int doc) { addZIPContent(resolveDocumentContent(doc)); } } ZIPCollector collector = new ZIPColelctor(); getSearcher().search(query, filter, collector); --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org