我有这样的排列,
"title": "Living furniture exhibitions!"
"include_products": ["ikea chair", "marketO desk"]我试着这样搜索。
{
"query": {
"multi_match": {
"query": "ikea desk",
"operator": "and"
}
}
}我不想要任何搜索结果。但是,它搜索了“宜家椅子”,"marketO desk“。
如何搜索include_products数组中的每个项?
另外,我的地图设置是这样的,
"mappings": {
"information" : {
"properties" : {
"title" : {
"type" : "text"
},
"include_products": {
"type": "text"
}
},
"_all": {
"enabled": false
}
}
}发布于 2018-04-02 05:23:41
试试这个
{
"query":{
"bool":{
"must":[
{
"match_phrase":{
"include_products":"ikea desk"
}
}
]
}
}
}https://stackoverflow.com/questions/49605675
复制相似问题