 | IFulltextSessionQueryAsyncTDocument, TResult(IPreparedQueryTDocument, TResult) Method |
Asynchronously executes the given prepared query and returns the list of results
Namespace: SphinxConnector.FluentApiAssembly: SphinxConnector (in SphinxConnector.dll) Version: 6.0.0
SyntaxTask<IList<TResult>> QueryAsync<TDocument, TResult>(
IPreparedQuery<TDocument, TResult> preparedQuery
)
Function QueryAsync(Of TDocument, TResult) (
preparedQuery As IPreparedQuery(Of TDocument, TResult)
) As Task(Of IList(Of TResult))
Parameters
- preparedQuery IPreparedQueryTDocument, TResult
- The query to execute.
Type Parameters
- TDocument
- The type of document to execute a prepared query for.
- TResult
- The type of the result to return.
Return Value
TaskIListTResultThe results of the query.
Exceptions
Example
Suppose you have the following prepared query:
using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
var preparedQuery = new GetMatchingProductsQuery { MatchClause = "my query", Skip = 14, Take = 14 };
var results = await fulltextSession.QueryAsync(preparedQuery).
}
See Also