diff --git a/rest-api-spec/api/cat.aliases.json b/rest-api-spec/api/cat.aliases.json index 10c1beb658c..1e50586ed92 100644 --- a/rest-api-spec/api/cat.aliases.json +++ b/rest-api-spec/api/cat.aliases.json @@ -32,7 +32,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.allocation.json b/rest-api-spec/api/cat.allocation.json index e5d1e68c842..f6da91d3eef 100644 --- a/rest-api-spec/api/cat.allocation.json +++ b/rest-api-spec/api/cat.allocation.json @@ -37,7 +37,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.count.json b/rest-api-spec/api/cat.count.json index 1b993829574..1e279de42d2 100644 --- a/rest-api-spec/api/cat.count.json +++ b/rest-api-spec/api/cat.count.json @@ -32,7 +32,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.fielddata.json b/rest-api-spec/api/cat.fielddata.json index 2550f421eca..09eeb0bb659 100644 --- a/rest-api-spec/api/cat.fielddata.json +++ b/rest-api-spec/api/cat.fielddata.json @@ -37,7 +37,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true }, "fields": { "type": "list", diff --git a/rest-api-spec/api/cat.health.json b/rest-api-spec/api/cat.health.json index 5d784c97cd3..9cc7b387e0d 100644 --- a/rest-api-spec/api/cat.health.json +++ b/rest-api-spec/api/cat.health.json @@ -33,7 +33,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.indices.json b/rest-api-spec/api/cat.indices.json index 572d5c89cf0..746e5d6bbe2 100644 --- a/rest-api-spec/api/cat.indices.json +++ b/rest-api-spec/api/cat.indices.json @@ -42,7 +42,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.master.json b/rest-api-spec/api/cat.master.json index 3702665fc38..81e5f4cb679 100644 --- a/rest-api-spec/api/cat.master.json +++ b/rest-api-spec/api/cat.master.json @@ -28,7 +28,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.nodes.json b/rest-api-spec/api/cat.nodes.json index f530f8d93c3..1797d1bec61 100644 --- a/rest-api-spec/api/cat.nodes.json +++ b/rest-api-spec/api/cat.nodes.json @@ -28,7 +28,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.pending_tasks.json b/rest-api-spec/api/cat.pending_tasks.json index 1d8ef364f62..1fbb622d7e4 100644 --- a/rest-api-spec/api/cat.pending_tasks.json +++ b/rest-api-spec/api/cat.pending_tasks.json @@ -28,7 +28,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.plugins.json b/rest-api-spec/api/cat.plugins.json index c5f4b60fb7d..1146338197d 100644 --- a/rest-api-spec/api/cat.plugins.json +++ b/rest-api-spec/api/cat.plugins.json @@ -26,7 +26,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.recovery.json b/rest-api-spec/api/cat.recovery.json index e0b57a2f86d..cd58694c6f0 100644 --- a/rest-api-spec/api/cat.recovery.json +++ b/rest-api-spec/api/cat.recovery.json @@ -33,7 +33,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.shards.json b/rest-api-spec/api/cat.shards.json index cd7fbf776e4..2119355f21b 100644 --- a/rest-api-spec/api/cat.shards.json +++ b/rest-api-spec/api/cat.shards.json @@ -32,7 +32,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true } } }, diff --git a/rest-api-spec/api/cat.thread_pool.json b/rest-api-spec/api/cat.thread_pool.json index a0bd7868a56..3f358f7a873 100644 --- a/rest-api-spec/api/cat.thread_pool.json +++ b/rest-api-spec/api/cat.thread_pool.json @@ -28,7 +28,7 @@ "v": { "type": "boolean", "description": "Verbose mode. Display column headers", - "default": false + "default": true }, "full_id": { "type": "boolean", diff --git a/rest-api-spec/test/cat.aliases/10_basic.yaml b/rest-api-spec/test/cat.aliases/10_basic.yaml index ec9e07f225e..dea14a45bd3 100755 --- a/rest-api-spec/test/cat.aliases/10_basic.yaml +++ b/rest-api-spec/test/cat.aliases/10_basic.yaml @@ -17,7 +17,8 @@ "Empty cluster": - do: - cat.aliases: {} + cat.aliases: + v: false - match: $body: | @@ -37,7 +38,8 @@ name: test_alias - do: - cat.aliases: {} + cat.aliases: + v: false - match: $body: | @@ -73,7 +75,8 @@ term: foo: bar - do: - cat.aliases: {} + cat.aliases: + v: false - match: $body: | @@ -105,12 +108,14 @@ - do: cat.aliases: name: test_1 + v: false - match: $body: /^test_1 .+ \n$/ - do: cat.aliases: + v: false name: test_2 - match: @@ -118,6 +123,7 @@ - do: cat.aliases: + v: false name: test_* - match: @@ -172,7 +178,8 @@ - do: cat.aliases: - h: [index, alias] + v: false + h: [index, alias] - match: $body: /^ test \s+ test_1 \s+ $/ diff --git a/rest-api-spec/test/cat.allocation/10_basic.yaml b/rest-api-spec/test/cat.allocation/10_basic.yaml index 83d14f16759..085bf7808e8 100755 --- a/rest-api-spec/test/cat.allocation/10_basic.yaml +++ b/rest-api-spec/test/cat.allocation/10_basic.yaml @@ -3,6 +3,7 @@ - do: cat.allocation: help: true + v: false - match: $body: | @@ -20,7 +21,8 @@ "Empty cluster": - do: - cat.allocation: {} + cat.allocation: + v: false - match: $body: | @@ -50,7 +52,8 @@ timeout: 1s - do: - cat.allocation: {} + cat.allocation: + v: false - match: $body: | @@ -80,6 +83,7 @@ - do: cat.allocation: node_id: _master + v: false - match: $body: | @@ -99,6 +103,7 @@ - do: cat.allocation: node_id: non_existent + v: false - match: $body: | @@ -143,6 +148,7 @@ - do: cat.allocation: h: [disk.percent, node] + v: false - match: $body: | @@ -179,6 +185,7 @@ - do: cat.allocation: bytes: g + v: false - match: $body: | diff --git a/rest-api-spec/test/cat.count/10_basic.yaml b/rest-api-spec/test/cat.count/10_basic.yaml index 5ebcd8d8198..76755327140 100755 --- a/rest-api-spec/test/cat.count/10_basic.yaml +++ b/rest-api-spec/test/cat.count/10_basic.yaml @@ -14,7 +14,8 @@ "Test cat count output": - do: - cat.count: {} + cat.count: + v: false - match: $body: | @@ -30,7 +31,8 @@ refresh: true - do: - cat.count: {} + cat.count: + v: false - match: $body: | @@ -48,6 +50,7 @@ - do: cat.count: h: count + v: false - match: $body: | @@ -58,6 +61,7 @@ - do: cat.count: index: index1 + v: false - match: $body: | diff --git a/rest-api-spec/test/cat.fielddata/10_basic.yaml b/rest-api-spec/test/cat.fielddata/10_basic.yaml index bc362fae58c..ada97021e6e 100644 --- a/rest-api-spec/test/cat.fielddata/10_basic.yaml +++ b/rest-api-spec/test/cat.fielddata/10_basic.yaml @@ -17,7 +17,8 @@ "Test cat fielddata output": - do: - cat.fielddata: {} + cat.fielddata: + v: false - do: index: diff --git a/rest-api-spec/test/cat.indices/10_basic.yaml b/rest-api-spec/test/cat.indices/10_basic.yaml index ea82477e029..6699fe0c382 100644 --- a/rest-api-spec/test/cat.indices/10_basic.yaml +++ b/rest-api-spec/test/cat.indices/10_basic.yaml @@ -2,7 +2,8 @@ "Test cat indices output": - do: - cat.indices: {} + cat.indices: + v: false - match: $body: | @@ -19,7 +20,8 @@ cluster.health: wait_for_status: yellow - do: - cat.indices: {} + cat.indices: + v: false - match: $body: | diff --git a/rest-api-spec/test/cat.nodes/10_basic.yaml b/rest-api-spec/test/cat.nodes/10_basic.yaml index 006e6577866..f7e9bedcd0b 100755 --- a/rest-api-spec/test/cat.nodes/10_basic.yaml +++ b/rest-api-spec/test/cat.nodes/10_basic.yaml @@ -2,7 +2,8 @@ "Test cat nodes output": - do: - cat.nodes: {} + cat.nodes: + v: false - match: $body: | diff --git a/rest-api-spec/test/cat.recovery/10_basic.yaml b/rest-api-spec/test/cat.recovery/10_basic.yaml index ebaa4fb442b..1f8db97cf8d 100755 --- a/rest-api-spec/test/cat.recovery/10_basic.yaml +++ b/rest-api-spec/test/cat.recovery/10_basic.yaml @@ -2,7 +2,8 @@ "Test cat recovery output": - do: - cat.recovery: {} + cat.recovery: + v: false - match: $body: | @@ -19,7 +20,8 @@ cluster.health: wait_for_status: yellow - do: - cat.recovery: {} + cat.recovery: + v: false - match: $body: | diff --git a/rest-api-spec/test/cat.shards/10_basic.yaml b/rest-api-spec/test/cat.shards/10_basic.yaml index ed2af7ad7a6..b0f6f7cf7d7 100755 --- a/rest-api-spec/test/cat.shards/10_basic.yaml +++ b/rest-api-spec/test/cat.shards/10_basic.yaml @@ -2,7 +2,8 @@ "Test cat shards output": - do: - cat.shards: {} + cat.shards: + v: false - match: $body: | @@ -19,7 +20,8 @@ cluster.health: wait_for_status: yellow - do: - cat.shards: {} + cat.shards: + v: false - match: $body: | @@ -38,7 +40,8 @@ wait_for_relocating_shards: 0 - do: - cat.shards: {} + cat.shards: + v: false - match: $body: | /^(index(1|2) \s+ \d \s+ (p|r) \s+ ((STARTED|INITIALIZING) \s+ (\d \s+ (\d+|\d+[.]\d+)(kb|b) \s+)? \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} \s+ .+|UNASSIGNED \s+) \n?){15}$/ @@ -46,6 +49,7 @@ - do: cat.shards: index: index2 + v: false - match: $body: | /^(index2 \s+ \d \s+ (p|r) \s+ ((STARTED|INITIALIZING) \s+ (\d \s+ (\d+|\d+[.]\d+)(kb|b) \s+)? \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} \s+ .+|UNASSIGNED \s+) \n?){5}$/ diff --git a/rest-api-spec/test/cat.thread_pool/10_basic.yaml b/rest-api-spec/test/cat.thread_pool/10_basic.yaml index 0c8ac5b4028..edb87ce27b9 100755 --- a/rest-api-spec/test/cat.thread_pool/10_basic.yaml +++ b/rest-api-spec/test/cat.thread_pool/10_basic.yaml @@ -2,7 +2,8 @@ "Test cat thread_pool output": - do: - cat.thread_pool: {} + cat.thread_pool: + v: false - match: $body: | @@ -21,6 +22,7 @@ - do: cat.thread_pool: h: pid,id,h,i,po + v: false - match: $body: | diff --git a/src/main/java/org/elasticsearch/rest/action/support/RestTable.java b/src/main/java/org/elasticsearch/rest/action/support/RestTable.java index a2a9461ae77..2907bf6e326 100644 --- a/src/main/java/org/elasticsearch/rest/action/support/RestTable.java +++ b/src/main/java/org/elasticsearch/rest/action/support/RestTable.java @@ -68,7 +68,7 @@ public class RestTable { public static RestResponse buildTextPlainResponse(Table table, RestChannel channel) throws IOException { RestRequest request = channel.request(); - boolean verbose = request.paramAsBoolean("v", false); + boolean verbose = request.paramAsBoolean("v", true); List headers = buildDisplayHeaders(table, request); int[] width = buildWidths(table, request, verbose, headers);