@@ -20,7 +20,6 @@ ok $b->add_action(), 'Empty add action';
20
20
ok $b -> add_action(
21
21
index => {
22
22
index => ' foo' ,
23
- type => ' bar' ,
24
23
id => 1,
25
24
pipeline => ' foo' ,
26
25
routing => 1,
@@ -33,7 +32,6 @@ ok $b->add_action(
33
32
},
34
33
index => {
35
34
_index => ' foo' ,
36
- _type => ' bar' ,
37
35
_id => 2,
38
36
_routing => 2,
39
37
_parent => 2,
@@ -49,14 +47,14 @@ ok $b->add_action(
49
47
50
48
cmp_deeply $b -> _buffer,
51
49
[
52
- q( {"index":{"_id":1,"_index":"foo","_type":"bar"," parent":1,"pipeline":"foo","routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
50
+ q( {"index":{"_id":1,"_index":"foo","parent":1,"pipeline":"foo","routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
53
51
q( {"foo":"bar"}) ,
54
- q( {"index":{"_id":2,"_index":"foo","_type":"bar"," parent":2,"routing":2,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
52
+ q( {"index":{"_id":2,"_index":"foo","parent":2,"routing":2,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
55
53
q( {"foo":"bar"})
56
54
],
57
55
" Index actions in buffer" ;
58
56
59
- is $b -> _buffer_size, 341 , " Index actions buffer size" ;
57
+ is $b -> _buffer_size, 313 , " Index actions buffer size" ;
60
58
is $b -> _buffer_count, 2, " Index actions buffer count" ;
61
59
62
60
$b -> clear_buffer;
@@ -66,7 +64,6 @@ $b->clear_buffer;
66
64
ok $b -> add_action(
67
65
create => {
68
66
index => ' foo' ,
69
- type => ' bar' ,
70
67
id => 1,
71
68
routing => 1,
72
69
parent => 1,
@@ -79,7 +76,6 @@ ok $b->add_action(
79
76
},
80
77
create => {
81
78
_index => ' foo' ,
82
- _type => ' bar' ,
83
79
_id => 2,
84
80
_routing => 2,
85
81
_parent => 2,
@@ -94,14 +90,14 @@ ok $b->add_action(
94
90
95
91
cmp_deeply $b -> _buffer,
96
92
[
97
- q( {"create":{"_id":1,"_index":"foo","_type":"bar"," parent":1,"pipeline":"foo","routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
93
+ q( {"create":{"_id":1,"_index":"foo","parent":1,"pipeline":"foo","routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
98
94
q( {"foo":"bar"}) ,
99
- q( {"create":{"_id":2,"_index":"foo","_type":"bar"," parent":2,"routing":2,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
95
+ q( {"create":{"_id":2,"_index":"foo","parent":2,"routing":2,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
100
96
q( {"foo":"bar"})
101
97
],
102
98
" Create actions in buffer" ;
103
99
104
- is $b -> _buffer_size, 343 , " Create actions buffer size" ;
100
+ is $b -> _buffer_size, 315 , " Create actions buffer size" ;
105
101
is $b -> _buffer_count, 2, " Create actions buffer count" ;
106
102
107
103
$b -> clear_buffer;
@@ -111,7 +107,6 @@ $b->clear_buffer;
111
107
ok $b -> add_action(
112
108
delete => {
113
109
index => ' foo' ,
114
- type => ' bar' ,
115
110
id => 1,
116
111
routing => 1,
117
112
parent => 1,
@@ -120,7 +115,6 @@ ok $b->add_action(
120
115
},
121
116
delete => {
122
117
_index => ' foo' ,
123
- _type => ' bar' ,
124
118
_id => 2,
125
119
_routing => 2,
126
120
_parent => 2,
@@ -132,12 +126,12 @@ ok $b->add_action(
132
126
133
127
cmp_deeply $b -> _buffer,
134
128
[
135
- q( {"delete":{"_id":1,"_index":"foo","_type":"bar"," parent":1,"routing":1,"version":1,"version_type":"external"}}) ,
136
- q( {"delete":{"_id":2,"_index":"foo","_type":"bar"," parent":2,"routing":2,"version":1,"version_type":"external"}}) ,
129
+ q( {"delete":{"_id":1,"_index":"foo","parent":1,"routing":1,"version":1,"version_type":"external"}}) ,
130
+ q( {"delete":{"_id":2,"_index":"foo","parent":2,"routing":2,"version":1,"version_type":"external"}}) ,
137
131
],
138
132
" Delete actions in buffer" ;
139
133
140
- is $b -> _buffer_size, 222 , " Delete actions buffer size" ;
134
+ is $b -> _buffer_size, 194 , " Delete actions buffer size" ;
141
135
is $b -> _buffer_count, 2, " Delete actions buffer count" ;
142
136
143
137
$b -> clear_buffer;
@@ -147,7 +141,6 @@ $b->clear_buffer;
147
141
ok $b -> add_action(
148
142
update => {
149
143
index => ' foo' ,
150
- type => ' bar' ,
151
144
id => 1,
152
145
routing => 1,
153
146
parent => 1,
@@ -168,7 +161,6 @@ ok $b->add_action(
168
161
},
169
162
update => {
170
163
_index => ' foo' ,
171
- _type => ' bar' ,
172
164
_id => 1,
173
165
_routing => 1,
174
166
_parent => 1,
@@ -192,14 +184,14 @@ ok $b->add_action(
192
184
193
185
cmp_deeply $b -> _buffer,
194
186
[
195
- q( {"update":{"_id":1,"_index":"foo","_type":"bar"," parent":1,"routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
187
+ q( {"update":{"_id":1,"_index":"foo","parent":1,"routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
196
188
q( {"_source":"true","_source_excludes":["bar"],"_source_includes":["foo"],"detect_noop":"true","doc":{"foo":"bar"},"doc_as_upsert":1,"fields":["*"],"retry_on_conflict":3,"script":"ctx._source+=1","scripted_upsert":"true"}) ,
197
- q( {"update":{"_id":1,"_index":"foo","_type":"bar"," parent":1,"routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
189
+ q( {"update":{"_id":1,"_index":"foo","parent":1,"routing":1,"timestamp":1380019061000,"ttl":"10m","version":1,"version_type":"external"}}) ,
198
190
q( {"_source":"true","_source_excludes":["bar"],"_source_includes":["foo"],"detect_noop":"true","doc":{"foo":"bar"},"doc_as_upsert":1,"fields":["*"],"retry_on_conflict":3,"script":"ctx._source+=1","scripted_upsert":"true"})
199
191
],
200
192
" Update actions in buffer" ;
201
193
202
- is $b -> _buffer_size, 738 , " Update actions buffer size" ;
194
+ is $b -> _buffer_size, 710 , " Update actions buffer size" ;
203
195
is $b -> _buffer_count, 2, " Update actions buffer count" ;
204
196
205
197
$b -> clear_buffer;
@@ -211,16 +203,14 @@ throws_ok { $b->add_action( 'foo' => {} ) } qr/Unrecognised action/,
211
203
throws_ok { $b -> add_action( ' index' , ' bar' ) } qr / Missing <params>/ ,
212
204
' Missing params' ;
213
205
214
- throws_ok { $b -> add_action( index => { type => ' t ' } ) }
206
+ throws_ok { $b -> add_action( index => { } ) }
215
207
qr / Missing .*<index>/ , ' Missing index' ;
216
208
throws_ok { $b -> add_action( index => { index => ' i' } ) }
217
- qr / Missing .*<type>/ , ' Missing type' ;
218
- throws_ok { $b -> add_action( index => { index => ' i' , type => ' t' } ) }
219
209
qr / Missing <source>/ , ' Missing source' ;
220
210
221
211
throws_ok {
222
212
$b -> add_action(
223
- index => { index => ' i' , type => ' t ' , source => {}, foo => 1 } );
213
+ index => { index => ' i' , source => {}, foo => 1 } );
224
214
}
225
215
qr / Unknown params/ , ' Unknown params' ;
226
216
0 commit comments