我从这里跟随了一个例子
索引的映射是
{
"mappings": {
"my_type": {
"properties": {
"full_text": {
"type": "string"
},
"exact_value": {
"type": "string",
"index": "not_analyzed"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
索引的文件是
{
"full_text": "Quick Foxes!",
"exact_value": "Quick Foxes!"
}
Run Code Online (Sandbox Code Playgroud)
我注意到在"full_text"字段上使用简单的匹配查询,如下所示
{
"query": {
"match": {
"full_text": "quick"
}
}
}
Run Code Online (Sandbox Code Playgroud)
我看到文件是匹配的.此外,如果我使用大写,即"QUICK",作为搜索词,它会显示文档是匹配的.
为什么会这样?默认情况下,标记生成器会将"full_text"字段中的文本拆分为"quick","foxes".那么匹配查询如何匹配文档的上限值?
| 归档时间: |
|
| 查看次数: |
5281 次 |
| 最近记录: |