我有一个这样的映射实体:
{ "Organisation":{
"properties":{
"_abstract_":{
"type":"string",
"store":"yes"
},
"_author_":{
"type":"string",
"store":"yes"
},
"_editdate_":{
"type":"date",
"index":"analyzed",
"store":"yes",
"format":"dateOptionalTime"
},
"_id_":{
"type":"string",
"index":"not_analyzed",
"store":"yes",
"omit_norms":true,
"index_options":"docs"
},
"_title_":{
"type":"string",
"store":"yes"
},
"country":{
"type":"string",
"store":"yes"
},
"countrycode":{
"type":"string",
"index":"not_analyzed",
"omit_norms":true,
"index_options":"docs"
},
"creationdateutc":{
"type":"date",
"index":"analyzed",
"store":"yes",
"format":"dateOptionalTime"
}, ...
CountryCode 可以具有类似 CNTRY/US 的值。我无法查询这个 - 即使它没有被分析,它仍然想将值分成两个标记。例如:
{ "query":{
"bool":{
"must":[
{
"term":{
"countrycode":"cntry/us"
}
}
],
"must_not":[
],
"should":[
]
}}, "from":0, "size":50}
我不明白。我误解了一些简单的事情吗?