apache / apache/lucene

IW.addIndexes should fail fast if an index is too old/new [LUCENE-3138]

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

Description

Today IW.addIndexes (both Dir and IR versions) do not check the format of the incoming indexes. Therefore it could add a too old/new index and the app will discover that only later, maybe during commit() or segment merges. We should check that up front and fail fast.

This issue is relevant only to 4.0 at the moment, which will not support 2.x indexes anymore.

---
Migrated from [LUCENE-3138](https://issues.apache.org/jira/browse/LUCENE-3138) by Shai Erera (@shaie), updated Jan 29 2013

Contributor guide

Open the contributing guide

Research direction

Locate the IndexWriter.addIndexes overloads for Directory and IndexReader inputs, then inspect existing index-format validation and related tests. Confirm how Lucene 4.0 identifies incompatible index versions; done means both overloads reject too-old or too-new indexes immediately, with tests showing failure before commit or segment merging.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.