

TopNSortHelper
- Namespace
- Rowles.LeanCorpus.Search.Scoring
- Assembly
- Rowles.LeanCorpus.dll
Heap-based partial sort that returns the top-N elements of a parallel (key, doc) array without materialising a full sort over the input. Complexity: O(n log topN) instead of O(n log n).
internal static class TopNSortHelper
TopNSortHelper
Methods
SelectTopN(ScoreDoc[], double[], int, bool)
Selects the top-N ScoreDocs ranked by
keys.
SelectTopN(ScoreDoc[], string[], int, bool)
String-keyed variant of SelectTopN(ScoreDoc[], double[], int, bool).