lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <>
Subject filtering and chaining Collectors
Date Wed, 15 Aug 2018 21:18:21 GMT
We have MultiCollector to enable running multiple Collectors on the same
hits, in sequence for each hit. I think a nice extension would be to enable
filtering so that earlier collectors could reject a hit, preventing later
collectors from seeing it.  This way you could have a post-filter
implemented in one collector, and some other collection, like faceting, in
the next one, that wants to ignore hits that are filtered in this

The implementation idea would be to return a "status" value from
LeafCollector.collect() indicating how to proceed. This could also
naturally be used for early termination (you could have status=TERMINATE |

I was trying to undertsand why this wasn't done before  for early
termination since it seemed so natural to me, and thought - there must be a
reason. But I went and read through (skimmed really) the original
EarlyTerminatingCollector issue ( and didn't see any
discussion of that.

Am I missing something here?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message