Switch to Lucene 4.6 in code

This change introduces new index schema version.
Change-Id: Ib05e2769692eb61e9adc2d7053140cad42ee5781
This commit is contained in:
David Ostrovsky
2013-11-26 09:01:19 +01:00
committed by Dave Borowitz
parent 20d672e49f
commit 71f734b5c1
4 changed files with 10 additions and 3 deletions

View File

@@ -118,12 +118,16 @@ public class LuceneChangeIndex implements ChangeIndex {
ImmutableMap.builder();
@SuppressWarnings("deprecation")
Version lucene43 = Version.LUCENE_43;
@SuppressWarnings("deprecation")
Version lucene44 = Version.LUCENE_44;
for (Map.Entry<Integer, Schema<ChangeData>> e
: ChangeSchemas.ALL.entrySet()) {
if (e.getKey() <= 3) {
versions.put(e.getValue(), lucene43);
} else if (e.getKey() <= 5) {
versions.put(e.getValue(), lucene44);
} else {
versions.put(e.getValue(), Version.LUCENE_44);
versions.put(e.getValue(), Version.LUCENE_46);
}
}
LUCENE_VERSIONS = versions.build();