Skip to content

Commit

Permalink
Fix an error in building an index from a model (#3615) (#3621)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a46a24)

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 02ba824 commit 8881096
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions _search-plugins/knn/approximate-knn.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ POST _bulk
{ "train-field": [4.5, 5.5, 6.7, 3.7]}
{ "index": { "_index": "train-index", "_id": "4" } }
{ "train-field": [1.5, 5.5, 4.5, 6.4]}
...
```

After indexing into the training index completes, we can call the Train API:
Expand All @@ -182,19 +181,14 @@ POST /_plugins/_knn/models/my-model/_train
"training_index": "train-index",
"training_field": "train-field",
"dimension": 4,
"description": "My models description",
"search_size": 500,
"description": "My model description",
"method": {
"name": "hnsw",
"name": "ivf",
"engine": "faiss",
"space_type": "l2",
"parameters": {
"encoder": {
"name": "pq",
"parameters": {
"code_size": 8,
"m": 8
}
}
"nlist": 4,
"nprobes": 2
}
}
}
Expand Down

0 comments on commit 8881096

Please sign in to comment.