From d0dd5fadcc90f71864a7a716936e2d4a3ec2f14d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Sat, 11 Aug 2012 14:31:56 +0000 Subject: [PATCH] Don't allow negatives in the positions file git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1371961 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/CHANGES.txt | 5 +++++ .../org/apache/lucene/index/CheckIndex.java | 17 ++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 7b636380280..7030490cc5c 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -31,6 +31,11 @@ Bug Fixes had a custom Similarity where coord(1,1) != 1F, then the rewritten query would be scored differently. (Robert Muir) +* Don't allow negatives in the positions file. If you have an index + from 2.4.0 or earlier with such negative positions, and you already + upgraded to 3.x, then to Lucene 4.0-ALPHA or -BETA, you should run + CheckIndex. If it fails, then you need to upgrade again to 4.0 (Robert Muir) + ======================= Lucene 4.0.0-BETA ======================= New features diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java index d71c8e6bf27..3bcf7d17ff2 100644 --- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java +++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java @@ -822,11 +822,8 @@ public class CheckIndex { if (hasPositions) { for(int j=0;j