Camel catalog - Add api to validate endpoint uri
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/112631a7 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/112631a7 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/112631a7 Branch: refs/heads/camel-2.16.x Commit: 112631a7b5451833f3fd733e5d81f3461532c26e Parents: acdd1d0 Author: Claus Ibsen <davscl...@apache.org> Authored: Fri Dec 25 10:47:20 2015 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Fri Dec 25 10:47:20 2015 +0100 ---------------------------------------------------------------------- .../org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/112631a7/platforms/catalog-lucene/src/main/java/org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java ---------------------------------------------------------------------- diff --git a/platforms/catalog-lucene/src/main/java/org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java b/platforms/catalog-lucene/src/main/java/org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java index 0be3cc5..5e30dfd 100644 --- a/platforms/catalog-lucene/src/main/java/org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java +++ b/platforms/catalog-lucene/src/main/java/org/apache/camel/catalog/lucene/LuceneSuggestionStrategy.java @@ -25,6 +25,7 @@ import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.search.spell.PlainTextDictionary; import org.apache.lucene.search.spell.SpellChecker; import org.apache.lucene.store.RAMDirectory; +import org.apache.lucene.util.Version; /** * Apache Lucene based {@link SuggestionStrategy}. @@ -51,7 +52,7 @@ public class LuceneSuggestionStrategy implements SuggestionStrategy { // use in-memory lucene spell checker to make the suggestions RAMDirectory dir = new RAMDirectory(); SpellChecker checker = new SpellChecker(dir); - checker.indexDictionary(words, new IndexWriterConfig(new KeywordAnalyzer()), false); + checker.indexDictionary(words, new IndexWriterConfig(Version.LUCENE_4_10_4, new KeywordAnalyzer()), false); return checker.suggestSimilar(unknownOption, maxSuggestions); } catch (Exception e) {