0
谁能告诉我如何在elasticsearch-js中严格匹配。这里是我的搜索节点弹性搜索严格匹配
client.search({{
index: 'hash_tag',
type: 'hash_tag',
lenient:false,
body: {
query: {
match: {
tag_name: 'hash tag 1'
}
}
}
}).then(function (body) {
console.log("body", JSON.stringify(body));
}, function (error) {
console.trace(error.message);
})
此查询搜索要么哈希标签,1我正在寻找确切的整串match.here是我的榜样指数的风格。
{
"_index": "hash_tag",
"_type": "hash_tag",
"_id": "3483",
"_score": 0.019691018,
"_source": {
"id": "3483",
"labels": [
"hash_tag"
],
"tag_name": "hash tag 2"
}
}
它的工作原理。感谢马科斯 – shivshankar