Skip to content

Commit

Permalink
fix routing breaking change between versions
Browse files Browse the repository at this point in the history
  • Loading branch information
medcl committed May 14, 2020
1 parent 1cfd91b commit e4e56c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ READ_DOCS:

//fmt.Println(doc.Index,",",doc.Type,",",doc.Id)

// add doc "_routing"
// add doc "_routing" if exists
if _, ok := docI["_routing"]; ok {
str, ok := docI["_routing"].(string)
if ok && str != "" {
Expand Down
2 changes: 1 addition & 1 deletion domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Document struct {
Type string `json:"_type,omitempty"`
Id string `json:"_id,omitempty"`
source map[string]interface{} `json:"_source,omitempty"`
Routing string `json:"_routing,omitempty"`
Routing string `json:"routing,omitempty"` //after 6, only `routing` was supported
}

type Scroll struct {
Expand Down

0 comments on commit e4e56c4

Please sign in to comment.