apache / apache/lucene

add backwards checkindex crosscheck [LUCENE-4143]

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

Description

This is super slow, but ensures they are actually equal (as the existing cross-check just checks that vectors are a subset of postings).

I added a hack so that we only use it in MockDirectoryWrapper when the delegate is a RAMDir and < 1MB in size, so it doesn't hurt test times.

---
Migrated from [LUCENE-4143](https://issues.apache.org/jira/browse/LUCENE-4143) by Robert Muir (@rmuir)
Attachments: [LUCENE-4143.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-4143/LUCENE-4143.patch)

Contributor guide

Open the contributing guide

Research direction

Start at MockDirectoryWrapper and inspect the existing cross-check and its RAMDir size condition. Trace how the backwards CheckIndex comparison is invoked, then verify that the new check confirms vectors and postings are equal without affecting larger delegates or ordinary test runtimes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
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.