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

@@ -45,7 +45,7 @@ public class QueryDocumentationExecutor {
LoggerFactory.getLogger(QueryDocumentationExecutor.class);
private static final String INDEX_PATH = "index.zip";
private static final Version LUCENE_VERSION = Version.LUCENE_44;
private static final Version LUCENE_VERSION = Version.LUCENE_46;
private IndexSearcher searcher;
private QueryParser parser;

View File

@@ -118,6 +118,9 @@ public class ChangeSchemas {
ChangeField.APPROVAL,
ChangeField.MERGEABLE);
// For upgrade to Lucene 4.6.0 index format only.
static final Schema<ChangeData> V6 = release(V5.getFields().values());
private static Schema<ChangeData> release(Collection<FieldDef<ChangeData, ?>> fields) {
return new Schema<ChangeData>(true, fields);
}