solr icon indicating copy to clipboard operation
solr copied to clipboard

SOLR-17176: Log history V2 API doesn't serialize properly

Open magibney opened this issue 1 year ago • 2 comments

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

magibney avatar Feb 22 '24 21:02 magibney

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.

HoustonPutman avatar Feb 26 '24 20:02 HoustonPutman

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.

magibney avatar Feb 26 '24 20:02 magibney