Permalink
Browse files

Merge branch 'develop' of github.com:dizzzz/exist into develop

  • Loading branch information...
2 parents 67db2f6 + 6147939 commit abd117c9228a399702ea3936de0b8f1590becb3b @dizzzz dizzzz committed Feb 1, 2014
Showing with 4 additions and 3 deletions.
  1. +4 −3 extensions/indexes/lucene/src/org/exist/indexing/lucene/AnalyzerConfig.java
@@ -152,13 +152,13 @@ protected static Analyzer configureAnalyzer(Element config) throws DatabaseConfi
} catch (ClassNotFoundException e) {
LOG.error(String.format("Lucene index: analyzer class %s not found. (%s)", className, e.getMessage()));
- return newAnalyzer;
+ return null;
}
// CHeck if class is an Analyzer
if (!Analyzer.class.isAssignableFrom(clazz)) {
LOG.error(String.format("Lucene index: analyzer class has to be a subclass of %s", Analyzer.class.getName()));
- return newAnalyzer;
+ return null;
}
// Get list of parameters
@@ -240,6 +240,7 @@ private static Analyzer createInstance(Class<?> clazz, Class<?>[] vcParamClasses
if(LOG.isDebugEnabled()){
LOG.debug(String.format("Using analyzer %s", className));
}
+
return (Analyzer) cstr.newInstance(vcParamValues);
} catch (IllegalArgumentException e) {
@@ -402,7 +403,7 @@ private static KeyTypedValue getConstructorParameter(Element param) throws Param
final Set s = getConstructorParameterSetValues(param);
parameter = new KeyTypedValue(name, s, Set.class);
- } else if ("org.apache.lucene.analysis.util.CharArraySet".equals(type)) {
+ } else if ("org.apache.lucene.analysis.util.CharArraySet".equals(type) || "set".equals(type)) {
// This is mandatory to use iso a normal Set since Lucene 4
final CharArraySet s = getConstructorParameterCharArraySetValues(param);
parameter = new KeyTypedValue(name, s, CharArraySet.class);

0 comments on commit abd117c

Please sign in to comment.