Click or drag to resize

IFulltextSessionQueryTDocument, TResult Method (IPreparedQueryTDocument, TResult)

Executes the given prepared query and returns the list of results

Namespace:  SphinxConnector.FluentApi
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntax
IList<TResult> Query<TDocument, TResult>(
	IPreparedQuery<TDocument, TResult> preparedQuery
)

Parameters

preparedQuery
Type: SphinxConnector.FluentApi.PreparedQueriesIPreparedQueryTDocument, 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

Type: IListTResult
The results of the query.
Exceptions
ExceptionCondition
ArgumentNullExceptionOccurs when preparedQuery is null.
ObjectDisposedExceptionOccurs when the session has already been disposed.
Examples
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 = fulltextSession.Query(preparedQuery).
}
See Also