SphinxConnector.NET 3.12 has been released

by Dennis 15. June 2016 10:26

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

The fluent API has gotten support for the new suggestion feature introduced in the current development branch of Sphinx, memory allocations during logging have been optimized and the SphinxHelper.EscapeString method now also escapes MAYBE.

Additionally, two bugs have been fixed. For details, please refer to the version history.

Tags:

SphinxConnector.NET 3.11 has been released

by Dennis 8. September 2015 11:48

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

Probably the most important change is an updated Sphinx version string parser, now that Sphinx has moved to Git. Before, the Sphinx version string would contain the SVN revision, which SphinxConnector.NET used (in addition to the version) to determine Sphinx capabilities (and certain quirks). Starting from 2.2.10, only the version will be used, previous versions build with the SVN revision will be treated as before, i.e. the SVN revision will be taken into account.

To see the rest of the changes, please refer to the version history.

Tags:

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