Releases: elastic/elasticsearch-net
1.1.0
New Features
Endpoints
- Added support for the multi percolate API
- Added support for alias exist API
- Added support for type exist API
- Added support for the explain API
- Added support for the snapshot status API
- Added support for the indices recovery API
- Added support for the cluster pending tasks API
- Added support for the cluster stats API
- Added support for the node shutdown API
- Added support for the Ping API
- Added missing PutAlias and DeleteAlias() endpoints #933, technically both of these were possible through the
_aliases
API already but we added them in for completion sake - Added support for the template exist API
- Added support for the nodes hot_threads API
- Added support for the search shards API
- Added support for the get repository API
- Exposed
DoRequest()
on the NEST and Elasticsearch.NET clients so that you can hit any url while still taking advantage of the cluster failover and built in response handling #934 - NEST now also support ALL the _cat APIs
Aggregations
- percentile_ranks aggregation support #821
- geo_bounds aggregation support #822
- top_hits aggregation support #930
- reverse nested aggregation support #939
Updated APIs
- Added support for mapping field data formats for fields
- Added support for transform mapping
- Added a MappingVisitor class to walk over any elasticsearch mapping
- MoreLikeThisQuery() now supports
ids
anddocs
properties #894 - Added support for span_multi_term query #896
Bug Fixes
- Fixed an issue with parsing percentiles aggregation that prevented adjacent aggregations not to be parsed correctly #931
- HttpClientConnection (an HttpConnection alternative) now supports compressed responses and basic AUTH #947
- DateExpressionRange was missing the
key
property ty @taschmidt! #938 - Term filters did not serialize enums but only wrote there values reported on reopened #535
- Shard failures on responses did not include the
reason
property #930 - Fix occasions where
Dictionary<valuetype, something>
could not be mapped as object #926 - Elasticsearch.NET client is now generated from the 1.3.2 spec
- IndexOptions enum was missing
Offsets
option, ty @tbrooks007 ! #891 - In the IndicesStats API TypeNameMarker in the querystring were not resolved properly ty @Tasteful #908
- Fix #907
new SearchRequest()
defaulted to all indices whilenew SearchRequest<T>()
defaulted to the configured default index, the latter is now always the default behaviour for any OIS class. - Count() now defaults to GET if no query is specified
- NEST now plays nicely with clusters that have the
rest.action.multi.alow_explicit_index: false
set for the various bulk endpoints (_bulk, _mget, _msearch et all). ty @Tasteful! #870 - Disable proxy detection now defaults to false, this means that NEST plays nicely with Fiddler out of the box. Either defaulting to true or false can cause an initial delay while .NET figures out whether a proxy is configured or not depending on your system, defaulting to false atleast has the added benefit of playing nice with fiddler see #866 for more background.
- A nested filter that only contained filters was marked as conditionless ty @Philo! #881
- NEST still used a special notation for multifield mapping, which meant that while generating the correct json it was hard to parse the mapping json back into C# objects. @Tasteful did an amazing job refactoring the mapping API in a backwards compatible manner so that you can branch off into multi_field mapping from any property mapping. see #885. Amazing work from @Tasteful!
- NEST 1.0 broke the ability to send a verbatim match query #876
- Some unit tests were missing invariant culure ty @Tasteful
- Various query string params were generated with an incorrect key see #858 for more background. ty @lakario for reporting this bug!
- Removed NetReflector as nuget dependency for
Elasticsearch.Net.Connection.Thrift
package - Passing numeric collection to Terms filter and query resulted in a conditionless query #843
- Validated nuget package restore works correctly using all the new nuget goodness in Xamarin 5.3+
- @gmarz went over a great deal of the documentation and updated it to be correct following NEST 1.0. He also included a ton of examples using the object initializer syntax.
- @andersosthus added an advanced aggregation section to the documentation
1.0.2
1.0.1
Bug Fixes
- Fixed SerializationException being thrown when retrieving mappings. TY @johndaniels #829
- Fixed ArgumentNullException being thrown when specifying an id property using the
ElasticType
attribute. #806 - Disable HTTP pipelining since it isn't supported by Elasticsearch. #830
1.0.0
This is the 1.0.0 GA release! We've made some major improvements since the RC, read more about them here. Thank you to everyone who contributed!
Changelog
- Streamlined the Update APIs, improving consistency between the Update API and Bulk Update API and better alignment with the Elasticsearch DSL. #795
- Improved handling of hard exceptions inside async routines, which caused connection failover issues. #803
- Improved support / bug fixes for the
geo_shape
query and filter #788 - Added attribute mapping support for the
geo_shape
type. 72057a8 - Fixed
function score
queries so that filters can be applied to all function types. #799 - Added
score_mode
option toRescore
. 79acfeb - Fixed invariant culture issue with percentile aggregations. Thank you andersosthus #793
- Serialize
sorts
as array instead of dictionary according to the ES REST Spec. #804 - Added support for
sort_mode
to all sort types. #770 - Fixed bug when mapping
store
via theElasticProperty
attribute. fc512db - Fixed async exceptions not bubbling up appropriately. dbdafae
- Exposed the option to enable/disable automatic proxy detection 9797369
- Replace confusing
ToggleSort()
method withOrder()
on sort descriptors #764 - Fixed deserialization of
GeoBoundingFilter
not using invariant culture. We now also force invariant culture on all strings formatted with the.F()
extension method. - File contents were switched in GeoPointMappingDescriptor and GeoShapeMappingDescriptor. Thank you andersosthus #774
- Removed unused usings. Thank you tkirill #758
1.0.0-rc1
This is the 1.0.0-RC1 release! Read all about the major features and fixes in the blog post here.
Changelog
As always the level of community feedback never ceases to amaze us, this changelog only lists those that resulted in fixes or new features but the influx of general questions on github and stackoverflow questions tagged with 'nest' is wonderful to see.
- Really removed all the OK properties on responses #576
- UaxEmailUrlTokenizer reported a type with a space in it ty Jesse Slicer #584
- If you enabled TRACE output requests were logging
byte[]
. ty @sporty81 #589 - When using
AddMapping<T>
insideCreateIndex()
allow type to be overriden ty Mattias Nordberg #595 - When using attribute mapping
DateFormat
was not send to elasticsearch. ty Dorian Dechant #596 - Added API reference URL to ScrollAsync, Changed API reference URL for Suggest and SuggestAsync to point to Suggest doc, Added subsection to some API references, Improve fuzziness support on suggests. ty Anders Østhus #598
- Added
TermVector()
support #610 - Fix conditionless queries inside function scores #477
Analyze
now always uses POST #527- Fixed
ArgumentException
when using regex flags on terms aggregation include #592 - Improved API around getting individual bulk errors #616
- Connection pooling while using the thrift plugin did not properly failover #599 (thanks for reporting Maxim Pashuk)
- Added
MultiTermVector()
support #507 - Make sure thrift connection is also closed on
TTransportException
's ty @danp60 #624 - Dashes were removed from alias names in the GetAlias calls #628 ty Paige Cook with helping to reproduce it.
- Support doc_values attributes on numeric and string mappings and in ElasticProperty attributes ty @danp60 #644
- BulkUpdateDescriptor should have a Lang parameter since it has a Script parameter #627
- BulkUpdate missed doc as upsert setting #638
- Elasticsearch.NET is now fully CLSCompliant #623
- Replaced every occurance of
.ToLower()
with.ToLowerInvariant()
#634 - When using NEST response types with Elasticsearch.NET methods
.ConnectionStatus
would be null #645 - Terms aggregation on numeric field does not return the Key in response #643
- Removed
NumericRangeQuery
(removed since 0.90.8) - Range queries now only take
GreaterThan()
GreaterThanOrEqual()
LowerThan()
LowerThanOrEqualTo()
this to resemble to the only documented parameters on the range queries/filters since elasticsearch 1.0. - Mapped various missing/new tokenfilters, support language on
LowercaseTokenFilter()
ty Roman Pavlov #652 - Improved
Delete()
convenience extension methods #651 - Minor error message fix ty Micah Weaver #642
- Async methods did not always behave correctly when receiving error status codes #654 many thanks for catching this one during the beta @Aaronaught!
- Updated several outdated examples in the documentation #650 ty @vovikdrg
- Changed index size stats to longs #660
- Map field_value_factor for function score #682 ty @UdiBen
- Fix typo in CardinalityAggregationDescriptor ty @UdiBen
- Post nuget installation page keeps coming up every time I open Visual Studio ty Micah Weaver #639
- Add DelimitedPayloadTokenFilter ty @danp60 #680
- Implemented an IConnection implementation that uses HttpClient internally. ty Tom Anderson !
- Added AutomaticProxyDetection to Connectionconfiguration. ty Christiaan baes #666
- Add support for 'no_match_size' to HighlightFieldDescriptor ty Yves Reynhout #678
- use DefaultPropertyNameInferrer from settings when resolving property #698
- Cannot replace ContractResolver, even with a passthrough #701 ty David Pfeffer for the elegant solution #705
- Generate number from the
rest-api-spec
as longs and not ints #702 - Circular Reference in JSON Serialization of
SearchSourceDescriptor<T>
#706 - Support extend_bounds on date_histogram #699 ty Patrick McEvoy
- added copy to field mapping support for appropriate types #720
- Added missing Similarity method to StringMappingDescriptor #724
- Added Alias collection to CustomAnalyzer#727
- Fixed stack overflow when mapping recursive collections #731
- Fixed template mapping: type name wasn't properly inferred #735
- Added support for
GetClusterSettings()
#493 - Added support for
ClusterSettings()
(PUT) #737 - fixed documentation links pointing to localhost ty Roman Pavlov #746
- added missing settings to compound token filter ty Roman Pavlov #747\
- Fluent support for configuring similarity modules #748
- Terms Filter not applying Execution on all overloads ty Gareth Thomas #753
- Add support for percolate by id
- MInor Doc Updates ty Eric Berens #749
- Added "Second" facet date interval and support for custom date intervals ty Stefano Castriotta #715
- Match queries were missing minimum_should_match #741
- Add support for ignore_above in string mappings #762
- added support for coerce on numeric mappings
- added missing store, doc_values, compress and compress_threshold properties for binary mapping
- Replace confusing ToggleSort(bool) with Order(SortOrder) #764
- Can now map unknown types (i.e from plugins) #729
- Aggregations with integers as key returns null on keyfield in Nest.KeyItem #730
- Completely remove scope from filters and facets and implement join on nested filter [#428](http...
1.0.0-beta1
0.12.0.0
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
- @andreabalducci committed support for the new
function_score
queries http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html - @gmarz, @freshmaker74 implemented Term, TextPhrase, Completion suggestions on the
_search
endpoint (Search() in NEST) direct support for the_suggest
endpoint is still pending though see #397 and http://www.elasticsearch.org/blog/you-complete-me/ - @bytenik implemented an async version of the
Bulk()
call and fixed a bug where custom serialization settings were not applied correctly see #382 - @jjherbst added some convenience methods for the various search preference options.
- added new TokenChars field to NGramTokenizers see #375
- IElasticRawClient is now conforming to commit 394e3e45e8 of the elasticsearch client rest spec (https://github.com/elasticsearch/elasticsearch-rest-api-spec)
- Regexp filter and query support.
- Added geoshape filter.
- Added support for terms lookup queries (http://www.elasticsearch.org/blog/terms-filter-lookup/)
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 theGetSettings()
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
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
- 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 cannew
one or get to an instance of this raw client from yourIElasticClient
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()
onIConnectionSettings
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
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 theConnectionSettings
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 aNoTasksHttpConnection
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>