 | SphinxClientAddQuery Method |
Adds a new query with the current
SearchOptions to the search request.
If no index name is given, the query will be executed against all indexes. If a comment is
provided it will be written to the query log by searchd.
Namespace:
SphinxConnector.NativeApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxpublic void AddQuery(
string query,
string indexName = "*",
string comment = ""
)
Public Sub AddQuery (
query As String,
Optional indexName As String = "*",
Optional comment As String = ""
)
Parameters
- query
- Type: SystemString
The query to add. - indexName (Optional)
- Type: SystemString
The name of the index to search in. - comment (Optional)
- Type: SystemString
A comment for this query, which will be written to the sphinx query log.
Exceptions
Remarks
Note that the index name is case-sensitive!
After succesful execution, the query is removed from the (internal) list of scheduled queries. In case of an exception, the
query is only removed if the exception was not thrown due to a network problem. In case of a network problem,
you can call
RunQueries to execute the query again or call
ClearQueries to remove all
queries from the list scheduled queries.
See Also