Skip to content

Commit 9a80a93

Browse files
test: logsdb test without doc values skipper
1 parent 003f1bb commit 9a80a93

File tree

1 file changed

+62
-0
lines changed
  • rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb

1 file changed

+62
-0
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/logsdb/10_settings.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,68 @@ create logs index:
6868
- is_true: test
6969
- match: { test.settings.index.mode: "logsdb" }
7070

71+
---
72+
create logs index without doc values sparse index:
73+
- do:
74+
indices.create:
75+
index: test
76+
body:
77+
settings:
78+
index:
79+
mapping:
80+
use_doc_values_skipper: false
81+
mode: logsdb
82+
number_of_shards: 2
83+
mappings:
84+
properties:
85+
"@timestamp":
86+
type: date
87+
host.name:
88+
type: keyword
89+
agent_id:
90+
type: keyword
91+
process_id:
92+
type: integer
93+
http_method:
94+
type: keyword
95+
message:
96+
type: text
97+
98+
- do:
99+
bulk:
100+
index: test
101+
refresh: true
102+
body:
103+
- { "index": { } }
104+
- { "@timestamp": "2024-02-12T10:30:00Z", ignored_field_stats: "foo", "agent_id": "darth-vader", "process_id": 101, "http_method": "GET", "message": "No, I am your father." }
105+
- { "index": { } }
106+
- { "@timestamp": "2024-02-12T10:31:00Z", "host.name": "bar", "agent_id": "yoda", "process_id": 102, "http_method": "PUT", "message": "Do. Or do not. There is no try." }
107+
- { "index": { } }
108+
- { "@timestamp": "2024-02-12T10:32:00Z", "host.name": "foo", "agent_id": "obi-wan", "process_id": 103, "http_method": "GET", "message": "May the force be with you." }
109+
- { "index": { } }
110+
- { "@timestamp": "2024-02-12T10:33:00Z", "host.name": "baz", "agent_id": "darth-vader", "process_id": 102, "http_method": "POST", "message": "I find your lack of faith disturbing." }
111+
- { "index": { } }
112+
- { "@timestamp": "2024-02-12T10:34:00Z", "host.name": "baz", "agent_id": "yoda", "process_id": 104, "http_method": "POST", "message": "Wars not make one great." }
113+
- { "index": { } }
114+
- { "@timestamp": "2024-02-12T10:35:00Z", "host.name": "foo", "agent_id": "obi-wan", "process_id": 105, "http_method": "GET", "message": "That's no moon. It's a space station." }
115+
116+
117+
- do:
118+
search:
119+
index: test
120+
body:
121+
query:
122+
match_all: {}
123+
124+
- match: { hits.total.value: 6 }
125+
126+
- do:
127+
indices.get_settings:
128+
index: test
129+
130+
- is_true: test
131+
- match: { test.settings.index.mode: "logsdb" }
132+
71133
---
72134
using default timestamp field mapping:
73135
- do:

0 commit comments

Comments
 (0)