SphinxConnector.NET 4.1 has been released

by Dennis 30. November 2018 15:13

We're pleased to announce that SphinxConnector.NET 4.1 is available for download and via NuGet!

For this release we’ve continued our work on improving performance and reducing memory usage. With the release of .NET Core 2.1 and the introduction of Span and related types, we were able to further improve the work done in 4.0. For example, we are now able to read data from searchd for primitive types more efficiently, namely by reading and converting data directly from the array of bytes instead of creating a string first. We also optimized the process of building JSON path strings within the fluent API, which could be a big source for allocations.

For a full list of changes, please refer to the version history.

Tags:

Announcements

SphinxConnector.NET 3.10 has been released

by Dennis 4. August 2014 16:02

We're pleased to announce that SphinxConnector.NET 3.10 is available for download and via NuGet!

The list of changes is available in the version history.

Tags:

Announcements

SphinxConnector.NET 3.9 has been released

by Dennis 27. February 2014 15:36

We're pleased to announce that SphinxConnector.NET 3.9 is available for download and via NuGet!

This is mainly a maintenance release with bug fixes and a few new features. The complete list of changes is available in the version history.

Tags:

Announcements

SphinxConnector.NET 3.8 has been released

by Dennis 14. November 2013 11:49

The long awaited beta of Sphinx 2.2.1 has just been released, and we're following suit with releasing version 3.8 of SphinxConnector.NET! It is available for download and via NuGet!

SphinxConnector.NET 3.8 contains a bulk of changes to support new features that have been introduced with Sphinx 2.2.1: the support for JSON attributes has been greatly expanded with the newest Sphinx release. New functions like IN, ALL, ANY, and INDEXOF have been added to JSON arrays. These functions are supported through their .NET equivalents via IEnumerable, IList, and SphinxConnector.NET’s In() extension method, e.g.:

using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
    var results = fulltextSession.Query<Product>().
                                  Select(p => new
                                  {
                                      Any = p.JsonTestEntity.Categories.Any(x => x > 2),
                                      All = p.JsonTestEntity.Categories.All(x => x < 5),
                                      IndexOf = p.JsonTestEntity.Categories.IndexOf(1),
                                      In = p.JsonTestEntity.Categories.In(1, 2, 3)
                                  }).
                                  Where(x => x.In).
                                  ToList();
}

Please note that the syntax for IN is a little different for JSON attributes than for MVAs: IN can only be used within SELECT and than be used as a filter in WHERE, instead of using it directly in the WHERE clause.

Other newly supported functions include LEAST, GREATEST, and LENGTH which work with both JSON arrays and MVAs via Min(), Max() and IEnumerable.Count(), ICollection.Count or Length:

using (IFulltextSession fulltextSession = fulltextStore.StartSession())
            {
                var results = fulltextSession.Query<JsonTestObject>().
                                              Select(p => new
                                              {
                                                  Min = p.JsonTestEntity.Categories.Min(),
                                                  Max = p.JsonTestEntity.Categories.Max(),
                                                  Count = p.JsonTestEntity.Categories.Count,
                                              }).
                                              ToList();
            }

Note that LENGTH() has been available since the release of Sphinx 2.1.2.

Another new feature of Sphinx 2.2.1 is the HAVING clause, which is now also supported by the fluent API:

using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
    var results = fulltextSession.Query<Product>().
                                  Match("a product").
                                  GroupBy(p => p.VendorId).
                                  Select(p => new
                                  {
                                      p,
                                      Count = Projection.Count()
                                  }).
                                  Having(p => p.Count > 1).
                                  ToList();
}

The next feature has been supported by Sphinx for some time and can now be used from the fluent API: user variables with IN and NOT IN:

using (IFulltextSession fulltextSession = fulltextStore.StartSession())
{
    var results = fulltextSession.Query<Product>().
                                  Where(p => p.CategoryId.In("@my_user_var")).
                                  ToList();
}

There are a few more new features not mentioned here, which you can find in the version history.

Tags:

Announcements

SphinxConnector.NET 3.6 has been released

by Dennis 13. June 2013 11:02

We're pleased to announce that SphinxConnector.NET 3.6 is available for download and via NuGet!

This release adds support for features that have been added to the current Sphinx development branch (Sphinx 2.2.1). This includes the ability to filter on JSON strings with the native API and support for the new Tf-Idf option, which has been added to both fluent and native API.

The fluent API now also supports the max_predicted_time option (Sphinx 2.1.1) and retrieving predicted metadata values (Sphinx 2.2.1). Additionally a regression in the FlushChanges method has been fixed, where internal exceptions weren't correctly wrapped in a FulltextException.

As always, the complete list of changes is available in the version history.

Tags:

Announcements