FieldType: Remove unnecessary KEYWORD type
Elasticsearch 5 split string type in two: keyword (also known as exact in gerrit index type system) and text (also known as full text in gerrit index type system). During migration from Elasticsearch 2 to 5 exact type was erroneously split in exact and keyword types, that are the same. This reverts commit506125e71a
. This reverts commit09fdc3eaad
. Change-Id: I788e4d06d490687508c4bfd1703037a268fe31a5
This commit is contained in:

committed by
David Pursehouse

parent
852e5ac7ac
commit
0f6c9bd34c
@@ -337,7 +337,7 @@ public abstract class AbstractLuceneIndex<K, V> implements Index<K, V> {
|
||||
for (Object value : values.getValues()) {
|
||||
doc.add(new LongField(name, ((Timestamp) value).getTime(), store));
|
||||
}
|
||||
} else if (type == FieldType.KEYWORD || type == FieldType.EXACT || type == FieldType.PREFIX) {
|
||||
} else if (type == FieldType.EXACT || type == FieldType.PREFIX) {
|
||||
for (Object value : values.getValues()) {
|
||||
doc.add(new StringField(name, (String) value, store));
|
||||
}
|
||||
|
@@ -148,7 +148,7 @@ public class QueryBuilder<V> {
|
||||
return intRangeQuery(p);
|
||||
} else if (type == FieldType.TIMESTAMP) {
|
||||
return timestampQuery(p);
|
||||
} else if (type == FieldType.EXACT || type == FieldType.KEYWORD) {
|
||||
} else if (type == FieldType.EXACT) {
|
||||
return exactQuery(p);
|
||||
} else if (type == FieldType.PREFIX) {
|
||||
return prefixQuery(p);
|
||||
|
Reference in New Issue
Block a user