Open niemyjski opened 1 week ago
Hi @niemyjski, thank you for the detailed feedback.
Quite a few of these design decisions were made before I took over the maintainer role for the .NET clients. It probably makes sense to discuss some of these points during the call together with Martijn.
VariantName
and Variant
are using internal terminology and are marked as internal
for this exact reason. However, I agree that there are cases where it would be desirable to have (controlled) access to some of the currently internal fields. In case of aggregations, this probably relates to 1. where I could definitely see me adding a public API that allows to create custom aggregations.Aggregation
type and to allow easier conversions etc. It's not that I don't see the benefits of the old structure. However, the new structuring does not only make serialization easier (and more performant!), but as well maps 1:1 to the actual ES REST API. This significantly reduces confusion for new users that just want to write their existing JSON queries using the .NET client.IDictionary<string, Action<AggregationDescriptor<T>>
for example.
Elastic.Clients.Elasticsearch version: 8.15.6
Elasticsearch version: 8.15.1
.NET runtime version: 8.x
Operating system version: Any
Description of the problem including expected versus actual behavior:
While upgrading I've noticed a few things that really made the conversion harder than it had to be and I feel like the feedback below would have made things easier. I get that the purpose of the rewrite was to make maintenance easier, but on the other end is consumers/customers that have large investments in existing api's / elastic.
Easier to use api's and less internalized things leading to a better experience.
Reference: https://github.com/FoundatioFx/Foundatio.Parsers/pull/84
Also apologies if the labels are incorrect for or this issue:
Thank you.