You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this boils down to a code generator optimization which I've already planned in the corresponding (private) repository.
A Term query, for example, requires 2 mandatory properties Field and Value. For the object initializer syntax (TermQuery) we already generate a custom constructor that enforces the Field to get initialized. Value is currently missing here and for the fluent syntax (TermQueryDescriptor) no custom constructor is generated at all.
This feature requires quite some effort to implement in the code generator, but in the end we should be able to generate an API overload that looks exactly like the one from NEST.
I still have to think about some details; for example:
Term(Action<T,object>field,FieldValuevalue)
does not allow to further mutate the query (aka setting optional properties like Boost).
My current plan is to keep the original overload (marked as deprecated):
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:
I noticed a lot of inconsistencies / verbosity when converting to the new api's
Previous
The existing TermQueryDescriptor is more aligned with the new mapping api where you select the field with an expression. The new one is very verbose
New
Expected behavior
New filtering is really verbose and and doesn't feel like other areas of the api.
Reference: FoundatioFx/Foundatio.Parsers#84
The text was updated successfully, but these errors were encountered: