From my understanding you're essentially writing to the same field in two different ways. If you look at the mapping there's only one field for the lastName:
The way the source is displayed is interesting, since from my understand this is essentially the same document (at least from a search point of view) as this would be:
Yeah the source display threw me off here as it definitely proves that there is some data stored in the system that lets it differentiate between the way this data came into the index. But that solves my problem.
I double-checked that the dynamically created mapping is as you suggested.
But why should that influence how update behaves? If the two examples are just different syntax for the same thing I would expect the update to overwrite the entire field's value but it doesn't. Depending on what syntax I use for the update, one or the other is overwritten, which isn't consistent with this internally being an array. This is repeatable. I checked.
If I insert an array for lastName and then do the same update (with a single string value), the whole array is replaced with the single String.
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.