Skip to content

Commit 0ad797a

Browse files
committed
changed refresh to use POST instead of undocumented GET endpoint fix #378
1 parent 07d070c commit 0ad797a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Nest.Tests.Integration/Reproduce/Reproduce211Tests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public void NoSearchResults()
4242

4343
//indexing is NRT so issueing a search
4444
//right after indexing might not return the documents just yet.
45-
this._client.Refresh();
45+
var refreshResult = this._client.Refresh();
46+
Assert.True(refreshResult.IsValid);
4647

4748
var results = this._client.Search<Post>(s => s
4849
.Index(index)

src/Nest/ElasticClient-Refresh.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public IIndicesShardResponse Refresh<T>() where T : class
4141
}
4242
private IndicesShardResponse _Refresh(string path)
4343
{
44-
var status = this.Connection.GetSync(path);
44+
var status = this.Connection.PostSync(path, null);
4545
var r = this.Deserialize<IndicesShardResponse>(status);
4646
return r;
4747
}

0 commit comments

Comments
 (0)