-
Notifications
You must be signed in to change notification settings - Fork 1.2k
using new Field does not set ComparisonValue #1964
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
Thanks for raising this @thespatt.
That said, we shouldn't allow |
It'll address the problem for 2.x, so I'm 👍 for it there. Can we make the ctor private in 5.x so that you have to use |
Cool. Removed the 5.0 label :).
I'd rather make |
...or just remove Create() entirely and move the implementation to the ctors. |
I can see a slight issue with hacking the property accessors for 2.x - if an API consumer were to set more than one of |
Throw an exception if more than one of Name, Property or Expression is set with a non-null value Add documented tests for the changes Regenerate docs Fixes #1964
Throw an exception if more than one of Name, Property or Expression is set with a non-null value Add documented tests for the changes Regenerate docs Fixes #1964
Throw an exception if more than one of Name, Property or Expression is set with a non-null value Add documented tests for the changes Regenerate docs Fixes #1964
Throw an exception if more than one of Name, Property or Expression is set with a non-null value Add documented tests for the changes Regenerate docs Fixes #1964
I just upgraded from 2.0.2 to 2.0.5 and discovered an issue in our code to create a highlight request. When converting Highlights to the Fields dictionary on HighlightRequest it was throwing an ArgumentNullException in Equals (elasticsearch-net/src/Nest/CommonAbstractions/Infer/Field/Field.cs line 101) and finally discovered that I had to change
return new Nest.Field { Boost = field.Boost, Name = field.Name };
to
return Nest.Field.Create(field.Name, field.Boost);
The text was updated successfully, but these errors were encountered: