插入一個稍大的數據到elasticsearch的時候,突然報錯“
400 - elastic: Error 400 (Bad Request): Document contains at least one immense term in field=\"document.policy\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[101, 121, 74, 48, 90, 87, 53, 104, 98, 110, 82, 102, 99, 109, 86, 120, 100, 87, 108, 121, 90, 87, 49, 108, 98, 110, 82, 122, 73, 106]...', original message: bytes can be at most 32766 in length; got 43752 [type=illegal_argument_exception]
”
處理方式是,將policy字段的“index”方式設置爲“no”。具體原因回頭我再來寫。