Remove FieldType copy constructor [LUCENE-4126]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Currently FieldTypes can be created using new FieldType(someOtherFieldType) which copies the properties and allows them to then changed. This reduces readability since it hides what properties someOtherFieldType has enabled. We should encourage users (and ourselves) to explicitly state what properties are enabled so to prevent any surprises.
---
Migrated from [LUCENE-4126](https://issues.apache.org/jira/browse/LUCENE-4126) by Chris Male, updated May 09 2016
Contributor guide
Research direction
Locate the FieldType class and search for uses of its copy constructor. Read the constructor and its call sites to understand which properties are being copied. Done means the copy-constructor path is removed and affected usage no longer depends on implicit property copying.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100