我有一个我正在寻找的标题
标题是,并以“警察日记:stefan zweig”的形式存储在文档中
当我搜索“警察”时,我得到了结果。但是当我搜索 Policeman 时,我没有得到结果。
这是查询:
{
"query": {
"bool": {
"should": [
{
"multi_match": {
"fields": [
"title",
omitted because irrelevance...
],
"query": "Policeman",
"fuzziness": "1.5",
"prefix_length": "2"
}
}
],
"must": {
omitted because irrelevance...
}
}
},
"sort": [
{
"_score": {
"order": "desc"
}
}
]
}
这是映射
{
"books": {
"mappings": {
"book": {
"_all": {
"analyzer": "nGram_analyzer",
"search_analyzer": "whitespace_analyzer"
},
"properties": {
"title": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
},
"sort": {
"type": "text",
"analyzer": "to order in another language, (creates a string with symbols)",
"fielddata": true
}
}
}
}
}
}
}
}
应该注意的是,如果我搜索“某人的头衔”,我有一个标题为“某个头衔”的文档会被点击。
我不明白为什么警察的书没有出现。