@@ -31,85 +31,33 @@ setup:
3131 message :
3232 type : text
3333
34- # Document 1: Single dot field name "."
34+ # Bulk index all test documents
3535 - do :
36- index :
36+ bulk :
3737 index : test_disabled_object_4896
38- id : 1
39- body :
40- " @timestamp " : " 2025-11-26T17:10:00.000Z"
41- message : " single dot"
42- log :
43- " . " : " single dot value"
44-
45- # Document 2: Multiple dots field name ".."
46- - do :
47- index :
48- index : test_disabled_object_4896
49- id : 2
50- body :
51- " @timestamp " : " 2025-11-26T17:11:00.000Z"
52- message : " multiple dots"
53- log :
54- " .. " : " double dot value"
55-
56- # Document 3: Trailing dots field name "a..."
57- - do :
58- index :
59- index : test_disabled_object_4896
60- id : 3
61- body :
62- " @timestamp " : " 2025-11-26T17:12:00.000Z"
63- message : " trailing dots"
64- log :
65- " a... " : " trailing dots value"
66-
67- # Document 4: Leading dot field name ".a"
68- - do :
69- index :
70- index : test_disabled_object_4896
71- id : 4
72- body :
73- " @timestamp " : " 2025-11-26T17:13:00.000Z"
74- message : " leading dot"
75- log :
76- " .a " : " leading dot value"
77-
78- # Document 5: Middle dots field name "a..b"
79- - do :
80- index :
81- index : test_disabled_object_4896
82- id : 5
83- body :
84- " @timestamp " : " 2025-11-26T17:14:00.000Z"
85- message : " middle dots"
86- log :
87- " a..b " : " middle dots value"
88-
89- # Document 6: Multiple unusual fields in same object
90- - do :
91- index :
92- index : test_disabled_object_4896
93- id : 6
94- body :
95- " @timestamp " : " 2025-11-26T17:15:00.000Z"
96- message : " mixed fields"
97- log :
98- " . " : " dot1"
99- " .. " : " dot2"
100- " normal " : " normal value"
101-
102- # Document 7: Malformed top-level field name "log." (trailing dot)
103- - do :
104- index :
105- index : test_disabled_object_4896
106- id : 7
10738 refresh : true
10839 body :
109- " @timestamp " : " 2025-11-26T17:16:00.000Z"
110- message : " malformed top-level"
111- " log. " :
112- " nested " : " value in log."
40+ # Document 1: Single dot field name "."
41+ - ' {"index": {"_id": "1"}}'
42+ - ' {"@timestamp": "2025-11-26T17:10:00.000Z", "message": "single dot", "log": {".": "single dot value"}}'
43+ # Document 2: Multiple dots field name ".."
44+ - ' {"index": {"_id": "2"}}'
45+ - ' {"@timestamp": "2025-11-26T17:11:00.000Z", "message": "multiple dots", "log": {"..": "double dot value"}}'
46+ # Document 3: Trailing dots field name "a..."
47+ - ' {"index": {"_id": "3"}}'
48+ - ' {"@timestamp": "2025-11-26T17:12:00.000Z", "message": "trailing dots", "log": {"a...": "trailing dots value"}}'
49+ # Document 4: Leading dot field name ".a"
50+ - ' {"index": {"_id": "4"}}'
51+ - ' {"@timestamp": "2025-11-26T17:13:00.000Z", "message": "leading dot", "log": {".a": "leading dot value"}}'
52+ # Document 5: Middle dots field name "a..b"
53+ - ' {"index": {"_id": "5"}}'
54+ - ' {"@timestamp": "2025-11-26T17:14:00.000Z", "message": "middle dots", "log": {"a..b": "middle dots value"}}'
55+ # Document 6: Multiple unusual fields in same object
56+ - ' {"index": {"_id": "6"}}'
57+ - ' {"@timestamp": "2025-11-26T17:15:00.000Z", "message": "mixed fields", "log": {".": "dot1", "..": "dot2", "normal": "normal value"}}'
58+ # Document 7: Malformed top-level field name "log." (trailing dot)
59+ - ' {"index": {"_id": "7"}}'
60+ - ' {"@timestamp": "2025-11-26T17:16:00.000Z", "message": "malformed top-level", "log.": {"nested": "value in log."}}'
11361
11462---
11563teardown :
@@ -184,6 +132,27 @@ teardown:
184132 - match : { "total": 1 }
185133 - match : { "datarows.0.0": { ".a": "leading dot value" } }
186134
135+ # Querying "log.a" should NOT return the ".a" field value
136+ # Because "log.a" means nested field "a" inside "log", not literal ".a"
137+ - do :
138+ headers :
139+ Content-Type : ' application/json'
140+ ppl :
141+ body :
142+ query : source=test_disabled_object_4896 | where message = 'leading dot' | fields log.a
143+ - match : { "total": 1 }
144+ - match : { "datarows.0.0": null }
145+
146+ # To access literal field ".a" inside log, use backticks: log.`.a`
147+ - do :
148+ headers :
149+ Content-Type : ' application/json'
150+ ppl :
151+ body :
152+ query : source=test_disabled_object_4896 | where message = 'leading dot' | fields log.`.a`
153+ - match : { "total": 1 }
154+ - match : { "datarows.0.0": "leading dot value" }
155+
187156---
188157" Middle dots field name preserves original name " :
189158 - skip :
0 commit comments