'How to write comments in Kibana console?
Can you provide me with a hint how to comment out lines in Kibana Dev Tools console? I am interested in comment syntax.
Solution 1:[1]
You can comment out one line at a time by using #. For instance:
# This is a search command
GET /_search
{
"query": {
"match_all": {}
}
}
Solution 2:[2]
If you were to comment out a line or lines, you could add /* */, for example, /* "field": "statType.keyword" */
GET /exercise-index/_search
{
"_source": {
"includes": ["content"]
},
"query": {
"exists": {"field": "inclination"}
},
"aggs": {
"location": {
"terms": {
"field": "location"
/* "size": 10 */
}
}
}
}
at the query above, we commented out a line in agg with /* */.
PS:
- The syntax check will fail after you add
/* */on a line, but it does not affect the query. - After add
/* */, you need to remove comma at the line before to meet the json syntax.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | kahveci |
| Solution 2 | buxizhizhoum |
