: I was wondering why there is no search method in lucene Indexsearcher to : search after last reference by passing collector. Say a method with : signature like searchAfter(Query query, ScoreDoc after, Collector results).
searchAfter only makes sense if there is a Sort involved -- either explicitly or implicitly on "score" When you use a Collector, even if your collector produces "ScoreDoc" objects, a subsequent (hypothetical) call searchAfter(Query,ScoreDoc,Collector) would have no idea what the meaning of "after" was for that ScoreDoc. (Even if the ScoreDoc was an instance of FieldDoc that encapsulated the values for the sort fields, it doesn't know what the fieldNames are, or what the comparator/direction to use against those field+values are to know what is "after" them). So from an API standpoint: it just doesn't make any sense. if you want searchAfter functionality along with custom Collector logic, take a look at things like TopFieldCollector.create(...) which you could then wrap in your own Collector. -Hoss http://www.lucidworks.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org