"settings": {
"index": {
"creation_date": "1607592412988",
"number_of_shards": "1",
"number_of_replicas": "1",
"uuid": "L_Z-Y-YlRiWiD5gnPWftSg",
"version": {"created": "7090299"},
"provided_name": "repository_index",
}
}
mappings:
"mappings": {
"_doc": {
"properties": {
"type_num": {"type": "integer"},
"creator_id": {"type": "integer"},
"name": {"analyzer": "ik_max_word", "type": "text"},
"team_id": {"type": "integer"},
}
}
}
{
"_index": "repository_index",
"_type": "_doc",
"_id": "1",
"_version": 1,
"_score": 1,
"_source": {"creator_id": 6, "team_id": 2, "type_num": 2, "name": "测试数据"},
}
POST _search
{
"suggest": {
"my_suggestion": {
"text": "测试",
"term": {
"field": "name"
}
}
}
}
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 6,
"successful" : 6,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 0,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
},
"suggest" : {
"my_suggestion" : [
{
"text" : "测试",
"offset" : 0,
"length" : 2,
"options" : [ ]
}
]
}
}