Skip to content

Releases: elastic/elasticsearch-net

1.0.0-beta1

11 Apr 19:11
Compare
Choose a tag to compare

0.12.0.0

02 Dec 21:45
Compare
Choose a tag to compare

It's been a little over a month since the last release but a new release is already long overdue and I have the community to thank for that. A special shoutout to @andreabalducci for single handedly implementing support for function_score queries, @gmarz and @freshmaker74 went and added complete support for all the new suggest features (even the expirimental completion suggest).

I'm very happy to announce that I'll be joining Elasticsearch on the 1st of February to up the ante on writing proper documentation and stabilising the API.

I also like to take this space to thank my current employer Q42 (http://www.q42.nl) who have been nothing but supportive to me and NEST. Q42 gracefully sponsored a day of my time a week to work on NEST.

As always all the 0.12.0 packages are on nuget:

Package Url
NEST http://www.nuget.org/packages/NEST/
NEST.Signed http://www.nuget.org/packages/NEST.Signed/
NEST.Connection.Thrift http://www.nuget.org/packages/NEST.Connection.Thrift/
NEST.Connection.Thrift.SIgned http://www.nuget.org/packages/NEST.Connection.Thrift.Signed/

NDC_London

If you are going to NDC London this week and you are (not) using NEST or Elasticsearch shout at me on twitter (@Mpdreamz) I would love to meet.

Again thank you @Q42 for still letting me go.

New Features

Bug Fixes

  • @Tasteful fixed a bug in one of the overloads of DeleteByQuery() that did not translate types correctly see #399, also fixed analysis information not deserializing properly in the GetSettings() call.
  • @nickcanz fixed some documentation links.
  • Term(lambda, value) no longer requires value to be of type string see #347
  • MatchQuery was a throwing argumentnull exceptions which is not what you want if you use Conditionless queries see #262
  • Fixed monodevelop/xamarin build error and warnings
  • Caught an edgecase in the bool rewriting of queries. See this StackOverflow question for details http://stackoverflow.com/a/20004283/47020 <- also a great read if you want to know how NEST helps you write boolean queries.
  • fixed a bug where using bitwise operators on two filters with different cache settings would apply the same cache settings to both.
  • fixed signed packages being delay signed instead of full #377 (ty @maximpashuk for slap on the wrist).
  • the dynamic property when mapping objects can by true/false or "strict" now see #379
  • When mapping a generic object (using Generic(), a mechanism to map unknown types i.e that plugins expose) a name property was always generated. This can now be turned off see #384
  • refresh and consistency were part of the bulk body but should have been part of the querystring see #394
  • _percolate was available for all bulk actions while it only really applies for index bulk actions.
  • When using IndexMany(BulkParameters<T>) you can now also override the id of the individual objects (Bulk() already allowed for this)
  • fix #402 TermsExecution Enum was missing some members
  • OnFieldsWithBoost on the querystring query now has an overload for specifying strings only.
  • fix min_similarity missing from the FuzzyLikeThis query. see #411

0.11.7.0

31 Oct 22:15
Compare
Choose a tag to compare

This release should fix some of the performance problems that were introduced in 0.11.6.0.

I'd like to take this space to send many thanks to Red Gate and their opensource support programs which allowed me to obtain an OSS license to ANTS Performance and Memory profiler which were very helpful getting this release ready. If you are doing opensource do checkout ossperks.com to see what you are missing out on. Red Gate has for a long time already generously supplied me with a resharper license. Thank you Red Gate 👍

RawClient

This is now generated from the official low level client specification:

https://github.com/elasticsearch/elasticsearch-rest-api-spec

This allows you to go very low level with Elasticsearch if needs must:

post strings:

var jsonAsString = "{ \"json_as_a_string\" : true}";
var result = this._client.Raw.BulkPost(jsonAsString, qs => qs
    .Replication(ReplicationOptions.Async)
    .Refresh(true)
);
StringAssert.EndsWith(":9200/_bulk?replication=async&refresh=true", result.RequestUrl);
Assert.AreEqual(jsonAsString, result.Request);

or anonymous C# objects:

var jsonAsString = "{\r\n  \"json_as_a_string\": true\r\n}";
var result = this._client.Raw.BulkPost(
    new { json_as_a_string = true }
    , qs => qs
        .Replication(ReplicationOptions.Async)
        .Refresh(true)
);

This is just a small sampling check the IRawElasticClient for all the methods it exposes:
https://github.com/Mpdreamz/NEST/blob/master/src/Nest/IRawElasticClient.Generated.cs

Oh and each method has an Async variant!

To be fully low-level client compliant NEST will have to offer some sort of baked in failover support which is high on the backlog for the next release.

Separate signed packages.

For all of you who have enterprise mandates that stipulate only signed assemblies may be used NEST now also has two separate signed packages up on nuget.org for you to use.

http://www.nuget.org/packages/NEST.Signed/
http://www.nuget.org/packages/Nest.Connection.Thrift.Signed/

of course http://www.nuget.org/packages/NEST/ and http://www.nuget.org/packages/Nest.Connection.Thrift/ are also still available.

No more factory dsl nuget pacakge.

The factory dsl was a port of the Java DSL generously donated by @stephenpope, however neither he nor I have had the time to maintain it and NEST itself comes with a great Query DSL already.

For the sake of maintainability and simplicity I've decided to remove support for this package completely.

Bug fixes

  • Some overloads of Alias were not generating the correct JSON.
  • Correction of the the unit option for the GeoDistance filter (changed from 'distance_unit' to 'unit') TY @gmarz!
  • fix #372 if you specify default indices for types to routine that determines won't unnecessarily check and throw and exception if the DefaultIndex is empty.

Please send any bugs/issues/questions to the github issues page!

For those who want the nitty gritty update check the commits starting from the previous release:
0.11.5.0...0.11.7.0

0.11.5.0

10 Oct 09:24
Compare
Choose a tag to compare
  • NEST now supports the term/phrase suggest thanks to the hard work of @freshmaker74 and special shout out to @MaxHorstmann for committing unit/integration tests for the,.
  • @NickCraver fixed the NodeStats() related calls since the elasticsearch response changed somewhere this year to be now one listing per node, not one per index per node.
  • Multisearch did not translate Type's to strings properly (ty @freshmaker74 again!)
  • NEST now comes with an IRawElasticClient which is generated by scanning the java rest source code, this allows us to have a string/object in string/object out (wrapped in a ConnectionStatus object) client. You can new one or get to an instance of this raw client from your IElasticClient i.e:
var connectionStatus = this._client.Raw.SearchPost(index, typeName, json, queryStringParams);
return connectionStatus.Deserialize<QueryResponse<T>>();

Note the json parameter in the previous example can be a string or a plain anonymous C# object.

  • Many underwater fixes related to serializations read more here: #349
  • NEST by default camelCase's propertyNames you can now easily modify this behaviour by calling SetDefaultPropertyNameInferrer() on IConnectionSettings i.e
//Do not do anything to properties
.SetDefaultPropertyNameInferrer(a=>a)

BREAKING CHANGE

Removed IsValid and TryConnect()

The first 2 features of ElasticClient I wrote nearly three years ago which seemed like a good idea at the time. TryConnect() and .IsValid() are two confusing ways to check if your node is up, RootNodeInfo() now returns a mapped response of the info elasticsearch returns when you hit a node at the root (version, lucene_version etc), or you can call client.Raw.MainGet() or perhaps even better client.Raw.MainHead() or even client.Connection.HeadSync("/").

You catch my drift: with so many ways of querying the root .IsValid and TryConnect() is just fluff that only introduces confusion.

NEXT RELEASE

I will "pull an elasticsearch" for the next release and jump to version 0.90.*.* this next release will focus on stabilising the IElasticClient interface and making sure that every method as an *Async variant.

Full list of commits that make up this release:
0.11.4.0...0.11.5.0

0.11.4.0

10 Sep 12:46
Compare
Choose a tag to compare

Mostly only a bug fix release but of a couple that are very noteworthy

  • Fix reliance on patching Uri to set an internal flag to NOT forcefully escape /'s. If you use '/' by default NEST will double escape these to %252F if you are able to set the following config value[see code sample 1] you can disable this double escaping by calling .SetDontDoubleEscapeDotsAndSlashes() on the ConnectionSettings to have the '/' slashes properly encoded as %2F. The patching code taken from http://mikehadlow.blogspot.nl/2011/08/how-to-stop-systemuri-un-escaping.html does not work reliably on Mono, please note that the linked config tweak does not seem to work on mono either so getting '/' properly encoded as '%2F' seems impossible on Mono the default of double escaping them works fine though. The one time reflection hack (from the linked article) sometimes failed on some Mono versions, this should now be fixed.
  • The default Connection always wrapped the async in a thread which is not necessary at all. Nest will now only wrap the async stuff in threads if .SetMaximumAsyncConnections() is set to anything greater then 0. There is now a NoTasksHttpConnection as well which replaces the async routine to one which does't use tasks at all. Both implementations use IO completion ports but the overhead of tasks and yield means that in my first tests the NoTasksHttpConnection is around 1% faster. Many thanks to @henkish for filing #337 and submitting the taskless based async routine !
  • Fix ClusterState API to have Mappings also. ty @Ashwinsa
  • Added Boost method to RangeQueryDescriptor ty @freshmaker74
  • added missing used_in_bytes property on NodeStats (ty @NickCraver for pinging me on twitter)

_Code sample 1_

<uri>
    <schemeSettings>
         <add name="http" genericUriParserOptions="DontUnescapePathDotsAndSlashes" />
    </schemeSettings>
</uri>

0.11.3.0

11 Aug 19:32
Compare
Choose a tag to compare
  • Fix #326 Scroll uses POST since 0.11.2.0 and was incorrectly uriencoding the scroll id
  • #330 added TitleField() to the attachment mapper and MetadaField() to map any metadata string property under attachment fields.
  • #329 CustomScore() was missing a way to specify lang ty @Moran007
  • #327 the Factory DSL (Nest.Dsl.Factory assembly) was missing nested_filter on sort ty @lukapor

Reindex

A popular method on elasticsearch clients in other languages is an easy way to reindex from one index to another using scan, scroll and bulk. NEST now also has support for this:

https://github.com/Mpdreamz/NEST/blob/master/src/Nest.Tests.Integration/Index/ReindexTests.cs

See #328 for more information.

0.11.2.0

26 Jul 13:09
Compare
Choose a tag to compare

This is mainly a bug fix release before I head off on a 2 week holiday 👍

  • #307 adding mean and reverse_mean to terms stat facet order type (thank you @UdiBen)
  • #301 PhoneticTokenFilter.cs - Added replace and encoder JSON properties (thank you @salyh)
  • #313 fixed broken querystring construction on Update call (thank you @picnicbasket)
  • TypeFilter did not mark itself conditionless properly.
  • added ignore_unmapped support to SortDescriptor
  • Improved Highlights API, you can now use results.Highlights[docId][highlightField] or results.DocumentsWithMetadata[N].Highlights
  • Fix #319 nullref when calling CreateIndex with a mapping that manually newed IElasticType objects.
  • Fix #318 Scroll URL length limit
  • Fix #316 bulk update response items were null
  • Fix #303 IndexMany() result in an 411 if IEnumerable is empty
  • Fix #297 Missing Scroll() on IElasticClient
  • Fix #300 Missing MultiGet() on IElasticClient
  • Fix #288 UsePrettyResponses() did not append pretty=true to all the request anymore.
  • Fix #289 MultiSearch did not map errors properly for individual search requests part of the multisearch request.

Thanks to all who committed, fixed and/or reported issues!

0.11.1.0

04 Jul 13:51
Compare
Choose a tag to compare
  • #298 Add support to MultiGet to just have ids and indexName as params (ty @jakobra)
  • #296 don't add port for urls with https scheme (ty @alhardy)
  • #293 Add error handling to GetIndicesPointingToAlias ty (@MaxHorstmann)
  • #290 Sort - Added nested filter and path (Added in 0.90.0.Beta1). (ty @thelalle)
  • #292 Support for /_cluster/state APIs (ty @NickCraver)
  • #284 Added Tokenizer and Filters querystring param to Analyze request (ty @michielpost)
  • Added has_parent query and added score_type to has_child query (ty @q42jaap) (eb997c8)
  • #270 added multi_match support (I actually did something this release ! :))