We're updating the issue view to help you get more done. 

Calls to numericField in the programmatic API create duplicate fields

Description

In this code:

1 2 3 4 .property( "price", ElementType.FIELD ) .field() .store( Store.YES ) .numericField().precisionStep( 10 )

... The call to numericField adds a new field with the exact same name, erasing all previous information, for example the call to store( Store.YES ).

This is because NumericFieldMapping extends FieldMapping, which adds a new field in its constructor. It never should have extended FieldMapping, but as NumericFieldMapping is API, it'll have to stay that way. We'll have to find a workaround...

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

5.7.0.Final
5.6.1.Final

Priority

Major