apache / apache/lucene

Add a mock/test codec that redirects all doc values formats to BINARY [LUCENE-9205]

Open
#10,245 1 comment 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

We have some exciting proposed changes that will use `BINARY` doc values, e.g. [using block compression in the default codec](https://github.com/apache/lucene-solr/pull/1234#pullrequestreview-353073188), supporting approximate nearest-neighbor search using [HNSW](https://issues.apache.org/jira/browse/LUCENE-9004) or [IVFFLAT](https://issues.apache.org/jira/browse/LUCENE-9136), but I think our testing of `BINARY` doc values could be improved.

A possibly simple way to do that would be to make a mock/test codec that wraps the default codec but implements all doc values formats (`NUMERIC`, `SORTED`, etc.) on top of the wrapped codec's `BINARY` format. This way the wrapped codec only ever sees `BINARY`, and then all Lucene tests that test the other doc values codecs, would be testing `BINARY`.

---
Migrated from [LUCENE-9205](https://issues.apache.org/jira/browse/LUCENE-9205) by Michael McCandless (@mikemccand)

Contributor guide

Open the contributing guide

Research direction

Start by tracing the default codec and its NUMERIC, SORTED, and BINARY doc values formats. Determine how a mock/test codec could wrap the default codec while routing every format through BINARY, then verify that the existing Lucene tests exercise the other doc values types through that path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.