第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

嘗試在Ingest-attachment字段中插入null時(shí),ElasticSearch返回錯(cuò)誤

嘗試在Ingest-attachment字段中插入null時(shí),ElasticSearch返回錯(cuò)誤

Qyouu 2021-05-14 14:15:54
我已經(jīng)安裝了攝取附件處理器,并且正在使用Java代碼從一個(gè)索引讀取文件路徑,documents并在另一個(gè)索引中索引文件內(nèi)容documents_attachment。在此過(guò)程中,如果文件可用,它將解碼為base64并將這些內(nèi)容附加到j(luò)son字段fileContent并在另一個(gè)index中將這些字段索引documents_attachment。如果文件不可用,則嘗試將null值附加到j(luò)son字段,fileContent并嘗試對(duì)這些字段進(jìn)行索引。在此過(guò)程中,當(dāng)我嘗試插入nulljson字段時(shí)遇到以下錯(cuò)誤fileContent。請(qǐng)?jiān)谙旅嬲业藉e(cuò)誤。ElasticsearchStatusException[Elasticsearch exception [type=exception, reason=java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: field [fileContent] is null, cannot parse.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=java.lang.IllegalArgumentException: field [fileContent] is null, cannot parse.]]; nested: ElasticsearchException[Elasticsearch exception [type=illegal_argument_exception, reason=field [fileContent] is null, cannot parse.]];    at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)    at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:573)    at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:549)    at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:456)    at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:429)    at org.elasticsearch.client.RestHighLevelClient.index(RestHighLevelClient.java:312)    at com.es.utility.DocumentIndex.main(DocumentIndex.java:193)    Suppressed: org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/document_attachment_dev/doc/129439?pipeline=document_attachment_dev&timeout=1m], status line [HTTP/1.1 500 Internal Server Error]請(qǐng)找到我的Java代碼。
查看完整描述

1 回答

?
白衣非少年

TA貢獻(xiàn)1155條經(jīng)驗(yàn) 獲得超0個(gè)贊

我正在為攝取附件處理器使用以下映射配置,并且在文件內(nèi)容不可用(空)時(shí)它正在工作。


PUT _ingest/pipeline/document_attachment

    {

  "description" : "my first pipeline with handled exceptions",

  "processors" : [

    {

      "attachment" : {

        "field" : "fileContent",

        "on_failure" : [

          {

            "set" : {

              "field" : "error",

              "value" : "{{ _ingest.on_failure_message }}"

            }

          }

        ]

      }

    }

  ]

}


查看完整回答
反對(duì) 回復(fù) 2021-05-19
  • 1 回答
  • 0 關(guān)注
  • 412 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)