Version History
Version 2.7.0
- General: Added support for new features of Sphinx 2.0.2.
- Native API: Added support for 64-bit MVAs with Sphinx 2.0.2.
-
Native API: Added support for the new expression based ranker introduced in Sphinx 2.0.2.
Example:
1: SphinxClient sphinxClient = new SphinxClient();
2: sphinxClient.SearchOptions.MatchMode = SphinxMatchMode.Extended2;3: sphinxClient.SearchOptions.RankMode = SphinxRankMode.Expression;4: sphinxClient.SearchOptions.RankingExpression =5: "sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25";
- Native API: Added support for new BuildExcerpts flag LoadFilesScattered.
-
Native API: Added a helper class SphinxVersion which contains
System.Version
properties for all supported Sphinx versions.
Usage example:
1: SphinxClient sphinxClient = new SphinxClient();
2: sphinxClient.Version = SphinxVersion.V202;
- SphinxQL: Some small internal fixes due to protocol changes in Sphinx 2.0.2.
Version 2.6.0
- Native API: Added support for Sphinx 2.0.1. When using Sphinx 2.0.1, please assign new Version(2,0,1) to the Version property of the SphinxClient class.
- Native API: Method QueryWithSphinxQL() has been marked as obsolete as it is no longer supported as of Sphinx v2.0.1.
- SphinxQL: As of v2.0.1 Sphinx has server side support for multi-queries (SELECT and SHOW only). When using this version, SphinxConnector.NET's client side support for multi-queries will be automatically deactivated.
- Added methods to convert from radians to degrees and vice versa to the SphinxHelper class.
Version 2.5.0
- SphinxQL: The type used for representing signed and unsigned 64bit integers has
been changed from System.Int64 to System.Decimal.
This is to avoid potential integer overflows with very large 64bit document ids.
Please note that this is a potentially breaking change, and you should check your
code before deploying the new version to production. We're sorry for any inconvience
this causes.
This change does not break any calls to the GetXXX methods of the SphinxQLDataReader class except GetValue(), depending on how the result is used.
It may break existing code in case a DataTable is used and column values are casted to their target types instead of being converted. The latter is also true if you use the GetField<T> extension methods introduced with .NET 3.5.
Examples of method calls that will not break:
1: long value = SphinxQLDataReader.GetInt64("my_big_int_column");
2: long value = Convert.ToInt64(DataTable.Rows[0].Columns["my_big_int_column"]);
3: long value = Convert.ToInt64(SphinxQLDataReader.GetValue("my_big_int_column"));
Examples of method calls that will break:
1: long value = (long) SphinxQLDataReader.GetValue("my_big_int_column");
2:3: Change to:4:5: long value = SphinxQLDataReader.GetInt64("my_big_int_column");
6: or7: decimal value = (decimal) SphinxQLDataReader.GetValue("my_big_int_column");
8: or9: long value = Convert.ToInt64(SphinxQLDataReader.GetValue("my_big_int_column");
10: /*---------------------------------------------------------------------------*/
11: long value = (long) DataTable.Rows[0].Columns["my_big_int_column"];
12: and13: long value = DataTable.Rows[0].GetValue<long>("my_big_int_column");
14:15: Change to:16:17: long value = Convert.ToInt64(DataTable.Rows[0].Columns["my_big_int_column"]);
18: or19: decimal value = (decimal) DataTable.Rows[0].Columns["my_big_int_column"]
20: or21: decimal value = DataTable.Rows[0].GetValue<decimal>("my_big_int_column");
- SphinxQL: Added GetUInt64() method to SphinxQLDataReader.
- SphinxQL: Added UBigInt to SphinxType enumeration.
- Native API: The indexers of SphinxAttributeMatchCollection and SphinxStatusInfoCollection are now case-insentive.
- The documentation can now be installed into the Visual Studio 2010 Help Library.
- Small corrections to logging messages.
- Small updates and corrections to the documentation.
- The installer will now detect and automatically remove earlier versions.
Version 2.4.2
- Fixed a performance regression in the native API, i.e. SphinxClient class, that caused a delay when opening a connection to Sphinx on a (remote) Windows server.
Version 2.4.1
- Fixed exception that would be thrown, in case the NextResult method of the SphinxQLDataReader class was called without reading the complete current result first.
Version 2.4.0
- Added RowUpdating and RowUpdated events to the SphinxQLDataAdapter class.
- Implemented the GetSchema() method in the SphinxQLDataReader class.
- Added support for the command type TableDirect.
- Handling of OutOfMemoryException, StackOverflowException and ThreadAbortException in the SphinxQL implementation has been improved.
- Support for using SphinxQLConnection, SphinxQLDataAdapter and SphinxQLCommand from the Visual Studio designer has been improved.
- A bug in the handling of pooled connections which could cause connections to have an invalid state was fixed.
- Exceptions that occured during a commit or rollback of a TransactionScope weren't logged correctly.
- Committing or rolling back a transaction twice would throw a NullReferenceException instead of an InvalidOperationException.
Version 2.3.0
- SphinxQL: New connection string option Encoding. This option sets the encoding
that is used for both queries and result sets. The option Result Encoding
is now obsolete.
The default encoding is now utf-8. In previous version it defaulted to latin1 which could cause problems because most indexes are configured to use utf-8 as charset type. The reason the encoding has to be configured in the first place, is because Sphinx currently uses a hardcoded value of latin1 for the charset type of SphinxQL result packets. - SphinxQL: All GetXXX() methods of SphinxQLDataReader that take a column name as an argument are now case insensitive.
- SphinxQL: Added property Code to SphinxQLException class which contains the error code returned by Sphinx.
- SphinxQL: Creating a SphinxQLParameter object with a .NET type that has no equivalent
Sphinx type would throw an exception, even if the Sphinx type to use was explicitly
specified, e.g.
double d = 5.0;
var parameter = new SphinxQLParameter("name", d, SphinxType.Float);
This is now fixed. - The behavior of SphinxQLParameterCollection.Add(object value) and Contains(object
value) did not match other data providers:
The given parameter was interpreted as the value, that the Value property of a SphinxQLParameter instance should be set to, i.e. Add() would a create new parameter object with the specified value, and Contains() would check the collection for a parameter with the specified value.
This is the correct behavior according to the documentation of the base class, DbParameterCollection, but other data providers expect value to be an instance of the respective parameter class. Passing a value that is not a SphinxQLParameter, will not throw an exception, but trigger the old behavior and log a warning. This will be removed in a future release. - SphinxQL: SphinxQLConnectionStringBuilder was using the logger of the SphinxQLConnection class.
- SphinxQL: The DbType property of SphinxQLParameter now supports DbType.Int32.
- Some internal optimizations (SphinxQL and native API).
Version 2.2.0
- Native API: Support for new build excerpts options introduced with Sphinx 1.10.1 Beta
- SphinxQL: New connection string option ResultEncoding.
- SphinxQL: Accessing the ServerVersion property of a closed SphinxQLConnection class would throw a NullReferenceException. Now an empty string is returned.
- SphinxQL: The SphinxQLCommand class now supports the StoredProcedure command type. This can be used to call the SNIPPETS() AND KEYWORDS() functions.
Version 2.1.0
- Added support for System.Transactions (TransactionScope)
- New connection string option Enlist
- Fixed a possible NullReferenceException in SphinxQLDataReader.Close()
- The CommandTimeout property of the SphinxQLCommand class threw a NotSupportedException, which caused problems when the class was being used in the Visual Studio designer. Now the property can be assigned to, though it is still not supported.
Version 2.0.1
- Changed sending of command type of queries to accommodate for changes in latest Sphinx trunk revision.
- SphinxConnector.NET now detects automatically whether Sphinx supports the ping command.
- Added property IsConnected to SphinxClient class.
Version 2.0.0
- Full SphinxQL support
- New logging and tracing infrastructure
- An ArgumentOutOfRangeException was thrown in case Sphinx returned an empty result packet. Now a SphinxClientException with the message "Received zero-sized searchd response" is thrown.
- The default port of the SphinxClient class has been changed to 9312.
Version 1.3.0
- Optimizations in the network code which provide significant speed ups in conjunction with persistent connections (especially when Sphinx is not located on the same machine as the calling application).
- Added support for querying Sphinx with SphinxQL. Introduced method QueryWithSphinxQL.
- Added method SphinxHelper.EscapeString.
- Query and AddQuery methods threw an ArgumentException if they received an empty ("") query string as input, although this is a valid query string.
- Added property Encoding to SphinxClient class. If you are using sbcs encoding for one of your indexes, set this property to the appropriate encoding. Default is UTF8.
- Setting the SphinxSearchOptions.SortBy property does not throw an InvalidOperationException anymore, if SphinxSearchOptions.SortMode is set to Relevance. The check has been moved to the query methods of the SphinxClient class.
- Added support for Sphinx 1.10.1 (preliminary) and removed support for Sphinx 0.9.10 (replaced by 1.10.1).
- Added QueryMode and ForceAllWords to BuildExcerptsOptions (introduced with Sphinx 1.10.1).
- Added SphinxException class which all exceptions thrown by SphinxConnector.NET are now derived from.
- Corrected some typos and wrong references in the documentation.
Version 1.2.0
- SphinxSearchOptions.SetFilter() and SphinxSearchOptions.SetFilterRange() threw a NullReferenceException when passing IFilterableType or IRangeFilterableType instead of an implementing type as a parameter.
- Property SphinxOrdinal.SphinxAttributeType of SphinxOrdinal did not return SphinxAttributeType.Ordinal.
- Added method SphinxClient.ClearQueries() to SphinxClient class.
- Implemented operators >= and <= in SphinxInteger, SphinxFloat, SphinxBigInt and SphinxTimestamp.
- The ToString() methods of SphinxTimestamp, SphinxFloat and SphinxBigInt now return an appropriate string representation of the respective type.
Version 1.1.0
- Support for string attributes introduced with Sphinx 0.9.10
- Support for rank modes SPH04 and Total introduced with Sphinx 0.9.10
- Added SphinxClient.FlushAttributes() method (needs Sphinx 0.9.10)
- SphinxInteger can now be assigned to from System.Int32
- SphinxAttributeMatch.ToString() now returns the attribute value(s)
- A SphinxConversionException will now be thrown in case the conversion from a .NET type to a Sphinx type fails
Version 1.0.0
- Initial release.

