-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Reintroduce convenience where appropriate #8150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @stefanobranco,
private HighlightFieldDescriptor HighlightField = new().PreTags(...).PostTags(...);
.Highlight(h => h.Fields(fs => fs.Add(new Field("field"), HighlightField))) |
Hi @flobernd! Thanks for the quick response.
I figured it was something like that. I guess I find the 'Add' a bit 'unattractive', but that's probably a personal thing and it's completely reasonable as it is. I did notice one more small thing, as I'm trying to now completely move away from our nest client. When ordering aggregations: Before (Nest):
Now (unless I missed something):
Perfect, I figured this was just an oversight
You're right. I'm pretty sure the previous variant did work that way but either way your solution works just as well and is more consistent, so there's probably no need to spend more time on this. |
You don't need the
|
Hahaha you're right of course, the list is beyond silly here. I guess the C# 12 version is reasonable enough in that case. |
First of all I want to point out I'm very happy that with 8.13 and that it finally feels like we're moving towards the point where we can actually depreciate the nest client in our solution rather than using two clients at once.
When migrating however, I noticed that most of the changes that broke our code required rewrites that do the same thing, just in more code, most of which feels unnecessary. Maybe I've overlooked some obvious solutions though, so I'd be happy for suggestions.
Otherwise I want to at least point them out here, even though I fully understand these probably have not been at the top of the priorities when writing 8.13, so here are some examples.
First and foremost obviously the aggregation change, that requires an additional add, straight from the release notes:
to:
In addition, I find subbaggregations alot clearer in the original example.
MatchAll now needs a parameter:
to:
Indexing:
to:
Highlighting (simplified):
to:
Again I'm grateful for the effort I can live with all these, but I figured I'd at least point them out in case some of these are just oversights (e.g. MatchAll).
The text was updated successfully, but these errors were encountered: