apache / apache/lucene

improve uses of StringHelper.intern in Field,AbstractField, NumericField etc. [LUCENE-2545]

Open
#3,619 6 comments 0 reactions 0 assignees View on GitHub
affects-version:3.0.2 legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-label:dead legacy-jira-priority:Major module:core/other type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

There are many times for certain field types that intern is still called when it is not needed. We can improve this with pretty simple open up of the constructors etc.

---
Migrated from [LUCENE-2545](https://issues.apache.org/jira/browse/LUCENE-2545) by Woody Anderson, updated May 09 2016
Attachments: [LUCENE-2545.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2545/LUCENE-2545.patch)
Linked issues:
- #3622
- #2385
- #2674

Contributor guide

Open the contributing guide

Research direction

Start by inspecting StringHelper.intern calls in Field, AbstractField, NumericField, and the related constructors. Trace which field types still invoke interning unnecessarily, then review linked issues #3622, #2385, and #2674 and the archived LUCENE-2545.patch. Done means the unnecessary calls are removed without changing required field behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.