Skip to content

Commit 9b04a31

Browse files
committed
Merge branch 'develop' into feature/appdomain-warmer
2 parents 04de292 + 0944a92 commit 9b04a31

File tree

17 files changed

+48
-28
lines changed

17 files changed

+48
-28
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
@@ -25,6 +25,11 @@ public enum FieldType
2525
[EnumMember(Value = "geo_point")]
2626
GeoPoint,
2727
/// <summary>
28+
/// Geo shape type.
29+
/// </summary>
30+
[EnumMember(Value = "geo_shape")]
31+
GeoShape,
32+
/// <summary>
2833
/// The attachment type allows to index different “attachment” type field (encoded as base64), for example, microsoft office formats, open document formats, ePub, HTML...
2934
/// </summary>
3035
[EnumMember(Value = "attachment")]

src/Nest/Resolvers/Writers/TypeMappingWriter.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ private string GetElasticSearchTypeFromFieldType(FieldType? fieldType)
211211
{
212212
case FieldType.GeoPoint:
213213
return "geo_point";
214+
case FieldType.GeoShape:
215+
return "geo_shape";
214216
case FieldType.Attachment:
215217
return "attachment";
216218
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
@@ -154,17 +154,17 @@
154154
<Compile Include="Indices\ExistsTests.cs" />
155155
<Compile Include="Indices\StatsTests.cs" />
156156
<Compile Include="Core\AsyncTests.cs" />
157-
<Compile Include="Integration\Filter\AndOrNotFilterTests.cs" />
158-
<Compile Include="Integration\Filter\ScriptFilterTests.cs" />
159-
<Compile Include="Integration\Filter\MissingExistsFilterTests.cs" />
160-
<Compile Include="Integration\Filter\PrefixFilterTests.cs" />
161-
<Compile Include="Integration\Filter\RangeFilterTests.cs" />
162-
<Compile Include="Integration\Query\BoolQueryResults.cs" />
163-
<Compile Include="Integration\Query\TermToString.cs" />
157+
<Compile Include="Search\Filter\AndOrNotFilterTests.cs" />
158+
<Compile Include="Search\Filter\ScriptFilterTests.cs" />
159+
<Compile Include="Search\Filter\MissingExistsFilterTests.cs" />
160+
<Compile Include="Search\Filter\PrefixFilterTests.cs" />
161+
<Compile Include="Search\Filter\RangeFilterTests.cs" />
162+
<Compile Include="Search\Query\BoolQueryResults.cs" />
163+
<Compile Include="Search\Query\TermToString.cs" />
164164
<Compile Include="Core\UpdateTests.cs" />
165-
<Compile Include="Integration\Filter\BoolFilterTests.cs" />
166-
<Compile Include="Integration\HighlightTests.cs" />
167-
<Compile Include="Integration\Query\TermQueryDynamic.cs" />
165+
<Compile Include="Search\Filter\BoolFilterTests.cs" />
166+
<Compile Include="Search\HighlightTests.cs" />
167+
<Compile Include="Search\Query\TermQueryDynamic.cs" />
168168
<Compile Include="RawCalls\HasUsefultServerExceptionTests.cs" />
169169
<Compile Include="RawCalls\DynamicNullTests.cs" />
170170
<Compile Include="Mapping\NotAnalyzedTest.cs" />
@@ -248,9 +248,7 @@
248248
</None>
249249
<None Include="packages.config" />
250250
</ItemGroup>
251-
<ItemGroup>
252-
<Folder Include="LowLevel\" />
253-
</ItemGroup>
251+
<ItemGroup />
254252
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
255253
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
256254
<!-- 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
@@ -7,7 +7,7 @@
77
using Nest.Tests.MockData;
88
using Nest.Tests.MockData.Domain;
99

10-
namespace Nest.Tests.Integration.Integration.Filter
10+
namespace Nest.Tests.Integration.Search.Filter
1111
{
1212
/// <summary>
1313
/// 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
@@ -5,7 +5,7 @@
55
using Nest.Tests.MockData;
66
using Nest.Tests.MockData.Domain;
77

8-
namespace Nest.Tests.Integration.Integration.Filter
8+
namespace Nest.Tests.Integration.Search.Filter
99
{
1010
/// <summary>
1111
/// 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
@@ -5,7 +5,7 @@
55
using Nest.Tests.MockData;
66
using Nest.Tests.MockData.Domain;
77

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

0 commit comments

Comments
 (0)