opensearch
curl +X POST "http://10.20.31.21:9200/_reindex" \
-H "Content-Type: application/json" \
-d '
{
"source": { "index": "6891cf9af4db83733e6b11b2" },
"dest": { "index": "6891cf9af4db83733e6b11b2_bak" }
}'
curl -X GET "http://10.20.31.21:9200/_cat/indices?v"
curl "http://10.20.31.21:9200/6891cf9af4db83733e6b11b2_bak/_settings?pretty"
curl -X DELETE "http://10.20.31.21:9200/6891cf9af4db83733e6b11b2" \
-H "Content-Type: application/json"
curl "http://10.20.31.21:9200/6891cf9af4db83733e6b11b2/_search?pretty" -H 'Content-Type: application/json' -d'
{
"_source": {
"excludes": ["viki_vector"]
},
"query": {
"match_all": {}
}
}'
curl -X PUT "http://10.20.31.21:9200/6891cf9af4db83733e6b11b2" -H 'Content-Type: application/json' -d'
{
"settings": {
"index": {
"number_of_shards": 1,
"number_of_replicas": 0,
"knn": true
}
},
"mappings": {
"properties": {
"metadata": {
"properties": {
"chunkId": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"fileId": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"fileName": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"filePath": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"imageTag": { "type": "boolean" },
"isActive": { "type": "boolean" },
"keywords": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"knowledgeStoreId": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"number_of_tokens": { "type": "long" },
"serialNumber": { "type": "long" },
"tableTag": { "type": "boolean" },
"type": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
}
}
},
"text": {
"type": "text",
"fields": {
"keyword": { "type": "keyword", "ignore_above": 256 }
}
},
"viki_vector": {
"type": "knn_vector",
"dimension": 1024,
"method": {
"engine": "nmslib",
"space_type": "cosinesimil",
"name": "hnsw",
"parameters": {
"ef_construction": 512,
"m": 16
}
}
}
}
}
}'