Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriano Moreira La Selva authored May 29, 2020
1 parent 1f043b3 commit af4f6af
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,21 +183,21 @@ Atomic Updates:
```go
var docs []Document
docs = append(docs, map[string]interface{}{
"id": id,
"author_s": map[string]interface{}{
"set": "Teste 2",
},
"copies_i": map[string]interface{}{
"inc": 5,
},
"cat_ss": map[string]interface{}{
"add": time.Now().Format(time.RFC3339),
},
})

response, err = client.Document.AtomicUpdateMany(context.Background(), "identify-events", docs, &Parameters{
Commit: true,
})
"id": id,
"author_s": map[string]interface{}{
"set": "Teste 2",
},
"copies_i": map[string]interface{}{
"inc": 5,
},
"cat_ss": map[string]interface{}{
"add": time.Now().Format(time.RFC3339),
},
})

response, err = client.Document.AtomicUpdateMany(context.Background(), "identify-events", docs, &Parameters{
Commit: true,
})
```

>Obs: Solr supports several modifiers that atomically update values of a document. This allows updating only specific fields, which can help speed indexing processes in an environment where speed of index additions is critical to the application.
Expand Down

0 comments on commit af4f6af

Please sign in to comment.