Java Code Examples for org.apache.lucene.document.LongField#TYPE_NOT_STORED
The following examples show how to use
org.apache.lucene.document.LongField#TYPE_NOT_STORED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DateFieldTypeDefinition.java From incubator-retired-blur with Apache License 2.0 | 6 votes |
@Override public void configure(String fieldNameForThisInstance, Map<String, String> properties, Configuration configuration) { final String dateFormat = properties.get(DATE_FORMAT); if (dateFormat == null) { throw new RuntimeException("The property [" + DATE_FORMAT + "] can not be null."); } final String timeUnitStr = properties.get(TIME_UNIT); if (timeUnitStr != null) { _timeUnit = TimeUnit.valueOf(timeUnitStr.trim().toUpperCase()); } _simpleDateFormat = new ThreadValue<SimpleDateFormat>() { @Override protected SimpleDateFormat initialValue() { return new SimpleDateFormat(dateFormat); } }; String precisionStepStr = properties.get(NUMERIC_PRECISION_STEP); if (precisionStepStr != null) { _precisionStep = Integer.parseInt(precisionStepStr); _typeNotStored = new FieldType(LongField.TYPE_NOT_STORED); _typeNotStored.setNumericPrecisionStep(_precisionStep); _typeNotStored.freeze(); } else { _typeNotStored = LongField.TYPE_NOT_STORED; } }
Example 2
Source File: LongFieldTypeDefinition.java From incubator-retired-blur with Apache License 2.0 | 6 votes |
@Override public void configure(String fieldNameForThisInstance, Map<String, String> properties, Configuration configuration) { String precisionStepStr = properties.get(NUMERIC_PRECISION_STEP); if (precisionStepStr != null) { _precisionStep = Integer.parseInt(precisionStepStr); _typeStored = new FieldType(LongField.TYPE_STORED); _typeStored.setNumericPrecisionStep(_precisionStep); _typeStored.freeze(); _typeNotStored = new FieldType(LongField.TYPE_NOT_STORED); _typeNotStored.setNumericPrecisionStep(_precisionStep); _typeNotStored.freeze(); } else { _typeStored = LongField.TYPE_STORED; _typeNotStored = LongField.TYPE_NOT_STORED; } }