Я ищу "AB" в эластичном поиске
результат: "ABB" перед "AB" (оценка ABB> AB)
Я хочу "AB"> "ABB"
{
'sort': [{'_score': {'order': 'desc'}}],
'from': _from,
'size': page_size,
'query': {
"multi_match": {
"query": key,
"type": "best_fields",
"fields": ["name^5", "intro"]
}
}
}
"mappings": {
"doc": {
"properties": {
"intro": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
}
},
"name": {
"type": "text",
"fields": {
"keyword": {
"ignore_above": 256,
"type": "keyword"
}
}
},
"id": {
"type": "long"
},
}
}
}
Мои данные на китайском
Такие как: имя: 刘佳 вступление: "xxxxxx" имя: 刘佳佳 вступление: "xxxxxx"