SOLR-17176: Log history V2 API doesn't serialize properly
fix LogWatcher.unmodifiable() to be backed by a full-featured Map
SolrDocument.getFieldValuesMap() provides a feature-poor Map instance that also does undesired extra manipulations on values.
https://issues.apache.org/jira/browse/SOLR-17176
Why are we converting events to docs? Just so that the result could look something like a query result?
I guess this is somewhat unrelated to the PR, but if we skipped the SolrDocument stuff, we wouldn't have to worry about all of the baggage that it comes with around serialization.
I guess just because the results are +/- analogous to SolrDocuments results, in terms of serialized output. numFound, etc. For the purpose of this PR I was trying to leave that unchanged. I think the baggage with serialization is less from the "SolrDocuments" approach per se, and more around the exact way in which the initial PR went about constructing the SolrDocuments to be immutable (since they are reused across multiple requests).
The biggest problem with the initial PR really was its use of doc.getFieldValueMap(), which afaict (I belatedly realize) seems not designed to be used outside of a test context.