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
userUserIdWhose conversations to rank, which are the only ones read.
queryTextEmailSearchQueryTextThe validated query.
limitintThe greatest number of conversations to return, at least one.
cancellationTokenCancellationTokenCancels 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
queryTextis null.- ArgumentOutOfRangeException
Thrown when
limitis below one.