I am using ES 7.15 and attempting to explicit map a list of dictionaries in an index. The goal is field for each doc something like:
"authors" : [
{"name": "Mary", "org": "Havard"},
{"name": "Joe", "org": "Yale"},
]
in order to achieve this, I've been explicitly setting the mapping of the index as follows:
{
"properties": {
"authors" : {
"type": "nested"
}
}
}
but this results in the values of each field in the dictionaries being arrays/lists of a single string, rather than a string. For example:
"authors" : [
{"name": ["Mary"], "org": ["Havard"]},
{"name": ["Joe"], "org": ["Yale"]},
]
Not only is the mapping wrong, but I'm also unable to field search for those values in lists. For example, searching the author.name field for "Mary" returns no results.
I've tried explicitly mapping each field within the dictionaries as text, but this doesn't change anything. The online documentation just says to map the field as nested.
Is there anyway to map a list of dictionaries without the fields as lists?