Table of Contents

Method ReadLexicalRankingAsync

Namespace
MailFathom.Application.Agent.Search
Assembly
MailFathom.Application.dll

ReadLexicalRankingAsync(UserId, EmailSearchQueryText, int, CancellationToken)

Ranks one person's conversations by how well their words match the query.

Task<IReadOnlyList<AgentConversationSearchHit>> ReadLexicalRankingAsync(UserId user, EmailSearchQueryText queryText, int limit, CancellationToken cancellationToken)

Parameters

user UserId

Whose conversations to rank, which are the only ones read.

queryText EmailSearchQueryText

The validated query.

limit int

The greatest number of conversations to return, at least one.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<AgentConversationSearchHit>>

The conversations with a matching entry, best first and more recent first among equals, each at its best-matching entry.

Exceptions

ArgumentNullException

Thrown when queryText is null.

ArgumentOutOfRangeException

Thrown when limit is below one.