Fix _ttl default field type to include index/search analyzer (numeric 64bit)

This commit is contained in:
Ryan Ernst 2015-06-24 08:46:14 -07:00
parent b00be9fe4a
commit 26ff6e452e
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,8 @@ public class TTLFieldMapper extends LongFieldMapper implements RootMapper {
TTL_FIELD_TYPE.setStored(true);
TTL_FIELD_TYPE.setTokenized(false);
TTL_FIELD_TYPE.setNumericPrecisionStep(Defaults.PRECISION_STEP_64_BIT);
TTL_FIELD_TYPE.setIndexAnalyzer(NumericLongAnalyzer.buildNamedAnalyzer(Defaults.PRECISION_STEP_64_BIT));
TTL_FIELD_TYPE.setSearchAnalyzer(NumericLongAnalyzer.buildNamedAnalyzer(Integer.MAX_VALUE));
TTL_FIELD_TYPE.setNames(new MappedFieldType.Names(NAME));
TTL_FIELD_TYPE.freeze();
}