Rest: remove status code from main action

Today we give the HTTP status back within the HTTP response itself and within the JSON response as well:

```sh
curl localhost:9200/
```

```js
{
  "status" : 200,
  "name" : "Red Wolf",
  "version" : {
    "number" : "2.0.0",
    "build_hash" : "6837a61d8a646a2ac7dc8da1ab3c4ab85d60882d",
    "build_timestamp" : "2014-08-19T13:55:56Z",
    "build_snapshot" : true,
    "lucene_version" : "4.9"
  },
  "tagline" : "You Know, for Search"
}
```
This commit is contained in:
David Pilato 2014-12-10 11:17:46 +01:00
parent 261eb5b5ce
commit 052645903a
4 changed files with 5 additions and 3 deletions

View File

@ -89,6 +89,11 @@ with values in a single array.
}
---------------
=== Main API
Previously, calling `GET /` was giving back the http status code within the json response
in addition to the actual HTTP status code. We removed `status` field in json response.
=== Java API
Some query builders have been removed or renamed:

View File

@ -1,7 +1,6 @@
---
"Info":
- do: {info: {}}
- match: {status: 200}
- is_true: name
- is_true: cluster_name
- is_true: tagline

View File

@ -1,7 +1,6 @@
---
"Lucene Version":
- do: {info: {}}
- match: {status: 200}
- is_true: version.lucene_version

View File

@ -72,7 +72,6 @@ public class RestMainAction extends BaseRestHandler {
}
builder.startObject();
builder.field("status", status.getStatus());
if (settings.get("name") != null) {
builder.field("name", settings.get("name"));
}