Click or drag to resize
SphinxClient Class
Provides methods to access the functions offered by Sphinx using the native Sphinx protocol. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  SphinxConnector.NativeApiSphinxClient

Namespace: SphinxConnector.NativeApi
Assembly: SphinxConnector (in SphinxConnector.dll) Version: 3.12.6
Syntax
public sealed class SphinxClient : IDisposable

The SphinxClient type exposes the following members.

Constructors
  NameDescription
Public methodSphinxClient(IPEndPoint)
Initializes a new instance of the SphinxClient class.
Public methodSphinxClient(String, Int32)
Initializes a new instance of the SphinxClient class.
Top
Methods
  NameDescription
Public methodAddQuery
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.
Public methodCode exampleBuildExcerpts(IEnumerableString, String, String)
Builds excerpts for the given documents using the settings from the given index name and inserting the default values for BeforeMatch and AfterMatch before and after the given highlight words.
Public methodBuildExcerpts(IEnumerableString, String, String, BuildExcerptsOptions)
Builds excerpts for the given documents using the settings from the given index name and the given options.
Public methodBuildKeywords
Builds a list of keywords from the given query, using the settings from the specified index.
Public methodClearQueries
Clears the (internal) list of scheduled queries (queries which have been added via AddQuery(String, String, String)).
Public methodClosePersistentConnection
Closes a persistent connection.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFlushAttributes
Causes Sphinx to do an attribute flush.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodCode exampleGetStatus
Gets an array of SphinxStatusInfo instances for each status variable from searchd.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleOpenPersistentConnection
Opens a persistent connection to searchd.
Public methodCode exampleQuery
Sends the specified query to searchd returns its result. 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.
Public methodResetSearchOptions
Resets the search options to their default values and clears field weights, index weights etc.
Public methodRunQueries
Runs the queries which have been added via the AddQuery method.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodCode exampleUpdateAttributesTUpdateable(String, SphinxAttributeUpdateTUpdateable)
Updates attributes for the index with the given name with values from the given sequence of SphinxAttributeUpdateItems.
Public methodCode exampleUpdateAttributesTUpdateable(String, UpdateAttributesOptions, SphinxAttributeUpdateTUpdateable)
Updates attributes for the index with the given name with values from the given sequence of SphinxAttributeUpdateItems.
Top
Properties
  NameDescription
Public propertyConnectTimeout
Gets or sets the connect timeout. Default is 30 seconds.
Public propertyEncoding
Gets or sets the encoding which is used when sending strings to searchd. Default is UTF8.
Public propertyHost
Gets or sets the host on which searchd is running. Default is 127.0.0.1.
Public propertyIPEndpoint
Gets or sets the ip end point of searchd. Alternatively Host and Port properties can be used.
Public propertyIsConnected Obsolete.
Gets a value indicating whether the current instance is connected to Sphinx.
Public propertyPort
Gets or sets the port on which searchd is listening. Default is 9312.
Public propertySearchOptions
Gets or sets the search options which are applied when a query is sent to searchd.
Public propertyCode exampleVersion
Gets or sets the version of Sphinx which this instance will connect to. Default is 2.0.5.
Top
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.
See Also