As written in the documentation
Doc values are the on-disk data structure, built at document index time, which makes this data access pattern possible. They store the same values as the
_source
but in a column-oriented fashion that is way more efficient for sorting and aggregations.
I am interested to know in which orderthey are actually stored for each document.
Lets say i have a keyword color and i save a document with the colors [red, green, yellow]
Now i am accessing the keyword color in a script doc["color"]
How do i get the list ? Like i added it [red, green, yellow] ? Do i get it in sorted order ? [green, red, yellow] or is the order non deterministic ?