私はこのようなマップされたエンティティを持っています:
{ "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のような値を持つことができます。これを照会することはできません。not_analyzedであっても、値を2つのトークンに分割する必要があります。例えば:
{ "query":{
"bool":{
"must":[
{
"term":{
"countrycode":"cntry/us"
}
}
],
"must_not":[
],
"should":[
]
}}, "from":0, "size":50}
理解できません。私は何か簡単なことを誤解していますか?