Add a "projects" field for searching projects by prefix

Index alongside the "project" field, which is an exact match field,
since we do not assume index implementations can search exact match
and prefix on the same field. We do not want to modify the existing
"project" to return prefixes.

Upgrade Lucene to 4.7.0, as this was released since the last schema
change.

Change-Id: I7c3379c087fc54af3e5790cb875a5e676e674338
This commit is contained in:
Dave Borowitz
2014-03-25 14:17:03 -07:00
parent 2212801e98
commit 4aed07b7ce
13 changed files with 129 additions and 8 deletions

View File

@@ -125,14 +125,18 @@ public class LuceneChangeIndex implements ChangeIndex {
Version lucene43 = Version.LUCENE_43;
@SuppressWarnings("deprecation")
Version lucene44 = Version.LUCENE_44;
@SuppressWarnings("deprecation")
Version lucene46 = Version.LUCENE_46;
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 if (e.getKey() <= 8) {
versions.put(e.getValue(), lucene46);
} else {
versions.put(e.getValue(), Version.LUCENE_46);
versions.put(e.getValue(), Version.LUCENE_47);
}
}
LUCENE_VERSIONS = versions.build();