_defaultMissingFieldType = defaultMissingFieldType;
_defaultMissingFieldProps = defaultMissingFieldProps;
_configuration = configuration;
_fieldLessFieldTypeDefinition = new FieldLessFieldTypeDefinition();
_baseAnalyzerForQuery = new AnalyzerWrapper() {
@Override
protected Analyzer getWrappedAnalyzer(String fieldName) {
if (isBuiltInField(fieldName)) {
return _keywordAnalyzer;
}
FieldTypeDefinition fieldTypeDefinition;
try {
fieldTypeDefinition = getFieldTypeDefinition(fieldName);
} catch (IOException e) {
throw new RuntimeException(e);
}
if (fieldTypeDefinition == null) {
return defaultAnalyzerForQuerying;
}
return fieldTypeDefinition.getAnalyzerForQuery(fieldName);
}
@Override
protected TokenStreamComponents wrapComponents(String fieldName, TokenStreamComponents components) {
return components;
}
};
_baseAnalyzerForIndex = new AnalyzerWrapper() {
@Override
protected Analyzer getWrappedAnalyzer(String fieldName) {
FieldTypeDefinition fieldTypeDefinition;
try {
fieldTypeDefinition = getFieldTypeDefinition(fieldName);