gpt4 book ai didi

elasticsearch - Elasticsearch批量API错误

转载 作者:行者123 更新时间:2023-12-03 01:55:17 26 4
gpt4 key购买 nike

我在索引ES的批量API时遇到问题。它一直给我这个错误:

{
"error": "JsonParseException[Unexpected character (',' (code 44)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: [B@35093fea; line: 1, column: 8]]",
"status": 500
}

注意:我正在使用Sense插件

这是我要建立索引的数据示例
PUT /autocomplete/suggestions/_bulk
{"index": {"_id":"1"}}
{"years": ["1980","1981","1982","1983","1984","1985","1986","1987","1988","1989",
"1990","1991","1992","1993","1994","1995","1996","1997","1998","1999",
"2001","2002","2003","2004","2005","2006","2007","2008","2009","2010",
"2011","2012","2013","2014","2015","2016","2017"], "categories": ["Action","Drama","Suspense","Comedy","Romantic"]}

我的格式不对吗?我想念什么?

最佳答案

我相信我知道了。我在文本编辑器中使用自动换行,这会引起问题。一旦我打开自动换行并重新复制和粘贴,问题就解决了。需要注意换行符等...

关于elasticsearch - Elasticsearch批量API错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37231523/

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