Skip to content

Commit

Permalink
remove file from search template request, had already removed the cru…
Browse files Browse the repository at this point in the history
…d template API's elastic/elasticsearch#25437
  • Loading branch information
Mpdreamz committed Oct 11, 2017
1 parent 311970e commit cac92ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
7 changes: 0 additions & 7 deletions src/Nest/Search/SearchTemplate/SearchTemplateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ public partial interface ISearchTemplateRequest : ICovariantSearchRequest
[JsonProperty("inline")]
string Inline { get; set; }

[JsonProperty("file")]
string File { get; set; }

[JsonProperty("id")]
string Id { get; set; }

Expand All @@ -31,7 +28,6 @@ public partial interface ISearchTemplateRequest : ICovariantSearchRequest
public partial class SearchTemplateRequest
{
public string Inline { get; set; }
public string File { get; set; }
public string Id { get; set; }
public IDictionary<string, object> Params { get; set; }
protected Type ClrType { get; set; }
Expand Down Expand Up @@ -82,9 +78,6 @@ public partial class SearchTemplateDescriptor<T> where T : class
string ISearchTemplateRequest.Inline { get; set; }
public SearchTemplateDescriptor<T> Inline(string template) => Assign(a => a.Inline = template);

string ISearchTemplateRequest.File { get; set; }
public SearchTemplateDescriptor<T> File(string file) => Assign(a => a.File = file);

string ISearchTemplateRequest.Id { get; set; }
public SearchTemplateDescriptor<T> Id(string id) => Assign(a => a.Id = id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ protected override LazyResponses ClientUsage() => Calls(
new { index = "devs" },
new { id = "template-id"},
new { index = "devs"},
new { file = "template-file"}
};

protected override Func<MultiSearchTemplateDescriptor, IMultiSearchTemplateRequest> Fluent => ms => ms
Expand All @@ -52,8 +51,7 @@ protected override LazyResponses ClientUsage() => Calls(
.Add("state", "Stable")
)
)
.Template<Project>("id", s => s.Index("devs").Id("template-id"))
.Template<Project>("file", s => s.Index("devs").File("template-file"));
.Template<Project>("id", s => s.Index("devs").Id("template-id"));

protected override MultiSearchTemplateRequest Initializer => new MultiSearchTemplateRequest(typeof(Project), typeof(Project))
{
Expand All @@ -69,8 +67,6 @@ protected override LazyResponses ClientUsage() => Calls(
}
},
{ "id", new SearchTemplateRequest<Project>("devs") { Id = "template-id" } },
{ "file", new SearchTemplateRequest<Project>("devs") { File = "template-file" } }

}
};

Expand All @@ -85,9 +81,6 @@ protected override void ExpectResponse(IMultiSearchResponse response)
id.Should().NotBeNull();
id.ShouldNotBeValid();

var file = response.GetResponse<Project>("file");
file.Should().NotBeNull();
file.ShouldNotBeValid();
}
}
}

0 comments on commit cac92ed

Please sign in to comment.