From a79ac5978b10aabebd826b65e1dbc2b86d6ffc45 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Thu, 27 Jun 2019 19:27:15 +1000 Subject: [PATCH] Remove _primary and _replica execution preferences (#3884) Relates: https://github.com/elastic/elasticsearch/pull/26791 --- src/Nest/Document/Single/Get/GetRequest.cs | 2 -- .../Document/Single/Source/SourceRequest.cs | 2 -- src/Nest/Search/Search/SearchRequest.cs | 25 +------------------ 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/src/Nest/Document/Single/Get/GetRequest.cs b/src/Nest/Document/Single/Get/GetRequest.cs index c70a5da00e1..4fb166e8ca6 100644 --- a/src/Nest/Document/Single/Get/GetRequest.cs +++ b/src/Nest/Document/Single/Get/GetRequest.cs @@ -12,8 +12,6 @@ public partial class GetRequest where TDocument : class { } public partial class GetDescriptor where TDocument : class { - public GetDescriptor ExecuteOnPrimary() => Preference("_primary"); - public GetDescriptor ExecuteOnLocalShard() => Preference("_local"); } } diff --git a/src/Nest/Document/Single/Source/SourceRequest.cs b/src/Nest/Document/Single/Source/SourceRequest.cs index 49f35c3b380..51bac1b4ad0 100644 --- a/src/Nest/Document/Single/Source/SourceRequest.cs +++ b/src/Nest/Document/Single/Source/SourceRequest.cs @@ -14,8 +14,6 @@ public partial class SourceRequest where TDocument : class { } public partial class SourceDescriptor where TDocument : class { - public SourceDescriptor ExecuteOnPrimary() => Preference("_primary"); - public SourceDescriptor ExecuteOnLocalShard() => Preference("_local"); } } diff --git a/src/Nest/Search/Search/SearchRequest.cs b/src/Nest/Search/Search/SearchRequest.cs index db38d005bb8..210ce7d9cc1 100644 --- a/src/Nest/Search/Search/SearchRequest.cs +++ b/src/Nest/Search/Search/SearchRequest.cs @@ -96,7 +96,7 @@ public partial class SearchRequest [JsonFormatter(typeof(IndicesBoostFormatter))] public IDictionary IndicesBoost { get; set; } - + public double? MinScore { get; set; } public QueryContainer PostFilter { get; set; } public bool? Profile { get; set; } @@ -243,29 +243,6 @@ public SearchDescriptor Source(Func public SearchDescriptor TerminateAfter(long? terminateAfter) => Assign(terminateAfter, (a, v) => a.TerminateAfter = v); - /// - /// - /// Controls a preference of which shard replicas to execute the search request on. - /// By default, the operation is randomized between the each shard replicas. - /// - /// - /// The operation will go and be executed only on the primary shards. - /// - /// - public SearchDescriptor ExecuteOnPrimary() => Preference("_primary"); - - /// - /// - /// Controls a preference of which shard replicas to execute the search request on. - /// By default, the operation is randomized between the each shard replicas. - /// - /// - /// The operation will go and be executed on the primary shard, and if not available (failover), - /// will execute on other shards. - /// - /// - public SearchDescriptor ExecuteOnPrimaryFirst() => Preference("_primary_first"); - /// /// /// Controls a preference of which shard replicas to execute the search request on.