apache / apache/lucene

Combine MockRandomPostingsFormat and RandomCodec [LUCENE-4457]

Open
#5,523 3 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:bug type:test
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This is really confusing. I think MockRandomPF is mostly obselete, in that it writes a random seed file (.sd) so that its symmetrical when reading the index.

this is no longer necessary (codecs must write what they need). But i think it does some other cool things, like randomizes more params like skipintervals and so on.

we should make sure RandomCodec does all the evil things it does, delete MockRandomPostingsFormat, and rename RandomCodec to RandomPostingsFormat.

Then add a real Random codec thats really a frankenstein and does things like switch up stored fields impl (#5298) and so on.

---
Migrated from [LUCENE-4457](https://issues.apache.org/jira/browse/LUCENE-4457) by Robert Muir (@rmuir), updated Oct 04 2012

Contributor guide

Open the contributing guide

Research direction

The issue names MockRandomPostingsFormat and RandomCodec but no files, tests, or entry points. Start by locating both implementations and their codec-related tests, then determine whether RandomCodec covers the existing randomized behavior and what the separate frankenstein codec must include before removing and renaming components.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.