gpt4 book ai didi

java - 如何从索引 : not_analyzed to index:no? 更改 Elasticsearch 索引中的字段属性

转载 作者:行者123 更新时间:2023-12-01 12:41:33 27 4
gpt4 key购买 nike

我在使用 java 在 Elasticsearch 中尝试批量 api 时遇到以下异常:

Caused by: java.lang.IllegalArgumentException:
Document contains atleast one immense term in field="msg_properties" (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: '[7b 4a 4d 53 43 6f 72 72 65 6c 61 74 69 6f 6e 49 44 3d 6e 75 6c 6c 2c 20 4a 4d 53 4d 65 73]...'

我搜索了上述异常,它导致了以下 stackoverflow link并尝试将字段属性从index:not_analyzed更新为index:no。

但它没有在索引中更新并再次出现相同的异常。

谁能说一下如何解决这个问题以及如何更新属性?

如果有人能提供一个例子,那将会很有帮助......

提前致谢......

最佳答案

您无法更改现有字段的映射。因此,如果您想更改现有映射,请确保它是可能的。以下链接可以帮助您确定是否可行,如果不可行,它会提供使用现有文档重新索引的建议。

https://www.elastic.co/blog/changing-mapping-with-zero-downtime

如果你有这么大的字段,并且你不想在它上面搜索,为什么要把它提供给elasticsearch。难道你就不能阻止它被发送到elasticsearch吗?

希望有帮助

关于java - 如何从索引 : not_analyzed to index:no? 更改 Elasticsearch 索引中的字段属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25051403/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com