Skip to content

Conversation

codebrain
Copy link
Contributor

Early warning for 5.x users

Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Added a small note. For read only classes that are part of the response but the actual property access path is unchanged we should not add Obsolete's i reckon,

@@ -115,6 +115,7 @@ internal static Error Create(IDictionary<string, object> dict, IJsonSerializerSt
: $"Type: {this.Type} Reason: \"{this.Reason}\" CausedBy: \"{this.CausedBy}\"";
}

[Obsolete("Removed in 6.0.")]
public class CausedBy
Copy link
Member

Choose a reason for hiding this comment

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

While technically true this is only used through reading server errors, when upgrading no code for the property access into this needs to be changed.

Copy link
Member

Choose a reason for hiding this comment

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

Rather leave this out to reduce noise.

Copy link
Contributor

@russcam russcam left a comment

Choose a reason for hiding this comment

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

I've left some general comments.

The large issues that the Obsolete attributes flag are:

  • removal of IncludeInAll in field mappings, as part of the removal of the _all field
  • removal of stored search templates related methods
  • removal of file based scripting

Are these better served as main documentation sections in https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/nest-breaking-changes.html? thoughts @codebrain @Mpdreamz ?

@@ -35,7 +35,7 @@ public interface ISignificantTermsAggregation : IBucketAggregation
/// number of hits
/// </summary>
[JsonIgnore]
[Obsolete("Use MinimumDocumentCountAsLong. Fixed in NEST 6.x")]
[Obsolete("Use MinimumDocumentCountAsLong. Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think fixed is a better description IMO; MinimumDocumentCount is a long? in 6.x and MinimumDocumentCountAsLong is removed, since it served only as a non-breaking BWC change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -131,7 +131,7 @@ public class SignificantTermsAggregation : BucketAggregationBase, ISignificantTe
/// <inheritdoc />
public int? ShardSize { get; set; }

[Obsolete("Use MinimumDocumentCountAsLong. Fixed in NEST 6.x")]
[Obsolete("Use MinimumDocumentCountAsLong. Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think fixed is a better description IMO; MinimumDocumentCount is a long? in 6.x and MinimumDocumentCountAsLong is removed, since it served only as a non-breaking BWC change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -188,7 +188,7 @@ public class SignificantTermsAggregationDescriptor<T>

int? ISignificantTermsAggregation.ShardSize { get; set; }

[Obsolete("Use MinimumDocumentCountAsLong. Fixed in NEST 6.x")]
[Obsolete("Use MinimumDocumentCountAsLong. Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think fixed is a better description IMO; MinimumDocumentCount is a long? in 6.x and MinimumDocumentCountAsLong is removed, since it served only as a non-breaking BWC change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@@ -12,6 +13,7 @@ public interface IHunspellTokenFilter : ITokenFilter
/// If true, dictionary matching will be case insensitive.
/// </summary>
[JsonProperty("ignore_case")]
[Obsolete("Scheduled to be removed in 6.0")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it scheduled still for a later Elasticsearch 6.x, or been removed in Elasticsearch 6.0? Can we advise an alternative approach e.g. using a lowercase token filter before hunspell token filter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added help and changed to 6.x.

/// Takes precedence over the global <see cref="DefaultIndex"/>
/// </summary>
[Obsolete("Removed in 6.0.")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm inclined not to Obsolete this as it is likely to be noisy for a lot of users, since it is a commonly used method. Perhaps an XML comment instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved to ///remarks

using Newtonsoft.Json;

namespace Nest
{
[Obsolete("Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can help users here by suggesting that they move to using suggesters on the Search() endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

[JsonConverter(typeof(SuggestRequestJsonConverter))]
public partial interface ISuggestRequest
{
string GlobalText { get; set; }
ISuggestContainer Suggest { get; set; }
}

[Obsolete("Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can help users here by suggesting that they move to using suggesters on the Search() endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

public partial class SuggestRequest
{
public string GlobalText { get; set; }
public ISuggestContainer Suggest { get; set; }
}

[Obsolete("Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can help users here by suggesting that they move to using suggesters on the Search() endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

public partial interface ISuggestRequest<T> : ISearchRequest { }

[Obsolete("Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can help users here by suggesting that they move to using suggesters on the Search() endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

public partial class SuggestRequest<T>
{
public string GlobalText { get; set; }
public ISuggestContainer Suggest { get; set; }
}

[DescriptorFor("Suggest")]
[Obsolete("Removed in NEST 6.x")]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can help users here by suggesting that they move to using suggesters on the Search() endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@codebrain
Copy link
Contributor Author

@russcam - There are a few overriding changes (at least the 3 you called out) where a lot of noise was generated. Probably best for documentation.

@codebrain codebrain merged commit a08ccfc into 5.x Feb 20, 2018
@codebrain codebrain deleted the feature/obsolete-attributes branch February 20, 2018 23:35
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