簡體   English   中英

出現Elasticsearch映射錯誤時如何查看顯式字段名稱

[英]How to see explicit field name when having an elasticsearch mapping error

我有以下Elasticsearch映射錯誤消息。

{
  'index': {
    '_index': 'product-staging-2-products',
    '_type': 'product',
    'status': 400,
    '_id': '776896',
    'error': {
      'type': 'mapper_parsing_exception',
      'reason': 'failed to parse',
      'caused_by': {
        'type': 'number_format_exception',
        'reason': 'empty String'
      }
    }
  }
}

我了解會發生此錯誤,因為我的“產品”對象的字段之一期望一個數字,但收到一個空字符串。 但是,有什么方法可以顯式記錄哪個字段接收此空字符串?

您可以嘗試通過在索引查詢中附加&error_trace=true查詢字符串參數來啟用堆棧跟蹤 ,並且您可能會獲得有關導致此錯誤的字段的更多信息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM