2016-03-20 11 views
0

データストリームをElasticsearchにインデックスしています。受信データを正規化してエラーなしでインデックスにする方法を見つけることができません。私は、メタデータクエリであるマッピングタイプ "getdatavalues"を持っています。このメタデータクエリは、非常に異なる見た目の応答を返すことができますが、私はその違いを見ていません。私が取得エラー:複雑なオブジェクトの弾性検索インデックス操作が失敗する

{"index":{"_index":"ens_event-2016.03.11","_type":"getdatavalues","_id":"865800029798177_2016_03_11_03_18_12_100037","status":400,"error":"MapperParsingException[object mapping for [getdatavalues] tried to parse field [output] as object, but got EOF, has a concrete value been provided to it?]"}} 

実行:

curl -XPUT 'http://192.168.99.100:80/es/ens_event-2016.03.11/getdatavalues/865800029798177_2016_03_11_03_18_12_100037' -d '{ 
    "type": "getDataValues", 
    "input": { 
    "deviceID": { 
     "IMEI": "865800029798177", 
     "serial-number": "64180258" 
    }, 
    "handle": 644, 
    "exprCode": "200000010300140000080001005f00a700000000000000", 
    "noRollHandle": "478669308-578452", 
    "transactionID": 290 
    }, 
    "timestamp": "2016-03-11T03:18:12.000Z", 
    "handle": 644, 
    "output": { 
    "noRollPubSessHandle": "478669308-578740", 
    "publishSessHandle": 1195, 
    "status": true, 
    "matchFilter": { 
     "prefix": "publicExpr.operatorDefined.commercialIdentifier.FoodSvcs.Restaurant.\"A&C Kabul Curry\".\"Rooster Street\"", 
     "argValues": { 
     "event": "InternationalEvent", 
     "hasEvent": "anyEvent" 
     } 
    }, 
    "transactionID": 290, 
    "validFor": 50 
    } 
}' 

はここElasticsearchは、マッピングのために持っているものです:argValuesオブジェクトはかなりあなたのマッピングと一致しないよう

"getdatavalues" : { 
    "dynamic_templates" : [ { 
     "strings" : { 
     "mapping" : { 
      "index" : "not_analyzed", 
      "type" : "string" 
     }, 
     "match_mapping_type" : "string" 
     } 
    } ], 
    "properties" : { 
     "handle" : { 
     "type" : "long" 
     }, 
     "input" : { 
     "properties" : { 
      "deviceID" : { 
      "properties" : { 
       "IMEI" : { 
       "type" : "string", 
       "index" : "not_analyzed" 
       }, 
       "serial-number" : { 
       "type" : "string", 
       "index" : "not_analyzed" 
       } 
      } 
      }, 
      "exprCode" : { 
      "type" : "string", 
      "index" : "not_analyzed" 
      }, 
      "handle" : { 
      "type" : "long" 
      }, 
      "noRollHandle" : { 
      "type" : "string", 
      "index" : "not_analyzed" 
      }, 
      "serviceVersion" : { 
      "type" : "string", 
      "index" : "not_analyzed" 
      }, 
      "transactionID" : { 
      "type" : "long" 
      } 
     } 
     }, 
     "output" : { 
     "properties" : { 
      "matchFilter" : { 
      "properties" : { 
       "argValues" : { 
       "properties" : { 
        "Interests" : { 
        "type" : "object" 
        }, 
        "MerchantId" : { 
        "type" : "string", 
        "index" : "not_analyzed" 
        }, 
        "Queue" : { 
        "type" : "string", 
        "index" : "not_analyzed" 
        }, 
        "Vibe" : { 
        "type" : "string", 
        "index" : "not_analyzed" 
        }, 
        "event" : { 
        "properties" : { 
         "event" : { 
         "type" : "string", 
         "index" : "not_analyzed" 
         }, 
         "hasEvent" : { 
         "type" : "string", 
         "index" : "not_analyzed" 
         } 
        } 
        }, 
        "hasEvent" : { 
        "type" : "string", 
        "index" : "not_analyzed" 
        }, 
        "interests" : { 
        "type" : "string", 
        "index" : "not_analyzed" 
        } 
       } 
       }, 
       "prefix" : { 
       "type" : "string", 
       "index" : "not_analyzed" 
       }, 
       "transactionID" : { 
       "type" : "long" 
       }, 
       "validFor" : { 
       "type" : "long" 
       } 
      } 
      }, 
      "noRollPubSessHandle" : { 
      "type" : "string", 
      "index" : "not_analyzed" 
      }, 
      "publishSessHandle" : { 
      "type" : "long" 
      }, 
      "status" : { 
      "type" : "boolean" 
      }, 
      "transactionID" : { 
      "type" : "long" 
      }, 
      "validFor" : { 
      "type" : "long" 
      } 
     } 
     }, 
     "timestamp" : { 
     "type" : "date", 
     "format" : "dateOptionalTime" 
     }, 
     "type" : { 
     "type" : "string", 
     "index" : "not_analyzed" 
     } 
    } 
    }, 
+0

elasticsearchにプロキシを介さずにリクエストをすぐに送信できますか?私のローカル弾性2.2.1だけでなく、1.7.1のインスタンスにカールのリクエストを試し、それは動作するようです。 –

答えて

1

が見えます:

 "argValues": { 
      "event": "InternationalEvent", 
      "hasEvent": "anyEvent" 
     } 

このいずれか:

 "argValues": { 
      "event": { 
       "event": "InternationalEvent" 
      }, 
      "hasEvent": "anyEvent" 
     } 

またはこの:

 "argValues": { 
      "event": { 
       "event": "InternationalEvent" 
       "hasEvent": "anyEvent" 
      }, 
     } 

が両方有効であると思われます。

関連する問題