0

何が間違っているのかわかりません。整数フィールド「ステータス」に対する用語集計がNumberFormatExceptionありますが、クエリを実行して取得しています。2 つのステータス フィールドがあり、1 つは整数型の_source.status にあり、もう 1 つは long 型の_source.report.status です。

エラーメッセージ

{
  "error": "SearchPhaseExecutionException[Failed to execute phase [query], all shards failed;
            shardFailures {[qIeOaS8SS4ynp938pIXZyg][outboxprov1][3]:
            ElasticsearchException[java.lang.NumberFormatException:
            Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: UncheckedExecutionException[java.lang.NumberFormatException:
                      Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; }{[qIeOaS8SS4ynp938pIXZyg][outboxprov1][4]:
            ElasticsearchException[java.lang.NumberFormatException:
            Invalid shift value in prefixCoded bytes (is encoded value really an INT?)];
              nested: UncheckedExecutionException[java.lang.NumberFormatException: 
                      Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; }{[qIeOaS8SS4ynp938pIXZyg][outboxprov1][0]:
            ElasticsearchException[java.lang.NumberFormatException: 
            Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: UncheckedExecutionException[java.lang.NumberFormatException: 
                      Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; }{[qIeOaS8SS4ynp938pIXZyg][outboxprov1][1]: 
            ElasticsearchException[java.lang.NumberFormatException: 
            Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: UncheckedExecutionException[java.lang.NumberFormatException: 
                      Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; }{[qIeOaS8SS4ynp938pIXZyg][outboxprov1][2]:
            ElasticsearchException[java.lang.NumberFormatException: 
            Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: UncheckedExecutionException[java.lang.NumberFormatException: 
                      Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; 
              nested: NumberFormatException[Invalid shift value in prefixCoded bytes (is encoded value really an INT?)]; }]",
  "status": 500
}

クエリ

{
  "size": 0,
  "query": {
    "match_all": {}
  },
  "aggs": {
    "total": {
      "terms": {
        "field": "status", // type : "integer"
        "order": {
          "_term": "asc"
        }
      }
    },
    "immediate_total": {
      "terms": {
        "field": "immediate",
        "order": {
          "_term": "asc"
        }
      }
    },
    "daily_post_count": {
      "filter": {
        "range": {
          "created_date": {
            "from": "2014-11-27",
            "to": "2014-11-27"
          }
        }
      },
      "aggs": {
        "today_posts": {
          "terms": {
            "field": "status", // type : "integer"
            "order": {
              "_term": "asc"
            }
          }
        },
        "today_immediate": {
          "terms": {
            "field": "immediate",
            "order": {
              "_term": "asc"
            }
          }
        }
      }
    }
  }
}

マッピング

{
   "test": {
      "mappings": {
         "message": {
            "properties": {
               "approved_date": {
                  "type": "date",
                  "format": "dateOptionalTime"
               },
               "approver": {
                  "type": "string"
               },
               "content": {
                  "type": "string",
                  "store": true
               },
               "contents": {
                  "properties": {
                     "'facebook'": {
                        "type": "string"
                     },
                     "approver": {
                        "type": "string"
                     },
                     "contents": {
                        "type": "string"
                     },
                     "created_date": {
                        "type": "date",
                        "format": "dateOptionalTime"
                     },
                     "facebok": {
                        "type": "string"
                     },
                     "facebook": {
                        "type": "string"
                     },
                     "failed": {
                        "type": "long"
                     },
                     "hash": {
                        "type": "string"
                     },
                     "immediate": {
                        "type": "long"
                     },
                     "link": {
                        "type": "string"
                     },
                     "linkedin": {
                        "type": "string"
                     },
                     "message_date": {
                        "type": "date",
                        "format": "dateOptionalTime"
                     },
                     "network_connectors": {
                        "type": "string"
                     },
                     "post_count": {
                        "type": "long"
                     },
                     "preview": {
                        "type": "string"
                     },
                     "preview_description": {
                        "type": "string"
                     },
                     "preview_image_url": {
                        "type": "string"
                     },
                     "preview_title": {
                        "type": "string"
                     },
                     "sent": {
                        "type": "long"
                     },
                     "status": {
                        "type": "long"
                     },
                     "twitter": {
                        "type": "string"
                     }
                  }
               },
               "created_date": {
                  "type": "date",
                  "format": "dateOptionalTime"
               },
               "created_ip": {
                  "type": "ip"
               },
               "created_user": {
                  "type": "string",
                  "index": "not_analyzed"
               },
               "failed": {
                  "type": "long"
               },
               "folder": {
                  "type": "integer"
               },
               "hash": {
                  "type": "string"
               },
               "immediate": {
                  "type": "long"
               },
               "link": {
                  "type": "string"
               },
               "message_date": {
                  "type": "date",
                  "format": "dateOptionalTime"
               },
               "modified_date": {
                  "type": "date",
                  "format": "dateOptionalTime"
               },
               "network_connectors": {
                  "type": "string",
                  "index": "not_analyzed"
               },
               "post_count": {
                  "type": "long"
               },
               "preview": {
                  "type": "string"
               },
               "preview_description": {
                  "type": "string"
               },
               "preview_image_url": {
                  "type": "string"
               },
               "preview_title": {
                  "type": "string"
               },
               "report": {
                  "properties": {
                     "info": {
                        "type": "string"
                     },
                     "networks": {
                        "type": "string"
                     },
                     "status": {
                        "type": "long"
                     }
                  }
               },
               "sent": {
                  "type": "long"
               },
               "status": {
                  "type": "integer"
               },
               "team_id": {
                  "type": "string",
                  "index": "not_analyzed"
               }
            }
         }
      }
   }
}

この問題を解決するために私を助けてください。ありがとうございました。

4

0 に答える 0