Thanks this is good to know but not sure these mappings help. First I don't know anything about the structure of the document at the time I am trying to do the equivalent of upserting a double value into the doc properties.
This seems like a very simple use case where I'm adding a possibly new property to a doc but rdd.saveToEs overwrites the entire doc with the Map in each rdd element.
The include/excluse docs seem to be talking about pruning unneeded data from a doc so maybe I misunderstand things.
To be clear one element of the rdd is something like a Scala tuple
("doc1", Map(("popularity" -> 1.0d)). I know doc1 has other fields but only want to write the "popularity" double field. If I use
include mapping for "popularity won't this just erase the rest of the doc?
include all with * and give it the Map above? Will that leave all fields alone and overwrite the "popularity" field?