Table of Contents

Internal classStaticInternal 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

Public methodStatic SelectTopN(ScoreDoc[], double[], int, bool)

Selects the top-N ScoreDocs ranked by keys.

Public methodStatic SelectTopN(ScoreDoc[], string[], int, bool)

String-keyed variant of SelectTopN(ScoreDoc[], double[], int, bool).