Re: How to limit SimpleCollector at N documents?

2017-08-18 Thread Tod Olson
Thank you, this looks exactly like what I need! -Tod On Aug 18, 2017, at 1:42 AM, Adrien Grand mailto:jpou...@gmail.com>> wrote: You could wrap a collector wrapper (have a look at FilterCollector maybe) that throws a CollectionTerminatedException whenever more than X hits have been collected

Re: How to limit SimpleCollector at N documents?

2017-08-18 Thread Tod Olson
dr, I can't speak authoritatively, but have seen references to leafs in the API documents and am making some inferences. It seems to have to do with how the indexes are organized internally. From that and comments in the LeafReaderContext doc, it seems like search contexts are arranged in a hi