On one of our indices, when we search it, is returning an odd character that breaks json parsing. In Dev Tools it shows as a red dot between "_source": and {"id Also, Dev Tools results are not json formatted, just plain text. Reindex does not fix this. Has anyone else encountered this, and know what this is and/or how to fix, prevent?
Elasticsearch preserves the _source that it was given completely verbatim, including any leading and trailing space. I don't know what kind of space this might be, but I guess it was included when the document was indexed. It looks like Elasticsearch accepts leading tabs, newlines, carriage returns and space characters (as per the JSON spec) so I am going to guess it's one of those.
I would try and find out what character it is by running your search using curl and piping the output to xxd. For instance, I indexed a doc with a leading tab character (0x09) and trailing newline (0x0a) and this was the result:
Then I would check to see if your JSON parser can cope with this. It should, it's allowed by the spec, but if it doesn't then you may have to overwrite this document in Elasticsearch.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.