Skip to content

Commit f320452

Browse files
committed
Removed some leftover OK properties, fix #576
1 parent e92716a commit f320452

File tree

9 files changed

+32
-38
lines changed

9 files changed

+32
-38
lines changed

build/Elasticsearch.Net.Connection.Thrift.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<id>Elasticsearch.Net.Connection.Thrift</id>
55
<version>1.0.0-beta1</version>
66
<title>Elasticsearch.Net.Connection.Thrift - Thrift support for Elasticsearch.Net</title>
7-
<authors>Martijn Laarman and contributors</authors>
7+
<authors>Elasticsearch Inc. and contributors</authors>
88
<owners>Elasticsearch Inc.</owners>
99
<iconUrl>http://nest.azurewebsites.net/images/elasticsearch-net-nuget-icon.png</iconUrl>
1010
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>

build/Elasticsearch.Net.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<id>Elasticsearch.Net</id>
55
<version>1.0.0-beta1</version>
66
<title>Elasticsearch.Net - official low level elasticsearch client</title>
7-
<authors>Martijn Laarman and contributors</authors>
7+
<authors>Elasticsearch Inc. and contributors</authors>
88
<owners>Elasticsearch Inc.</owners>
99
<iconUrl>http://nest.azurewebsites.net/images/elasticsearch-net-nuget-icon.png</iconUrl>
1010
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>

build/NEST.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<id>NEST</id>
55
<version>1.0.0-beta1</version>
66
<title>NEST - Elasticsearch Client</title>
7-
<authors>Martijn Laarman and contributors</authors>
7+
<authors>Elasticsearch Inc. and contributors</authors>
88
<owners>Elasticsearch Inc.</owners>
99
<iconUrl>http://nest.azurewebsites.net/images/nest-nuget-icon.png</iconUrl>
1010
<licenseUrl>https://github.com/elasticsearch/elasticsearch-net/blob/master/license.txt</licenseUrl>

src/Nest/Domain/Responses/DeleteResponse.cs

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@
22

33
namespace Nest
44
{
5-
public interface IDeleteResponse : IResponse
6-
{
7-
string Id { get; }
8-
string Index { get; }
9-
string Type { get; }
10-
string Version { get; }
11-
bool OK { get; }
12-
bool Found { get; }
13-
}
5+
public interface IDeleteResponse : IResponse
6+
{
7+
string Id { get; }
8+
string Index { get; }
9+
string Type { get; }
10+
string Version { get; }
11+
bool Found { get; }
12+
}
1413

1514
[JsonObject]
16-
public class DeleteResponse : BaseResponse, IDeleteResponse
17-
{
18-
[JsonProperty("_index")]
15+
public class DeleteResponse : BaseResponse, IDeleteResponse
16+
{
17+
[JsonProperty("_index")]
1918
public string Index { get; internal set; }
20-
[JsonProperty("_type")]
21-
public string Type { get; internal set; }
22-
[JsonProperty("_id")]
23-
public string Id { get; internal set; }
24-
[JsonProperty("_version")]
25-
public string Version { get; internal set; }
26-
[JsonProperty("ok")]
27-
public bool OK { get; internal set; }
28-
[JsonProperty("found")]
29-
public bool Found { get; internal set; }
30-
19+
[JsonProperty("_type")]
20+
public string Type { get; internal set; }
21+
[JsonProperty("_id")]
22+
public string Id { get; internal set; }
23+
[JsonProperty("_version")]
24+
public string Version { get; internal set; }
25+
[JsonProperty("found")]
26+
public bool Found { get; internal set; }
27+
3128
}
3229
}

src/Nest/Domain/Responses/IndexResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public interface IIndexResponse : IResponse
88
string Index { get; }
99
string Type { get; }
1010
string Version { get; }
11-
bool OK { get; }
11+
bool Created { get; }
1212
}
1313

1414
[JsonObject]
@@ -22,8 +22,8 @@ public class IndexResponse : BaseResponse, IIndexResponse
2222
public string Id { get; internal set; }
2323
[JsonProperty("_version")]
2424
public string Version { get; internal set; }
25-
[JsonProperty("ok")]
26-
public bool OK { get; internal set; }
25+
[JsonProperty("created")]
26+
public bool Created { get; internal set; }
2727

2828
}
2929
}

src/Nest/Domain/Responses/RootVersionInfoResponse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Nest
44
{
55
public interface IRootInfoResponse : IResponse
66
{
7-
bool OK { get; }
7+
int Status { get; }
88
string Name { get; }
99
string Tagline { get; }
1010
ElasticsearchVersionInfo Version { get; }
@@ -18,8 +18,8 @@ public RootInfoResponse()
1818
this.IsValid = true;
1919
}
2020

21-
[JsonProperty(PropertyName = "ok")]
22-
public bool OK { get; internal set; }
21+
[JsonProperty(PropertyName = "status")]
22+
public int Status { get; internal set; }
2323

2424
[JsonProperty(PropertyName = "name")]
2525
public string Name { get; internal set; }

src/Nest/Domain/Responses/UpdateResponse.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ namespace Nest
44
{
55
public interface IUpdateResponse : IResponse
66
{
7-
bool OK { get; }
87
ShardsMetaData ShardsHit { get; }
98
string Index { get; }
109
string Type { get; }
@@ -15,9 +14,6 @@ public interface IUpdateResponse : IResponse
1514
[JsonObject]
1615
public class UpdateResponse : BaseResponse, IUpdateResponse
1716
{
18-
[JsonProperty(PropertyName = "ok")]
19-
public bool OK { get; private set; }
20-
2117
[JsonProperty(PropertyName = "_shards")]
2218
public ShardsMetaData ShardsHit { get; private set; }
2319

src/Nest/Resolvers/ElasticContractResolver.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ protected override JsonContract CreateContract(Type objectType)
6969

7070
if (objectType == typeof(PropertyNameMarker))
7171
contract.Converter = new PropertyNameMarkerConverter(this.ConnectionSettings);
72+
7273
if (objectType == typeof(PropertyPathMarker))
7374
contract.Converter = new PropertyPathMarkerConverter(this.ConnectionSettings);
7475

src/Tests/Nest.Tests.Integration/Core/IndexTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void IndexUsingCreateFlag()
4444
var response = this._client.Index<ElasticsearchProject>(doc, i => i.OpType(OpTypeOptions.Create));
4545

4646
// Make sure the index request failed with HTTP status 409 since document with same id already exists.
47-
Assert.False(response.OK);
47+
Assert.False(response.Created);
4848
Assert.AreEqual(409, response.ConnectionStatus.HttpStatusCode);
4949
}
5050

@@ -78,7 +78,7 @@ public void IndexUsingCreateFlagOnNoRawResponseClient()
7878
var response = this._clientNoRawResponse.Index<ElasticsearchProject>(doc, i => i.OpType(OpTypeOptions.Create));
7979

8080
// Make sure the index request failed with HTTP status 409 since document with same id already exists.
81-
Assert.False(response.OK);
81+
Assert.False(response.Created);
8282
Assert.AreEqual(409, response.ConnectionStatus.HttpStatusCode);
8383
}
8484
}

0 commit comments

Comments
 (0)