Skip to content

Feature/5x breaking changes docs #2491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 12, 2016
Merged

Conversation

Mpdreamz
Copy link
Member

No description provided.


## Visibility changes

These were types/methods/properties/constructors that were public but had nbno business being so.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nbno => no


## Rename of API related methods

Impact low, these have been renamed to match their Methid name equivalents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methid => Method


## Rest spec updates

These are breaking changes due to the elasticsearch 5.0 rest spec changing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elasticsearch => Elasticsearch


## Removed in 5.x after obsolete period

These are types/properties/methods obsoleted in NEST 2.x that have now been removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obsoleted => marked obsolete

# Breaking Changes

Oh my goodness, this looks like a lot of breaking changes! This is true but please take note that this list is very very extensive
It includes every single *binary* breaking change. In alot of cases these will not necessarily equate to compiler errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alot => a lot

**public property Nest.IBulkUpdateOperation<TDocument, TPartialDocument>.Script** *Declaration changed (Breaking)*
**public property Nest.UpdateRequest<TDocument, TPartialDocument>.Script** *Declaration changed (Breaking)*

In some cases the we abused IScript to send template queries this is now fixed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the we => we


The visitors should be passed interfaces not concrete types see: https://github.com/elastic/elasticsearch-net/pull/2320

## Deprecated queryies are now removed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

queryies => queries


## Visibility changes

Impact low, these are types/methods/constructors that were never suppose to be public.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suppose => supposed


## Allow source filter to send false

In NEST 2.x we would always send Source.Exlcude as `_source: { exclude: [""] }` in 5.x the we use a union of `bool`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exlcude => Exclude

**public method Nest.IElasticClient.GetAlias** *Declaration changed (Breaking)*
**public method Nest.IElasticClient.GetAlias** *Declaration changed (Breaking)*

## Sugest is bound over T
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sugest => Suggest

# Breaking Changes

Oh my goodness, this looks like a lot of breaking changes! This is true but please take note that this list is very very extensive
It includes every single *binary* breaking change. In alot of cases these will not necessarily equate to compiler errors.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot


The visitors should be passed interfaces not concrete types see: https://github.com/elastic/elasticsearch-net/pull/2320

## Deprecated queryies are now removed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deprecated queries

**public property Nest.SearchRequest<T>.Source** *Declaration changed (Breaking)*
**public property Nest.TopHitsAggregation.Source** *Declaration changed (Breaking)*

`Exclude` and `Include` are now plural on `ISourceFilter`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in line with the change in Elasticsearch 5.0

**public method Nest.IElasticClient.GetAlias** *Declaration changed (Breaking)*
**public method Nest.IElasticClient.GetAlias** *Declaration changed (Breaking)*

## Sugest is bound over T
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest


# Read only data types on responses.

Responses now favor `IReadOnlyDictionary` and `IReadOnlyCollection` which are initialized as empty.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the open generic type names IReadOnlyDictionary<TKey, TValue> and IReadOnlyCollection<T>

**public property Nest.IClusterRerouteResponse.Explanations**
**public property Nest.IGetSnapshotResponse.Snapshots**
**public property Nest.IGraphExploreResponse.Connections**
**public property Nest.IGraphExploreResponse.Failures
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With NEST 2.x you had to pass cancellation tokens as part of the RequestConfiguration we now bumped these to the methods themselves

to

With NEST 2.x async methods, a cancellation tokens could be passed as part of the RequestConfiguration. This was not very discoverable and so each async method can now accept an optional cancellation token as an argument, making the API more async idiomatic.

@Mpdreamz Mpdreamz merged commit ee28bf1 into master Dec 12, 2016
Mpdreamz added a commit that referenced this pull request Dec 12, 2016
* started on NEST breaking changes documentation

* 2x code was rendered in place of 5x code

* cancellationtoken changes does not need to show code, just where it was added

* cancellationtoken changes does not need to show code, just where it was added

* no need to show code for all the readonly changes

* started on manually annotating the breaking changes

* removed code from removal section and reordered docs

* manually categorized more changes

* small touchups and breaking changes preface

* low level breaking changes API

* add breaking changes pointer file

* final small tweaks: removed todo and changed ascii section title to be unique

* typos ty @gmarz @russcam
@Mpdreamz
Copy link
Member Author

Mpdreamz commented Dec 12, 2016

ported to 5.x

@Mpdreamz Mpdreamz deleted the feature/5x-breaking-changes-docs branch December 12, 2016 23:36
@russcam russcam added the v5.0.0 label Dec 13, 2016
awelburn pushed a commit to Artesian/elasticsearch-net that referenced this pull request Nov 6, 2017
* started on NEST breaking changes documentation

* 2x code was rendered in place of 5x code

* cancellationtoken changes does not need to show code, just where it was added

* cancellationtoken changes does not need to show code, just where it was added

* no need to show code for all the readonly changes

* started on manually annotating the breaking changes

* removed code from removal section and reordered docs

* manually categorized more changes

* small touchups and breaking changes preface

* low level breaking changes API

* add breaking changes pointer file

* final small tweaks: removed todo and changed ascii section title to be unique

* typos ty @gmarz @russcam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants