-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Create float type family #96625
Create float type family #96625
Conversation
@@ -326,6 +326,11 @@ public Float parse(XContentParser parser, boolean coerce) throws IOException { | |||
return parsed; | |||
} | |||
|
|||
@Override | |||
public String familyTypeName() { | |||
return NumberFieldMapper.NumberType.FLOAT.typeName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to keep this very simple instead of adding more mechanism/abstraction for Type Families here. I figure we can decide to add that once we have a few more use cases to generalize from. Happy to change that though based on feedback. WDYT?
Pinging @elastic/es-search (Team:Search) |
Hi @JVerwolf, I've created a changelog YAML for you. |
@@ -19,6 +19,34 @@ | |||
|
|||
public class FieldCapabilitiesFilterTests extends MapperServiceTestCase { | |||
|
|||
/** | |||
* Tests that the field family type is returned instead of the actual field type. | |||
* `half_float` is chosen arbitrarily for this purpose. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of arbitrarily choosing half_float
you could use a randomFrom
and list there all the "float" types.
run elasticsearch-ci/bwc |
This PR combines
float
,half_float
, andscaled_float
into the same field type family.Relates to #58483
Closes #67723