Skip to content

Commit 59551c1

Browse files
committed
Remove Boost from IpProperty
This commit removes the Boost property from Ip field mappings. Fixes #4957
1 parent dff2c6a commit 59551c1

File tree

5 files changed

+2
-21
lines changed

5 files changed

+2
-21
lines changed

src/Nest/Mapping/Types/Specialized/Ip/IpAttribute.cs

+1-8
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5-
namespace Nest
5+
namespace Nest
66
{
77
public class IpAttribute : ElasticsearchDocValuesPropertyAttributeBase, IIpProperty
88
{
99
public IpAttribute() : base(FieldType.Ip) { }
1010

11-
public double Boost
12-
{
13-
get => Self.Boost.GetValueOrDefault();
14-
set => Self.Boost = value;
15-
}
16-
1711
public bool Index
1812
{
1913
get => Self.Index.GetValueOrDefault();
@@ -26,7 +20,6 @@ public string NullValue
2620
set => Self.NullValue = value;
2721
}
2822

29-
double? IIpProperty.Boost { get; set; }
3023
bool? IIpProperty.Index { get; set; }
3124
string IIpProperty.NullValue { get; set; }
3225
private IIpProperty Self => this;

src/Nest/Mapping/Types/Specialized/Ip/IpProperty.cs

-7
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ namespace Nest
1414
[InterfaceDataContract]
1515
public interface IIpProperty : IDocValuesProperty
1616
{
17-
[DataMember(Name ="boost")]
18-
double? Boost { get; set; }
19-
2017
[DataMember(Name ="index")]
2118
bool? Index { get; set; }
2219

@@ -30,7 +27,6 @@ public class IpProperty : DocValuesPropertyBase, IIpProperty
3027
{
3128
public IpProperty() : base(FieldType.Ip) { }
3229

33-
public double? Boost { get; set; }
3430
public bool? Index { get; set; }
3531
public string NullValue { get; set; }
3632
}
@@ -43,14 +39,11 @@ public class IpPropertyDescriptor<T>
4339
{
4440
public IpPropertyDescriptor() : base(FieldType.Ip) { }
4541

46-
double? IIpProperty.Boost { get; set; }
4742
bool? IIpProperty.Index { get; set; }
4843
string IIpProperty.NullValue { get; set; }
4944

5045
public IpPropertyDescriptor<T> Index(bool? index = true) => Assign(index, (a, v) => a.Index = v);
5146

52-
public IpPropertyDescriptor<T> Boost(double? boost) => Assign(boost, (a, v) => a.Boost = v);
53-
5447
public IpPropertyDescriptor<T> NullValue(string nullValue) => Assign(nullValue, (a, v) => a.NullValue = v);
5548
}
5649
}

tests/Tests/ClientConcepts/Troubleshooting/DebuggerDisplayTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ [U] public void TaskId()
132132
public void MappingProperties()
133133
{
134134
var nested = new NestedProperty() { Name = "hello" };
135-
var ip = new IpPropertyDescriptor<Project>().Name("field").Boost(2);
135+
var ip = new IpPropertyDescriptor<Project>().Name("field");
136136

137137
DebugFor(nested).Should().StartWith("Type: nested");
138138
DebugFor(ip).Should().StartWith("Type: ip");

tests/Tests/Mapping/Types/Specialized/Ip/IpAttributeTests.cs

-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public class IpTest
1010
{
1111
[Ip(
1212
Index = false,
13-
Boost = 1.3,
1413
NullValue = "127.0.0.1")]
1514
public string Full { get; set; }
1615

@@ -28,7 +27,6 @@ public class IpAttributeTests : AttributeTestsBase<IpTest>
2827
{
2928
type = "ip",
3029
index = false,
31-
boost = 1.3,
3230
null_value = "127.0.0.1"
3331
},
3432
minimal = new

tests/Tests/Mapping/Types/Specialized/Ip/IpPropertyTests.cs

-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public IpPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(clus
2222
{
2323
type = "ip",
2424
index = false,
25-
boost = 1.3,
2625
null_value = "127.0.0.1",
2726
doc_values = true,
2827
store = true,
@@ -34,7 +33,6 @@ public IpPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(clus
3433
.Ip(s => s
3534
.Name(p => p.Name)
3635
.Index(false)
37-
.Boost(1.3)
3836
.NullValue("127.0.0.1")
3937
.DocValues()
4038
.Store()
@@ -47,7 +45,6 @@ public IpPropertyTests(WritableCluster cluster, EndpointUsage usage) : base(clus
4745
"name", new IpProperty
4846
{
4947
Index = false,
50-
Boost = 1.3,
5148
NullValue = "127.0.0.1",
5249
DocValues = true,
5350
Store = true,

0 commit comments

Comments
 (0)