Skip to content

Commit 7cac6ab

Browse files
committed
Revert grammar endpoint doc example to clean JSON format
Signed-off-by: Eric Wei <mengwei.eric@gmail.com>
1 parent d72fe63 commit 7cac6ab

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

docs/user/ppl/interfaces/endpoint.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,16 +302,26 @@ You can send an HTTP GET request to endpoint **/_plugins/_ppl/_grammar** to fetc
302302

303303
### Example
304304

305-
```bash
306-
curl -sS -X GET localhost:9200/_plugins/_ppl/_grammar | python3 -m json.tool | grep -E '"bundleVersion"|"antlrVersion"|"startRuleIndex"|"ignoredTokens"|"rulesToVisit"'
305+
```bash ppl ignore
306+
curl -sS -X GET localhost:9200/_plugins/_ppl/_grammar
307307
```
308308

309309
Expected output (trimmed):
310310

311-
```text
312-
"bundleVersion": "1.0",
313-
"antlrVersion": "4.13.2",
314-
"startRuleIndex": 0,
315-
"ignoredTokens": [
316-
"rulesToVisit": [
311+
```json
312+
{
313+
"bundleVersion": "1.0",
314+
"antlrVersion": "4.13.2",
315+
"grammarHash": "sha256:...",
316+
"startRuleIndex": 0,
317+
"lexerSerializedATN": [4, ...],
318+
"parserSerializedATN": [4, ...],
319+
"lexerRuleNames": ["SEARCH", "..."],
320+
"parserRuleNames": ["root", "..."],
321+
"literalNames": [null, "'SEARCH'", "..."],
322+
"symbolicNames": [null, "SEARCH", "..."],
323+
"tokenDictionary": {"PIPE": 196, "...": 0},
324+
"ignoredTokens": [472, 473, "..."],
325+
"rulesToVisit": [200, 201, "..."]
326+
}
317327
```

0 commit comments

Comments
 (0)