【发布时间】:2021-06-13 20:41:28
【问题描述】:
例如这个映射:
PUT /unit-test
{
"mappings": {
"properties": {
"name": { "type": "text" },
"landlords": {
"type": "nested",
"properties": {
"name": { "type": "text" }
}
}
}
}
}
如果我有这份文件:
{
"name": "T2 - Boulevard Haussmann - P429",
"landlords": [
{ "name": "John Doe" }
]
}
我希望 "boulevard hausmann" 和 "boulevard haussman doe" 匹配,但不匹配 "rue haussman" 或 "haussman jeanne"。
我不能将multi_match 与"operator": "and" 一起使用,因为landlords 是嵌套的。
【问题讨论】:
标签: elasticsearch elasticsearch-dsl elasticsearch-7