【发布时间】:2016-07-29 19:09:06
【问题描述】:
我正在使用附件插件:https://github.com/elastic/elasticsearch-mapper-attachments
我能够在 1 个或多个字段中找到包含特定词的文档,但无法过滤词频低于搜索词频的文档。
这行得通:
POST /crm/employee/_search
{
"query": {"filtered": {
"query": {"match": {
"employee.cv.content": "transitie"
}},
"filter": {
"bool": {
"should": [
{"terms": {
"employee.listEmployeeType.id": [
2
]
}}
]
}
}
}},
"highlight": {"fields": {"employee.cv.content" : {}}}
}
经过长时间的搜索,我发现了以下内容:
"script": {
"script": "crm['employee.cv.content'][lookup].tf() > occurrence",
"params": {
"lookup": "transitie",
"occurrence": 1
}
},
很遗憾,我无法实现它。我希望我已经很好地解释了这个问题,以便有人能够推动我朝着正确的方向前进!
【问题讨论】:
标签: elasticsearch