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:
@@ -93,6 +93,17 @@ public class ChangeField {
|
||||
}
|
||||
};
|
||||
|
||||
/** Project containing the change, as a prefix field. */
|
||||
public static final FieldDef<ChangeData, String> PROJECTS =
|
||||
new FieldDef.Single<ChangeData, String>(
|
||||
ChangeQueryBuilder.FIELD_PROJECTS, FieldType.PREFIX, false) {
|
||||
@Override
|
||||
public String get(ChangeData input, FillArgs args)
|
||||
throws OrmException {
|
||||
return input.change().getProject().get();
|
||||
}
|
||||
};
|
||||
|
||||
/** Reference (aka branch) the change will submit onto. */
|
||||
public static final FieldDef<ChangeData, String> REF =
|
||||
new FieldDef.Single<ChangeData, String>(
|
||||
|
||||
Reference in New Issue
Block a user