【发布时间】:2021-06-03 11:09:44
【问题描述】:
嗨,我的弹性搜索索引的映射为。
"userId": {
"properties": {
"name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"userId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"userName": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
我的搜索查询也像这样 获取:http://localhost:5000/questions/_search
身体是
{
"query": {
"bool": {
"filter": [
{ "term": { "userId.userId": "testuser@demo.com"
}}
]
}
}
}
我总是得到 0 次点击。查询多值 json 是否有更好的价值。
【问题讨论】:
标签: elasticsearch elasticsearch-aggregation elasticsearch-query