apache / apache/lucene

remove .codecs.DefaultXXXX and split into 3x/4x impls [LUCENE-3613]

Open
#4,687 4 comments 0 reactions 0 assignees View on GitHub
affects-version:4.0-ALPHA legacy-jira-priority:Major type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently there is a lot of shared codec implementations for things like
field infos, segment infos, stored fields, term vectors under the .codecs
package with the name Default\*

I think actually the .codecs package should be our abstract codec apis,
and the implementations should be under the respective codecs.

Also, lots of these implementations are still 'shared' across the 3.x and 4.x
formats, but shouldn't be: the 4.x versions should be "clean", and the 3.x
versions should have all the backwards cruft.

Additionally, the "PreFlexRW" should be writing this stuff in 3.x format,
but today it does not (it writes a 3.x index repackaged in a 4.x "container").

Really PreFlexRW needs to write indexes that are exactly like the 3.x format
(if you opened them up in lucene 3.x you could read them!). When this works
then we know that codecs will actually work for our backwards compatibility needs
and we know that we have good index backwards compatibility testing.

For starters we could just pick some 3.x version of lucene and wire PreFlexRW
to it... in the future maybe the writer should take a version param so it
can actually simulate different minor versions.

---
Migrated from [LUCENE-3613](https://issues.apache.org/jira/browse/LUCENE-3613) by Robert Muir (@rmuir), updated Jan 17 2012
Attachments: [LUCENE-3613_vectors.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-3613/LUCENE-3613_vectors.patch) (versions: 2), [LUCENE-3613.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-3613/LUCENE-3613.patch)

Contributor guide

Open the contributing guide

Research direction

Start by examining the shared implementations in the .codecs package and the PreFlexRW entry point, then review the attached LUCENE-3613.patch and vectors patch. Done means implementations are separated for the 3.x and 4.x formats, and PreFlexRW writes an index that Lucene 3.x can read.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.