@@ -16,55 +16,55 @@ func TestBulkIndexRequestSerialization(t *testing.T) {
1616 }{
1717 // #0
1818 {
19- Request : NewBulkIndexRequest ().Index ("index1" ).Type ("tweet " ).Id ("1" ).
19+ Request : NewBulkIndexRequest ().Index ("index1" ).Type ("doc " ).Id ("1" ).
2020 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
2121 Expected : []string {
22- `{"index":{"_id":"1","_index":"index1","_type":"tweet "}}` ,
22+ `{"index":{"_id":"1","_index":"index1","_type":"doc "}}` ,
2323 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
2424 },
2525 },
2626 // #1
2727 {
28- Request : NewBulkIndexRequest ().OpType ("create" ).Index ("index1" ).Type ("tweet " ).Id ("1" ).
28+ Request : NewBulkIndexRequest ().OpType ("create" ).Index ("index1" ).Type ("doc " ).Id ("1" ).
2929 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
3030 Expected : []string {
31- `{"create":{"_id":"1","_index":"index1","_type":"tweet "}}` ,
31+ `{"create":{"_id":"1","_index":"index1","_type":"doc "}}` ,
3232 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
3333 },
3434 },
3535 // #2
3636 {
37- Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("tweet " ).Id ("1" ).
37+ Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("doc " ).Id ("1" ).
3838 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
3939 Expected : []string {
40- `{"index":{"_id":"1","_index":"index1","_type":"tweet "}}` ,
40+ `{"index":{"_id":"1","_index":"index1","_type":"doc "}}` ,
4141 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
4242 },
4343 },
4444 // #3
4545 {
46- Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("tweet " ).Id ("1" ).RetryOnConflict (42 ).
46+ Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("doc " ).Id ("1" ).RetryOnConflict (42 ).
4747 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
4848 Expected : []string {
49- `{"index":{"_id":"1","_index":"index1","_retry_on_conflict":42,"_type":"tweet "}}` ,
49+ `{"index":{"_id":"1","_index":"index1","_retry_on_conflict":42,"_type":"doc "}}` ,
5050 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
5151 },
5252 },
5353 // #4
5454 {
55- Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("tweet " ).Id ("1" ).Pipeline ("my_pipeline" ).
55+ Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("doc " ).Id ("1" ).Pipeline ("my_pipeline" ).
5656 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
5757 Expected : []string {
58- `{"index":{"_id":"1","_index":"index1","_type":"tweet ","pipeline":"my_pipeline"}}` ,
58+ `{"index":{"_id":"1","_index":"index1","_type":"doc ","pipeline":"my_pipeline"}}` ,
5959 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
6060 },
6161 },
6262 // #5
6363 {
64- Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("tweet " ).Id ("1" ).TTL ("1m" ).
64+ Request : NewBulkIndexRequest ().OpType ("index" ).Index ("index1" ).Type ("doc " ).Id ("1" ).TTL ("1m" ).
6565 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )}),
6666 Expected : []string {
67- `{"index":{"_id":"1","_index":"index1","_ttl":"1m","_type":"tweet "}}` ,
67+ `{"index":{"_id":"1","_index":"index1","_ttl":"1m","_type":"doc "}}` ,
6868 `{"user":"olivere","message":"","retweets":0,"created":"2014-01-18T23:59:58Z"}` ,
6969 },
7070 },
@@ -92,7 +92,7 @@ func TestBulkIndexRequestSerialization(t *testing.T) {
9292var bulkIndexRequestSerializationResult string
9393
9494func BenchmarkBulkIndexRequestSerialization (b * testing.B ) {
95- r := NewBulkIndexRequest ().Index (testIndexName ).Type ("tweet " ).Id ("1" ).
95+ r := NewBulkIndexRequest ().Index (testIndexName ).Type ("doc " ).Id ("1" ).
9696 Doc (tweet {User : "olivere" , Created : time .Date (2014 , 1 , 18 , 23 , 59 , 58 , 0 , time .UTC )})
9797 var s string
9898 for n := 0 ; n < b .N ; n ++ {
0 commit comments