Skip to content

Commit

Permalink
Revert "Feature/bulk delete request parent"
Browse files Browse the repository at this point in the history
  • Loading branch information
olivere committed May 15, 2016
1 parent ef68337 commit 7c6dd2b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions bulk_delete_request.go
Expand Up @@ -18,7 +18,6 @@ type BulkDeleteRequest struct {
index string
typ string
id string
parent string
routing string
refresh *bool
version int64 // default is MATCH_ANY
Expand All @@ -44,11 +43,6 @@ func (r *BulkDeleteRequest) Id(id string) *BulkDeleteRequest {
return r
}

func (r *BulkDeleteRequest) Parent(parent string) *BulkDeleteRequest {
r.parent = parent
return r
}

func (r *BulkDeleteRequest) Routing(routing string) *BulkDeleteRequest {
r.routing = routing
return r
Expand Down Expand Up @@ -93,9 +87,6 @@ func (r *BulkDeleteRequest) Source() ([]string, error) {
if r.id != "" {
deleteCommand["_id"] = r.id
}
if r.parent != "" {
deleteCommand["_parent"] = r.parent
}
if r.routing != "" {
deleteCommand["_routing"] = r.routing
}
Expand Down
6 changes: 0 additions & 6 deletions bulk_delete_request_test.go
Expand Up @@ -20,12 +20,6 @@ func TestBulkDeleteRequestSerialization(t *testing.T) {
`{"delete":{"_id":"1","_index":"index1","_type":"tweet"}}`,
},
},
{
Request: NewBulkDeleteRequest().Index("index1").Type("tweet").Id("1").Parent("2"),
Expected: []string{
`{"delete":{"_id":"1","_index":"index1","_parent":"2","_type":"tweet"}}`,
},
},
}

for i, test := range tests {
Expand Down

0 comments on commit 7c6dd2b

Please sign in to comment.