다음을 통해 공유


SearchModelFactory.SearchResult<T> Method

Definition

Initializes a new instance of SearchResult.

public static Azure.Search.Documents.Models.SearchResult<T> SearchResult<T> (T document, double? score, System.Collections.Generic.IDictionary<string,System.Collections.Generic.IList<string>> highlights, Azure.Search.Documents.Models.SemanticSearchResult semanticSearch, Azure.Search.Documents.Models.DocumentDebugInfo documentDebugInfo);
static member SearchResult : 'T * Nullable<double> * System.Collections.Generic.IDictionary<string, System.Collections.Generic.IList<string>> * Azure.Search.Documents.Models.SemanticSearchResult * Azure.Search.Documents.Models.DocumentDebugInfo -> Azure.Search.Documents.Models.SearchResult<'T>
Public Shared Function SearchResult(Of T) (document As T, score As Nullable(Of Double), highlights As IDictionary(Of String, IList(Of String)), semanticSearch As SemanticSearchResult, documentDebugInfo As DocumentDebugInfo) As SearchResult(Of T)

Type Parameters

T

The .NET type that maps to the index schema. Instances of this type can be retrieved as documents from the index.

Parameters

document
T

The document found by the search query.

score
Nullable<Double>

The relevance score of the document compared to other documents returned by the query.

highlights
IDictionary<String,IList<String>>

Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query.

semanticSearch
SemanticSearchResult

The semantic search result.

documentDebugInfo
DocumentDebugInfo

Contains debugging information that can be used to further explore your search results.

Returns

A new SearchResult instance for mocking.

Applies to