私はいくつかの _bulk insert を正常に作成しました。今、日付範囲でクエリを作成し、次のようなフィルターを作成しようとしています:
{
"query": {
"bool": {
"must": [{
"terms": {
"mt_id": [613]
}
},
{
"range": {
"time": {
"gt": 1470009600000,
"lt": 1470009600000
}
}
}]
}
}
残念ながら、結果が得られませんでした。次のように、一括挿入後にインデックス マッピングが作成されることに気付きました。
{
"agg__ex_2016_8_3": {
"mappings": {
"player": {
"properties": {
"adLoad": {
"type": "long"
},
"mt_id": {
"type": "long"
},
"time": {
"type": "string"
}
}
},
解決策として、次のようにインデックス マッピングを変更しようとしました。
PUT /agg__ex_2016_8_3/_mapping/player
{
"properties" : {
"mt_id" : {
"type" : "long",
"index": "not_analyzed"
}
}
}
得た
{
"acknowledged": true
}
および PUT /agg__ex_2016_8_3/_mapping/player
{
"properties" : {
"time" : {
"type" : "date",
"format" : "yyyy/MM/dd HH:mm:ss"
}
}
}
得た:
{
"error": {
"root_cause": [
{
"type": "remote_transport_exception",
"reason": "[vj_es_c1-esc13][10.132.69.145:9300][indices:admin/mapping/put]"
}
],
"type": "illegal_argument_exception",
"reason": "mapper [time] of different type, current_type [string], merged_type [date]"
},
"status": 400
}
しかし、何も起こらず、まだ結果が得られません。
私が間違っていることは何ですか?( curl を使用せずに http で作業する必要があります)
ありがとう!!