DocumentOperationsExtensions.Suggest Method (IDocumentOperations, String, String, SuggestParameters)
Suggests query terms based on input text and matching documents in the Azure Search index. (see https://msdn.microsoft.com/en-us/library/azure/dn798936.aspx for more information)
Namespace: Microsoft.Azure.Search
Assembly: Microsoft.Azure.Search (in Microsoft.Azure.Search.dll)
Usage
'Usage
Dim operations As IDocumentOperations
Dim searchText As String
Dim suggesterName As String
Dim suggestParameters As SuggestParameters
Dim returnValue As DocumentSuggestResponse(Of T)
returnValue = DocumentOperationsExtensions.Suggest(operations, searchText, suggesterName, suggestParameters)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Suggest(Of T) ( _
operations As IDocumentOperations, _
searchText As String, _
suggesterName As String, _
suggestParameters As SuggestParameters _
) As DocumentSuggestResponse(Of T)
[ExtensionAttribute]
public static DocumentSuggestResponse<T> Suggest<T> (
IDocumentOperations operations,
string searchText,
string suggesterName,
SuggestParameters suggestParameters
)
[ExtensionAttribute]
public:
generic<typename T>
static DocumentSuggestResponse<T>^ Suggest (
IDocumentOperations^ operations,
String^ searchText,
String^ suggesterName,
SuggestParameters^ suggestParameters
)
GenericParameters
- T
The CLR type that maps to the index schema. Instances of this type can be retrieved as documents from the index.
Parameters
- searchText
The search text on which to base suggestions.
- suggesterName
The name of the suggester as specified in the suggesters collection that's part of the index definition.
- suggestParameters
Parameters to further refine the suggestion query.
Return Value
Response containing the suggested text and documents matching the query.
Remarks
The generic overloads of the Suggest and SuggestAsync methods support mapping of Azure Search field types to .NET types via the type parameter T. See GetAsync(String,Generic IEnumerable,CancellationToken) for more details on the type mapping.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012
Target Platforms
See Also
Reference
DocumentOperationsExtensions Class
DocumentOperationsExtensions Members
Microsoft.Azure.Search Namespace