0

I'm having trouble indexing to ES's bulk API. It keeps giving me this error:

{
   "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
}

NOTE: I'm using the Sense plugin

Here is a sample of the data I'm trying to index

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"]}

Is my format wrong? What am I missing?

1 Answer 1

1

I believe I figured it out. I was using word wrap in my text editor and that was causing problems. As soon as I took off word wrap and re-copied and pasted, problem solved. Need to be careful about newline characters and such...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.