文字列の範囲を指定してElasticsearchにクエリを実行することは可能ですか?
私が想像する何か:
サンプルマッピング:
{
"resource" : {
"properties" : {
"Title" : {
"type" : "string"
},
"type_" : {
"index" : "not_analyzed",
"type" : "string"
},
"Summary" : {
"format" : "dateOptionalTime",
"type" : "date"
}
}
}
}
サンプルクエリ:
{
"size" : 10,
"query" : {
"filtered" : {
"query" : {
"bool" : {
"should" : [ {
"text" : {
"Title" : {
"query" : "AAA",
"type" : "phrase_prefix"
}
}
}, {
"range" : {
"Title" : {
"from" : "BBB",
"to" : "CCC",
"include_lower" : true,
"include_upper" : true
}
}
} ],
"minimum_number_should_match" : 1
}
},
"filter" : {
"and" : {
"filters" : [{
"or" : {
"filters" : [ {
"term" : {
"type_" : "personType"
}
} ]
}
} ]
}
}
}
}
}
インデックスに登録されたデータ:Titles
「AAA」、「BBB」、「CCC」、「DDD」の
リソース
'AAA'の結果
リソースTitle
(範囲は'BBB'および'CCC'を選択しませんでした)
助けていただければ幸いです