问题概述
- 使用 python 客户端 代码进行创建,【之前成功创建,但是现在出现报错,报错代码
es_connection.client.indices.create
】
def create_vector_index(dataset_index_name,vector_query_field,query_field):
es_connection = get_collention(dataset_index_name,vector_query_field,query_field)
es_connection.client.indices.create(
index=dataset_index_name,
mappings={
"properties": {
f"{query_field}": {
"type": "text",
"analyzer": "ik_max_word",
"search_analyzer": "ik_smart",
"fields": {
"raw": {
"type": "keyword"
}
}