Skip to content

Commit

Permalink
fix: indent bug
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Oct 17, 2023
1 parent 81588e4 commit ac6ee52
Showing 1 changed file with 35 additions and 37 deletions.
72 changes: 35 additions & 37 deletions docs/tutorial/vald-agent-standalone-on-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,43 +333,41 @@ This chapter uses [NGT](https://github.com/yahoojapan/ngt) as Vald Agent to perf
1. Remove
- Remove indexed 400 training datasets from the Vald agent.
<details><summary>example code</summary><br>
```go
for i := range ids [:insertCount] {
_, err := client.Remove(ctx, &payload.Remove_Request{
Id: &payload.Object_ID{
Id: ids[i],
},
})
if err != nil {
glg.Fatal(err)
}
if i%10 == 0 {
glg.Infof("Removed %d", i)
}
}
```
</details>
- Remove from the index manually instead of waiting for auto indexing.
The removed vectors still exist in the NGT graph index before the SaveIndex (or CreateAndSaveIndex) API is called.
If you run the below code, the indexes will be removed completely from the Vald Agent NGT graph and the Backup file.
<details><summary>example code</summary><br>
```go
_, err = client.SaveIndex(ctx, &payload.Empty{})
if err != nil {
glg.Fatal(err)
}
```
</details>
</details>
- Remove indexed 400 training datasets from the Vald agent.
<details><summary>example code</summary><br>
```go
for i := range ids [:insertCount] {
_, err := client.Remove(ctx, &payload.Remove_Request{
Id: &payload.Object_ID{
Id: ids[i],
},
})
if err != nil {
glg.Fatal(err)
}
if i%10 == 0 {
glg.Infof("Removed %d", i)
}
}
```
</details>
- Remove from the index manually instead of waiting for auto indexing.
The removed vectors still exist in the NGT graph index before the SaveIndex (or CreateAndSaveIndex) API is called.
If you run the below code, the indexes will be removed completely from the Vald Agent NGT graph and the Backup file.
<details><summary>example code</summary><br>
```go
_, err = client.SaveIndex(ctx, &payload.Empty{})
if err != nil {
glg.Fatal(err)
}
```
</details>
<div class="caution">
It would be best to run CreateIndex() after Insert() without waiting for auto-indexing in your client code, even you can wait for the finishing auto createIndex function, which sometimes takes a long time.
Expand Down

0 comments on commit ac6ee52

Please sign in to comment.