searchAfter

open fun searchAfter(after: ScoreDoc?, query: Query, numHits: Int): TopDocs
fun searchAfter(after: ScoreDoc?, query: Query, n: Int, sort: Sort): TopDocs

Finds the top n hits for query where all results are after a previous result (after).

By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.

Throws

If a query would exceed IndexSearcher.getMaxClauseCount clauses.


fun searchAfter(after: ScoreDoc?, query: Query, numHits: Int, sort: Sort, doDocScores: Boolean): TopFieldDocs

Finds the top n hits for query where all results are after a previous result (after), allowing control over whether hit scores and max score should be computed.

By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets. If doDocScores * is true then the score of each hit will be computed and returned. If doMaxScore is true then the maximum score over all collected hits will be computed.

Throws

If a query would exceed IndexSearcher.getMaxClauseCount clauses.