Skip to content

Commit 5d294c7

Browse files
committed
Merge branch 'develop' into feature/unused-usings
2 parents 5b0ab0f + 1d867ed commit 5d294c7

File tree

16 files changed

+45
-26
lines changed

16 files changed

+45
-26
lines changed

src/Nest/DSL/Rescore/RescoreQueryDescriptor.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ public interface IRescoreQuery
1616

1717
[JsonProperty("rescore_query_weight")]
1818
double? RescoreQueryWeight { get; set; }
19+
20+
[JsonProperty("score_mode")]
21+
ScoreMode? ScoreMode { get; set; }
1922
}
2023

2124
public class RescoreQuery : IRescoreQuery
2225
{
2326
public IQueryContainer Query { get; set; }
2427
public double? QueryWeight { get; set; }
2528
public double? RescoreQueryWeight { get; set; }
29+
public ScoreMode? ScoreMode { get; set; }
2630
}
2731

2832
public class RescoreQueryDescriptor<T> : IRescoreQuery where T : class
@@ -35,6 +39,8 @@ public class RescoreQueryDescriptor<T> : IRescoreQuery where T : class
3539

3640
double? IRescoreQuery.RescoreQueryWeight { get; set; }
3741

42+
ScoreMode? IRescoreQuery.ScoreMode { get; set; }
43+
3844
public virtual RescoreQueryDescriptor<T> QueryWeight(double queryWeight)
3945
{
4046
Self.QueryWeight = queryWeight;
@@ -47,6 +53,12 @@ public virtual RescoreQueryDescriptor<T> RescoreQueryWeight(double rescoreQueryW
4753
return this;
4854
}
4955

56+
public virtual RescoreQueryDescriptor<T> ScoreMode(ScoreMode scoreMode)
57+
{
58+
Self.ScoreMode = scoreMode;
59+
return this;
60+
}
61+
5062
public virtual RescoreQueryDescriptor<T> Query(Func<QueryDescriptor<T>, QueryContainer> query)
5163
{
5264
query.ThrowIfNull("query");

src/Nest/Enums/FieldType.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ public enum FieldType
2424
[EnumMember(Value = "geo_point")]
2525
GeoPoint,
2626
/// <summary>
27+
/// Geo shape type.
28+
/// </summary>
29+
[EnumMember(Value = "geo_shape")]
30+
GeoShape,
31+
/// <summary>
2732
/// The attachment type allows to index different “attachment” type field (encoded as base64), for example, microsoft office formats, open document formats, ePub, HTML...
2833
/// </summary>
2934
[EnumMember(Value = "attachment")]

src/Nest/Resolvers/Writers/TypeMappingWriter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ private string GetElasticSearchTypeFromFieldType(FieldType? fieldType)
210210
{
211211
case FieldType.GeoPoint:
212212
return "geo_point";
213+
case FieldType.GeoShape:
214+
return "geo_shape";
213215
case FieldType.Attachment:
214216
return "attachment";
215217
case FieldType.Ip:

src/Tests/Nest.Tests.Integration/Nest.Tests.Integration.csproj

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,17 @@
151151
<Compile Include="Indices\ExistsTests.cs" />
152152
<Compile Include="Indices\StatsTests.cs" />
153153
<Compile Include="Core\AsyncTests.cs" />
154-
<Compile Include="Integration\Filter\AndOrNotFilterTests.cs" />
155-
<Compile Include="Integration\Filter\ScriptFilterTests.cs" />
156-
<Compile Include="Integration\Filter\MissingExistsFilterTests.cs" />
157-
<Compile Include="Integration\Filter\PrefixFilterTests.cs" />
158-
<Compile Include="Integration\Filter\RangeFilterTests.cs" />
159-
<Compile Include="Integration\Query\BoolQueryResults.cs" />
160-
<Compile Include="Integration\Query\TermToString.cs" />
154+
<Compile Include="Search\Filter\AndOrNotFilterTests.cs" />
155+
<Compile Include="Search\Filter\ScriptFilterTests.cs" />
156+
<Compile Include="Search\Filter\MissingExistsFilterTests.cs" />
157+
<Compile Include="Search\Filter\PrefixFilterTests.cs" />
158+
<Compile Include="Search\Filter\RangeFilterTests.cs" />
159+
<Compile Include="Search\Query\BoolQueryResults.cs" />
160+
<Compile Include="Search\Query\TermToString.cs" />
161161
<Compile Include="Core\UpdateTests.cs" />
162-
<Compile Include="Integration\Filter\BoolFilterTests.cs" />
163-
<Compile Include="Integration\HighlightTests.cs" />
164-
<Compile Include="Integration\Query\TermQueryDynamic.cs" />
162+
<Compile Include="Search\Filter\BoolFilterTests.cs" />
163+
<Compile Include="Search\HighlightTests.cs" />
164+
<Compile Include="Search\Query\TermQueryDynamic.cs" />
165165
<Compile Include="RawCalls\HasUsefultServerExceptionTests.cs" />
166166
<Compile Include="RawCalls\DynamicNullTests.cs" />
167167
<Compile Include="Mapping\NotAnalyzedTest.cs" />
@@ -253,9 +253,7 @@
253253
<LastGenOutput>Test.Designer.cs</LastGenOutput>
254254
</None>
255255
</ItemGroup>
256-
<ItemGroup>
257-
<Folder Include="LowLevel\" />
258-
</ItemGroup>
256+
<ItemGroup />
259257
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
260258
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
261259
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Tests/Nest.Tests.Integration/Integration/Filter/AndOrNotFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/AndOrNotFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Nest.Tests.MockData;
44
using Nest.Tests.MockData.Domain;
55

6-
namespace Nest.Tests.Integration.Integration.Filter
6+
namespace Nest.Tests.Integration.Search.Filter
77
{
88
/// <summary>
99
/// Integrated tests of AndFilter, OrFilter and NotFilter with elasticsearch.

src/Tests/Nest.Tests.Integration/Integration/Filter/BoolFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/BoolFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using NUnit.Framework;
33
using Nest.Tests.MockData.Domain;
44

5-
namespace Nest.Tests.Integration.Integration.Filter
5+
namespace Nest.Tests.Integration.Search.Filter
66
{
77
[TestFixture]
88
public class BoolFilterTests : IntegrationTests

src/Tests/Nest.Tests.Integration/Integration/Filter/MissingExistsFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/MissingExistsFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Nest.Tests.MockData;
77
using Nest.Tests.MockData.Domain;
88

9-
namespace Nest.Tests.Integration.Integration.Filter
9+
namespace Nest.Tests.Integration.Search.Filter
1010
{
1111
/// <summary>
1212
/// Integrated tests of RangeFilter with elasticsearch.

src/Tests/Nest.Tests.Integration/Integration/Filter/PrefixFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/PrefixFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Nest.Tests.MockData;
44
using Nest.Tests.MockData.Domain;
55

6-
namespace Nest.Tests.Integration.Integration.Filter
6+
namespace Nest.Tests.Integration.Search.Filter
77
{
88
/// <summary>
99
/// Integrated tests of PrefixFilter with elasticsearch.

src/Tests/Nest.Tests.Integration/Integration/Filter/RangeFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/RangeFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Nest.Tests.MockData;
55
using Nest.Tests.MockData.Domain;
66

7-
namespace Nest.Tests.Integration.Integration.Filter
7+
namespace Nest.Tests.Integration.Search.Filter
88
{
99
/// <summary>
1010
/// Integrated tests of RangeFilter with elasticsearch.

src/Tests/Nest.Tests.Integration/Integration/Filter/ScriptFilterTests.cs renamed to src/Tests/Nest.Tests.Integration/Search/Filter/ScriptFilterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Nest.Tests.MockData;
55
using Nest.Tests.MockData.Domain;
66

7-
namespace Nest.Tests.Integration.Integration.Filter
7+
namespace Nest.Tests.Integration.Search.Filter
88
{
99
/// <summary>
1010
/// Integrated tests of ScriptFilter with elasticsearch.

0 commit comments

Comments
 (0)