Since it's JSON, the order of the names does not matter. But to make it nicer for humans to read, I have found that the LinkedHashMap and LinkedHashSet classes to be nice drop-in replacements for their non-Linked counterparts, have very little overhead, and have the nice property that iterators return names in the same order in which they were added.
Of course, it's then necessary to add them in the same order each time, so that the order is preserved! I've done the same thing with a generic Record class that parses and writes the _source. It preserves the order of the source fields, which is very nice for human readability (even though the JSON remained correct without regard to order). Hope this helps with some of the detail if/when you open an issue! -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b7449059-9c31-4428-8cbe-f8d5cb8b10e4%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
