Megosztás a következőn keresztül:


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);
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.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) 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.

Returns

A new SearchResult instance for mocking.

Applies to