elastic/elasticsearch

Share number based field mapper test code with other modules

Open

#92,947 opened on Jan 16, 2023

View on GitHub
 (17 comments) (2 reactions) (0 assignees)Java (25,882 forks)batch import
:Search Foundations/Mapping>testTeam:Search Foundationsgood first issue

Repository metrics

Stars
 (76,700 stars)
PR merge metrics
 (Avg merge 2d 5h) (1,000 merged PRs in 30d)

Description

Move number based field mapper test infrastructure to the test framework module. This would allow other number based field mapper to use the same test infrastructure that the core number field mappers are using.

Currently UnsignedLongFieldMapper and ScaledFloatFieldMapper have their own concrete tests, but could instead make use of NumberFieldMapperTests or WholeNumberFieldMapperTests. This avoids duplicates tests and testing logic.

Furthermore this can avoid that non core field mappers don't get forgotten when new features / behaviour is added to core field mappers.

Originates from #92917

Contributor guide