apache / apache/lucene

add initial capacity based Document constructor [LUCENE-2539]

Open
#3,613 5 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:Minor module:core/other type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

When loading field from the index without a FieldSelector, and often in user code we know exactly how many fields a Document should have. This patch will simply add the ability to allocate Document memory for precisely.

I will include as a separate patch where this would be useful in conjunction with patch #3352.

---
Migrated from [LUCENE-2539](https://issues.apache.org/jira/browse/LUCENE-2539) by Woody Anderson, updated May 09 2016
Attachments: [LUCENE-2539.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2539/LUCENE-2539.patch) (versions: 3)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Document constructor API and the attached LUCENE-2539.patch to understand the proposed entry point. Done means Document can be created with an initial field capacity and preserves existing construction behavior; verify the change against the project's relevant tests, which the issue does not name.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.