Hi,
I'm trying to come up with a mapping for a document storing versioned custom key value pairs. Eg.
version : "1" => [{key : "customkey1", value : "val1"}, {key : "customkey2", value : "val2"}..]
version: "2" => [{key : "customkey100", value : "val100"},]..
version: "3" => [{key : "customkey1", value : "valxyz"}]..
Problem statement being I want to be able to search on any of these key values, and only return the key and value set associated with the latest version ie. search for key=customkey2 && value=val2 => return [{key : "customkey1", value : "valxyz"}].
It is also acceptable to return this whole document and I can extract the latest version set via application logic. Is the nested type the only way to go?
TIA