Skip to main content

Interface: RankedItem<T>

Defined in: src/types/interfaces/ranking.interface.ts:160

Result of ranking an item.

Type Parameters​

• T extends RankableItem

Type of the ranked item

Properties​

features?​

readonly optional features: LTRFeatureVector

Defined in: src/types/interfaces/ranking.interface.ts:196

LTR feature vector (for training data).


fieldMatchScore​

readonly fieldMatchScore: number

Defined in: src/types/interfaces/ranking.interface.ts:182

Field match score (0-1).

Remarks​

Measures how well the item's categories match the user's research fields. 0 = no overlap, 1 = perfect match


item​

readonly item: T

Defined in: src/types/interfaces/ranking.interface.ts:164

The original item.


score​

readonly score: number

Defined in: src/types/interfaces/ranking.interface.ts:173

Combined ranking score (0-1).

Remarks​

Higher scores indicate more relevant results. Score is computed as: (fieldMatchScore * fieldWeight) + (textRelevanceScore * textWeight)


textRelevanceScore​

readonly textRelevanceScore: number

Defined in: src/types/interfaces/ranking.interface.ts:191

Text relevance score (0-1).

Remarks​

Measures how well the item matches the search query. 0 = no match, 1 = exact title match