I'm trying to store the output of CoreNLP in elasticsearch. I'm using one of the Python wrappers for CoreNLP for this. The output of the wrapper is a fairly large object, that eventually contains lists similar to this:
['word', {tag: 'abc', index: 2, ...}]
That is, a list of both a string and a dictionary.
When I try to index this in Elasticsearch, I get a MapperParsingException. As explained in this question, this is probably because my list contains different types, and Elasticsearch likes arrays of one type.
Is there a way to convince Elasticsearch to map this kind of data? I can turn the list into a dictionary before storing it, but that would require me to convert it back into a list when reading (there's a lot of other code that uses this data), and I'd rather not do that.
You can sidestep this issue by explicitly declaring data as an object and setting enabled: false, but this is probably not the solution you want (since that just tells ES to store data as a text field, with no parsing.