apache / apache/lucene

Remove FieldType copy constructor [LUCENE-4126]

Open
#5,198 9 comments 0 reactions 0 assignees View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major type:enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.