Skip to content
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

Closed
wants to merge 3 commits into from
Closed

Conversation

JVerwolf
Copy link
Contributor

@JVerwolf JVerwolf commented Jun 6, 2023

This PR combines float, half_float, and scaled_float into the same field type family.

Relates to #58483

Closes #67723

@elasticsearchmachine elasticsearchmachine added v8.9.0 needs:triage Requires assignment of a team area label labels Jun 6, 2023
@@ -326,6 +326,11 @@ public Float parse(XContentParser parser, boolean coerce) throws IOException {
return parsed;
}

@Override
public String familyTypeName() {
return NumberFieldMapper.NumberType.FLOAT.typeName();
Copy link
Contributor Author

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?

@javanna javanna removed their assignment Jun 6, 2023
@javanna javanna self-requested a review June 6, 2023 18:56
@javanna javanna added :Search Foundations/Mapping Index mappings, including merging and defining field types >enhancement and removed needs:triage Requires assignment of a team area label labels Jun 6, 2023
@elasticsearchmachine elasticsearchmachine added the Team:Search Meta label for search team label Jun 6, 2023
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticsearchmachine
Copy link
Collaborator

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.
Copy link
Contributor

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.

@nik9000
Copy link
Member

nik9000 commented Jun 8, 2023

run elasticsearch-ci/bwc

@quux00 quux00 added v8.11.0 and removed v8.10.0 labels Aug 16, 2023
@JVerwolf JVerwolf closed this Aug 21, 2023
@javanna javanna removed the v8.11.0 label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combine float, scaled_float and half_float into same field family
7 participants