Skip to content
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

Feature/6.0 breaking changes #2944

Merged
merged 17 commits into from
Dec 12, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
aa36c72
Breaking Changes
codebrain Dec 1, 2017
a1fa562
The deprecated min_word_len (a synonym for min_word_length) and max_w…
codebrain Dec 4, 2017
d2abd95
Support custom normalizer in Analyze API
codebrain Dec 4, 2017
a34f2ab
For geo_distance queries, sorting, and aggregations the sloppy_arc op…
codebrain Dec 6, 2017
6d6051c
The disable_coord parameter of the bool and common_terms queries has …
codebrain Dec 6, 2017
ac8ecb7
The split_on_whitespace parameter for the query_string query has been…
codebrain Dec 6, 2017
08564fd
The use_dis_max parameter for the query_string query has been removed…
codebrain Dec 6, 2017
a4343e3
The auto_generate_phrase_queries parameter for the query_string query…
codebrain Dec 6, 2017
941acd0
The all_fields parameter for the query_string has been removed. Also …
codebrain Dec 6, 2017
7ea3f0a
The deprecated multi term rewrite parameters constant_score_auto, co…
codebrain Dec 6, 2017
06673e8
The postings highlighter has been removed from Lucene and Elasticsear…
codebrain Dec 12, 2017
977c998
Store throttling has been removed. As a consequence, the indices.stor…
codebrain Dec 12, 2017
1ea8fbf
Removal of throttle_time in the store stats. Given that store throttl…
codebrain Dec 12, 2017
835edf0
FS stats no longer reports if the disk spins
codebrain Dec 12, 2017
e7e4d95
Fix tests
codebrain Dec 12, 2017
34fda6b
Merge branch 'master' into feature/6.0-breaking-changes
Dec 12, 2017
d054aae
Merge branch 'master' into feature/6.0-breaking-changes
Mpdreamz Dec 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 96 additions & 99 deletions src/Elasticsearch.Net/Domain/Enums.Generated.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@ namespace Nest
public class BulkDeleteResponseItem : BulkResponseItemBase
{
public override string Operation { get; internal set; }
[JsonProperty("found")]
public bool Found { get; internal set; }
}
}
}
25 changes: 18 additions & 7 deletions src/Nest/Indices/Analyze/AnalyzeRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public partial interface IAnalyzeRequest
[JsonProperty("analyzer")]
string Analyzer { get; set; }

///<summary>The name of the normalizer to use</summary>
[JsonProperty("normalizer")]
string Normalizer { get; set; }

///<summary>A collection of character filters to use for the analysis</summary>
[JsonProperty("char_filter")]
string[] CharFilter { get; set; }
Expand Down Expand Up @@ -42,29 +46,33 @@ public AnalyzeRequest(IndexName indices, string textToAnalyze)
this.Text = new[] { textToAnalyze };
}

///<summary>The name of the analyzer to use</summary>
/// <inheritdoc />
public string Analyzer { get; set; }

///<summary>A collection of character filters to use for the analysis</summary>
/// <inheritdoc />
public string Normalizer { get; set; }

/// <inheritdoc />
public string[] CharFilter { get; set; }

///<summary>A collection of filters to use for the analysis</summary>
public string[] Filter { get; set; }
/// <inheritdoc />
public string[] Filter { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

spaces instead of tabs

Copy link
Contributor Author

Choose a reason for hiding this comment

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


///<summary>Use the analyzer configured for this field (instead of passing the analyzer name)</summary>
/// <inheritdoc />
public Field Field { get; set; }

///<summary>The text on which the analysis should be performed</summary>
/// <inheritdoc />
public string[] Text { get; set; }

///<summary>The name of the tokenizer to use for the analysis</summary>
/// <inheritdoc />
public string Tokenizer { get; set; }
}

[DescriptorFor("IndicesAnalyze")]
public partial class AnalyzeDescriptor
{
string IAnalyzeRequest.Analyzer { get; set; }
string IAnalyzeRequest.Normalizer { get; set; }
string[] IAnalyzeRequest.CharFilter { get; set; }
string[] IAnalyzeRequest.Filter { get; set; }
Field IAnalyzeRequest.Field { get; set; }
Expand All @@ -74,6 +82,9 @@ public partial class AnalyzeDescriptor
///<summary>The name of the analyzer to use</summary>
public AnalyzeDescriptor Analyzer(string analyser) => Assign(a => a.Analyzer = analyser);

///<summary>The name of the normalizer to use</summary>
public AnalyzeDescriptor Normalizer(string normalizer) => Assign(a => a.Normalizer = normalizer);

///<summary>A collection of character filters to use for the analysis</summary>
public AnalyzeDescriptor CharFilter(params string[] charFilter) => Assign(a => a.CharFilter = charFilter);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Nest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ internal PutMappingRequest() { }
/// <inheritdoc/>
public bool? DateDetection { get; set; }
/// <inheritdoc/>
public bool? IncludeInAll { get; set; }
/// <inheritdoc/>
public IEnumerable<string> DynamicDateFormats { get; set; }
/// <inheritdoc/>
public IDynamicTemplateContainer DynamicTemplates { get; set; }
Expand Down Expand Up @@ -61,8 +59,6 @@ public PutMappingRequest() : this(typeof(T), typeof(T)) { }
/// <inheritdoc/>
public bool? DateDetection { get; set; }
/// <inheritdoc/>
public bool? IncludeInAll { get; set; }
/// <inheritdoc/>
public IEnumerable<string> DynamicDateFormats { get; set; }
/// <inheritdoc/>
public IDynamicTemplateContainer DynamicTemplates { get; set; }
Expand Down Expand Up @@ -102,7 +98,6 @@ public PutMappingDescriptor(IndexName index, TypeName type) : base(r=>r.Required

IAllField ITypeMapping.AllField { get; set; }
bool? ITypeMapping.DateDetection { get; set; }
bool? ITypeMapping.IncludeInAll { get; set; }
IEnumerable<string> ITypeMapping.DynamicDateFormats { get; set; }
string ITypeMapping.Analyzer { get; set; }
string ITypeMapping.SearchAnalyzer { get; set; }
Expand Down Expand Up @@ -136,9 +131,6 @@ public PutMappingDescriptor<T> AutoMap(IPropertyVisitor visitor = null, int maxR
/// <inheritdoc/>
public PutMappingDescriptor<T> Dynamic(bool dynamic = true) => Assign(a => a.Dynamic = dynamic);

/// <inheritdoc/>
public PutMappingDescriptor<T> IncludeInAll(bool include = true) => Assign(a => a.IncludeInAll = include);

/// <inheritdoc/>
public PutMappingDescriptor<T> Parent(TypeName parentType) => Assign(a => a.ParentField = new ParentField { Type = parentType });

Expand Down
9 changes: 0 additions & 9 deletions src/Nest/Mapping/TypeMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ public interface ITypeMapping
[JsonProperty("numeric_detection")]
bool? NumericDetection { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[Obsolete("Scheduled to be removed in 6.0. Default analyzers can no longer be specified at the type level. Use an index or field level analyzer instead.")]
[JsonProperty("analyzer")]
string Analyzer { get; set; }
Expand Down Expand Up @@ -70,8 +67,6 @@ public class TypeMapping : ITypeMapping
/// <inheritdoc/>
public bool? DateDetection { get; set; }
/// <inheritdoc/>
public bool? IncludeInAll { get; set; }
/// <inheritdoc/>
public Union<bool, DynamicMapping> Dynamic { get; set; }
/// <inheritdoc/>
public IEnumerable<string> DynamicDateFormats { get; set; }
Expand Down Expand Up @@ -109,7 +104,6 @@ public class TypeMappingDescriptor<T> : DescriptorBase<TypeMappingDescriptor<T>,
{
IAllField ITypeMapping.AllField { get; set; }
bool? ITypeMapping.DateDetection { get; set; }
bool? ITypeMapping.IncludeInAll { get; set; }
Union<bool, DynamicMapping> ITypeMapping.Dynamic { get; set; }
IEnumerable<string> ITypeMapping.DynamicDateFormats { get; set; }
IDynamicTemplateContainer ITypeMapping.DynamicTemplates { get; set; }
Expand Down Expand Up @@ -156,9 +150,6 @@ public TypeMappingDescriptor<T> AutoMap<TDocument>(IPropertyVisitor visitor = nu
/// <inheritdoc/>
public TypeMappingDescriptor<T> Dynamic(bool dynamic = true) => Assign(a => a.Dynamic = dynamic);

/// <inheritdoc/>
public TypeMappingDescriptor<T> IncludeInAll(bool include = true) => Assign(a => a.IncludeInAll = include);

/// <inheritdoc/>
public TypeMappingDescriptor<T> Parent(TypeName parentType) => Assign(a => a.ParentField = new ParentField { Type = parentType });

Expand Down
3 changes: 0 additions & 3 deletions src/Nest/Mapping/Types/Complex/Object/ObjectAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ protected ObjectAttribute(Type type) : base(type) { }

Union<bool, DynamicMapping> IObjectProperty.Dynamic { get; set; }
bool? IObjectProperty.Enabled { get; set; }
bool? IObjectProperty.IncludeInAll { get; set; }
IProperties IObjectProperty.Properties { get; set; }

public bool Enabled { get { return Self.Enabled.GetValueOrDefault(); } set { Self.Enabled = value; } }
public bool IncludeInAll { get { return Self.IncludeInAll.GetValueOrDefault(); } set { Self.IncludeInAll = value; } }

}
}
9 changes: 0 additions & 9 deletions src/Nest/Mapping/Types/Complex/Object/ObjectProperty.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using Elasticsearch.Net;
using System.Diagnostics;
using Newtonsoft.Json;
Expand All @@ -15,9 +14,6 @@ public interface IObjectProperty : ICoreProperty
[JsonProperty("enabled")]
bool? Enabled { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("properties", TypeNameHandling = TypeNameHandling.None)]
IProperties Properties { get; set; }
}
Expand All @@ -36,7 +32,6 @@ protected ObjectProperty(FieldType type) : this(type.GetStringValue()) { }

public Union<bool, DynamicMapping> Dynamic { get; set; }
public bool? Enabled { get; set; }
public bool? IncludeInAll { get; set; }
public IProperties Properties { get; set; }
}

Expand All @@ -60,7 +55,6 @@ public abstract class ObjectPropertyDescriptorBase<TDescriptor, TInterface, TPar

Union<bool, DynamicMapping> IObjectProperty.Dynamic { get; set; }
bool? IObjectProperty.Enabled { get; set; }
bool? IObjectProperty.IncludeInAll { get; set; }
IProperties IObjectProperty.Properties { get; set; }

protected ObjectPropertyDescriptorBase() : this(FieldType.Object) { }
Expand All @@ -84,9 +78,6 @@ public TDescriptor Dynamic(bool dynamic = true) =>
public TDescriptor Enabled(bool enabled = true) =>
Assign(a => a.Enabled = enabled);

public TDescriptor IncludeInAll(bool includeInAll = true) =>
Assign(a => a.IncludeInAll = includeInAll);

public TDescriptor Properties(Func<PropertiesDescriptor<TChild>, IPromise<IProperties>> selector) =>
Assign(a => a.Properties = selector?.Invoke(new PropertiesDescriptor<TChild>(a.Properties))?.Value);

Expand Down
12 changes: 1 addition & 11 deletions src/Nest/Mapping/Types/Core/Range/RangePropertyBase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using Elasticsearch.Net;
using Newtonsoft.Json;
using Newtonsoft.Json;

namespace Nest
{
Expand All @@ -20,12 +18,6 @@ public interface IRangeProperty : IDocValuesProperty
[JsonProperty("boost")]
double? Boost { get; set; }

/// <summary>
/// Whether or not the field value should be included in the _all field? Accepts true or false. Defaults
/// to false if index is set to false, or if a parent object field sets include_in_all to false.
/// Otherwise defaults to true.
/// </summary>

/// <summary>
/// Should the field be searchable? Accepts true (default) and false.
/// </summary>
Expand All @@ -42,8 +34,6 @@ protected RangePropertyBase(RangeType rangeType) : base(rangeType.ToFieldType())
/// <inheritdoc/>
public double? Boost { get; set; }
/// <inheritdoc/>
public bool? IncludeInAll { get; set; }
/// <inheritdoc/>
public bool? Index { get; set; }
}

Expand Down
7 changes: 0 additions & 7 deletions src/Nest/Mapping/Types/Specialized/Generic/GenericProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ public interface IGenericProperty : IDocValuesProperty
[JsonProperty("search_analyzer")]
string SearchAnalyzer { get; set; }

[JsonProperty("include_in_all")]
bool? IncludeInAll { get; set; }

[JsonProperty("ignore_above")]
int? IgnoreAbove { get; set; }

Expand All @@ -62,7 +59,6 @@ public GenericProperty() : base(null) { }
public TermVectorOption? TermVector { get; set; }
public double? Boost { get; set; }
public string SearchAnalyzer { get; set; }
public bool? IncludeInAll { get; set; }
public int? IgnoreAbove { get; set; }
public int? PositionIncrementGap { get; set; }
public IStringFielddata Fielddata { get; set; }
Expand Down Expand Up @@ -91,7 +87,6 @@ public class GenericPropertyDescriptor<T>
IndexOptions? IGenericProperty.IndexOptions { get; set; }
string IGenericProperty.Analyzer { get; set; }
string IGenericProperty.SearchAnalyzer { get; set; }
bool? IGenericProperty.IncludeInAll { get; set; }
int? IGenericProperty.IgnoreAbove { get; set; }
int? IGenericProperty.PositionIncrementGap { get; set; }
IStringFielddata IGenericProperty.Fielddata { get; set; }
Expand All @@ -106,8 +101,6 @@ public GenericPropertyDescriptor() : base(null) { }

public GenericPropertyDescriptor<T> NullValue(string nullValue) => Assign(a => a.NullValue = nullValue);

public GenericPropertyDescriptor<T> IncludeInAll(bool includeInAll = true) => Assign(a => a.IncludeInAll = includeInAll);

public GenericPropertyDescriptor<T> NotAnalyzed() => Index(FieldIndexOption.NotAnalyzed);

public GenericPropertyDescriptor<T> Index(FieldIndexOption index) => Assign(a => a.Index = index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public interface IMoreLikeThisQuery : IQuery
[JsonProperty("max_doc_freq")]
int? MaxDocumentFrequency { get; set; }

[JsonProperty("min_word_len")]
[JsonProperty("min_word_length")]
int? MinWordLength { get; set; }

[JsonProperty("max_word_len")]
[JsonProperty("max_word_length")]
int? MaxWordLength { get; set; }

[JsonProperty("stop_words")]
Expand Down
1 change: 0 additions & 1 deletion src/Tests/Document/Multiple/Bulk/BulkInvalidApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ protected override void ExpectResponse(IBulkResponse response)
failedUpdate.IsValid.Should().BeFalse();

var failedDelete = response.Items.Last() as BulkDeleteResponseItem;
failedDelete.Found.Should().BeFalse();
failedDelete.IsValid.Should().BeTrue();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ protected override LazyResponses ClientUsage() => Calls(

protected override object ExpectJson { get; } = new
{
include_in_all = true,
properties = new
{
branches = new
Expand Down Expand Up @@ -131,7 +130,6 @@ protected override LazyResponses ClientUsage() => Calls(

protected override Func<PutMappingDescriptor<Project>, IPutMappingRequest> Fluent => d => d
.Index(CallIsolatedValue)
.IncludeInAll()
.AutoMap()
.Properties(prop => prop
.Join(join => join
Expand Down Expand Up @@ -183,7 +181,6 @@ protected override LazyResponses ClientUsage() => Calls(

protected override PutMappingRequest<Project> Initializer => new PutMappingRequest<Project>(CallIsolatedValue, Type<Project>())
{
IncludeInAll = true,
Properties = new Properties<Project>
{
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public class InnerObject
[Nested(
IncludeInParent = true,
IncludeInRoot = false,
Enabled = true,
IncludeInAll = true)]
Enabled = true)]
public InnerObject Full { get; set; }

[Nested]
Expand All @@ -33,7 +32,6 @@ public class NestedAttributeTests : AttributeTestsBase<NestedTest>
include_in_parent = true,
include_in_root = false,
enabled = true,
include_in_all = true,
properties = new
{
name = new
Expand Down
3 changes: 0 additions & 3 deletions src/Tests/Mapping/Types/Complex/Nested/NestedPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public NestedPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
include_in_root = false,
dynamic = "strict",
enabled = true,
include_in_all = true,
properties = new
{
ipAddress = new
Expand All @@ -42,7 +41,6 @@ public NestedPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
.IncludeInRoot(false)
.Dynamic(DynamicMapping.Strict)
.Enabled()
.IncludeInAll()
.Properties(pps => pps
.Ip(i => i
.Name(p => p.IpAddress)
Expand All @@ -58,7 +56,6 @@ public NestedPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
IncludeInRoot = false,
Dynamic = DynamicMapping.Strict,
Enabled = true,
IncludeInAll = true,
Properties = new Properties
{
{ "ipAddress", new IpProperty () }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public class InnerObject
}

[Object(
Enabled = true,
IncludeInAll = true)]
Enabled = true)]
public InnerObject Full { get; set; }

[Object]
Expand All @@ -29,7 +28,6 @@ public class ObjectAttributeTests : AttributeTestsBase<ObjectTest>
{
type = "object",
enabled = true,
include_in_all = true,
properties = new
{
name = new
Expand Down
3 changes: 0 additions & 3 deletions src/Tests/Mapping/Types/Complex/Object/ObjectPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public ObjectPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
type = "object",
dynamic = true,
enabled = true,
include_in_all = true,
properties = new
{
ipAddress = new
Expand All @@ -38,7 +37,6 @@ public ObjectPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
.Name(p => p.LeadDeveloper)
.Dynamic(true)
.Enabled()
.IncludeInAll()
.Properties(pps => pps
.Ip(i => i
.Name(p => p.IpAddress)
Expand All @@ -52,7 +50,6 @@ public ObjectPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(
{
Dynamic = true,
Enabled = true,
IncludeInAll = true,
Properties = new Properties
{
{ "ipAddress", new IpProperty () }
Expand Down
Loading