format JSON. (#2870)

This commit is contained in:
Yi-Lin Tsai 2023-02-24 00:36:45 +08:00 committed by GitHub
parent 512db77db5
commit a2f3890754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 25 deletions

View File

@ -143,17 +143,17 @@ any `knn_vector` field that has a dimension matching the dimension of the model
```json
PUT /train-index
{
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 0
"settings": {
"number_of_shards": 3,
"number_of_replicas": 0
},
"mappings": {
"properties": {
"train-field": {
"type": "knn_vector",
"dimension": 4
"properties": {
"train-field": {
"type": "knn_vector",
"dimension": 4
}
}
}
}
}
```
@ -186,17 +186,17 @@ POST /_plugins/_knn/models/my-model/_train
"description": "My models description",
"search_size": 500,
"method": {
"name":"hnsw",
"engine":"faiss",
"parameters":{
"encoder":{
"name":"pq",
"parameters":{
"code_size": 8,
"m": 8
}
"name": "hnsw",
"engine": "faiss",
"parameters": {
"encoder": {
"name": "pq",
"parameters": {
"code_size": 8,
"m": 8
}
}
}
}
}
```
@ -216,18 +216,18 @@ library indexes:
```json
PUT /target-index
{
"settings" : {
"number_of_shards" : 3,
"number_of_replicas" : 1,
"settings": {
"number_of_shards": 3,
"number_of_replicas": 1,
"index.knn": true
},
"mappings": {
"properties": {
"target-field": {
"type": "knn_vector",
"model_id": "my-model"
"properties": {
"target-field": {
"type": "knn_vector",
"model_id": "my-model"
}
}
}
}
}
```