Skip to content

Commit

Permalink
Remove _primary and _replica execution preferences (#3884)
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam authored and Mpdreamz committed Jun 27, 2019
1 parent 10125f7 commit a79ac59
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
2 changes: 0 additions & 2 deletions src/Nest/Document/Single/Get/GetRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public partial class GetRequest<TDocument> where TDocument : class { }

public partial class GetDescriptor<TDocument> where TDocument : class
{
public GetDescriptor<TDocument> ExecuteOnPrimary() => Preference("_primary");

public GetDescriptor<TDocument> ExecuteOnLocalShard() => Preference("_local");
}
}
2 changes: 0 additions & 2 deletions src/Nest/Document/Single/Source/SourceRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public partial class SourceRequest<TDocument> where TDocument : class { }

public partial class SourceDescriptor<TDocument> where TDocument : class
{
public SourceDescriptor<TDocument> ExecuteOnPrimary() => Preference("_primary");

public SourceDescriptor<TDocument> ExecuteOnLocalShard() => Preference("_local");
}
}
25 changes: 1 addition & 24 deletions src/Nest/Search/Search/SearchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public partial class SearchRequest

[JsonFormatter(typeof(IndicesBoostFormatter))]
public IDictionary<IndexName, double> IndicesBoost { get; set; }

public double? MinScore { get; set; }
public QueryContainer PostFilter { get; set; }
public bool? Profile { get; set; }
Expand Down Expand Up @@ -243,29 +243,6 @@ public SearchDescriptor<TInferDocument> Source(Func<SourceFilterDescriptor<TInfe
/// </summary>
public SearchDescriptor<TInferDocument> TerminateAfter(long? terminateAfter) => Assign(terminateAfter, (a, v) => a.TerminateAfter = v);

/// <summary>
/// <para>
/// Controls a preference of which shard replicas to execute the search request on.
/// By default, the operation is randomized between the each shard replicas.
/// </para>
/// <para>
/// The operation will go and be executed only on the primary shards.
/// </para>
/// </summary>
public SearchDescriptor<TInferDocument> ExecuteOnPrimary() => Preference("_primary");

/// <summary>
/// <para>
/// Controls a preference of which shard replicas to execute the search request on.
/// By default, the operation is randomized between the each shard replicas.
/// </para>
/// <para>
/// The operation will go and be executed on the primary shard, and if not available (failover),
/// will execute on other shards.
/// </para>
/// </summary>
public SearchDescriptor<TInferDocument> ExecuteOnPrimaryFirst() => Preference("_primary_first");

/// <summary>
/// <para>
/// Controls a preference of which shard replicas to execute the search request on.
Expand Down

0 comments on commit a79ac59

Please sign in to comment.