Skip to content

Add track_total_hits to search request body #3917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class GlobalOverrides : EndpointOverridesBase
"copy_settings", //this still needs a PR?
"source", // allows the body to be specified as a request param, we do not want to advertise this with a strongly typed method
"timestamp",
"_source_include", "_source_exclude" // can be removed once https://github.com/elastic/elasticsearch/pull/41439 is in
"_source_include", "_source_exclude", // can be removed once https://github.com/elastic/elasticsearch/pull/41439 is in
"track_total_hits"
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1712,13 +1712,6 @@ public bool? TotalHitsAsInteger
set => Q("rest_total_hits_as_int", value);
}

///<summary>Indicate if the number of documents that match the query should be tracked</summary>
public bool? TrackTotalHits
{
get => Q<bool? >("track_total_hits");
set => Q("track_total_hits", value);
}

///<summary>Specify whether aggregation and suggester names should be prefixed by their respective types in the response</summary>
public bool? TypedKeys
{
Expand Down
2 changes: 0 additions & 2 deletions src/Nest/Descriptors.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,8 +1300,6 @@ public SearchDescriptor<TInferDocument> Index<TOther>()
public SearchDescriptor<TInferDocument> SuggestText(string suggesttext) => Qs("suggest_text", suggesttext);
///<summary>Indicates whether hits.total should be rendered as an integer or an object in the rest search response</summary>
public SearchDescriptor<TInferDocument> TotalHitsAsInteger(bool? totalhitsasinteger = true) => Qs("rest_total_hits_as_int", totalhitsasinteger);
///<summary>Indicate if the number of documents that match the query should be tracked</summary>
public SearchDescriptor<TInferDocument> TrackTotalHits(bool? tracktotalhits = true) => Qs("track_total_hits", tracktotalhits);
///<summary>Specify whether aggregation and suggester names should be prefixed by their respective types in the response</summary>
public SearchDescriptor<TInferDocument> TypedKeys(bool? typedkeys = true) => Qs("typed_keys", typedkeys);
}
Expand Down
7 changes: 0 additions & 7 deletions src/Nest/Requests.NoNamespace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2809,13 +2809,6 @@ public bool? TotalHitsAsInteger
set => Q("rest_total_hits_as_int", value);
}

///<summary>Indicate if the number of documents that match the query should be tracked</summary>
public bool? TrackTotalHits
{
get => Q<bool? >("track_total_hits");
set => Q("track_total_hits", value);
}

///<summary>Specify whether aggregation and suggester names should be prefixed by their respective types in the response</summary>
public bool? TypedKeys
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Nest
{
internal class MultiSearchJsonConverter : IJsonFormatter<IMultiSearchRequest>
internal class MultiSearchFormatter : IJsonFormatter<IMultiSearchRequest>
{
private const byte Newline = (byte)'\n';

Expand Down
2 changes: 1 addition & 1 deletion src/Nest/Search/MultiSearch/MultiSearchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Nest
{
[MapsApi("msearch.json")]
[JsonFormatter(typeof(MultiSearchJsonConverter))]
[JsonFormatter(typeof(MultiSearchFormatter))]
public partial interface IMultiSearchRequest
{
IDictionary<string, ISearchRequest> Operations { get; set; }
Expand Down
Loading