diff --git a/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java b/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java index cc674bb..f8388a5 100644 --- a/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java +++ b/src/main/java/org/xbib/elasticsearch/index/mapper/langdetect/LangdetectMapper.java @@ -80,6 +80,9 @@ public void parse(String language, ParseContext context) throws IOException { LangAnalyser existing = (LangAnalyser) this.langAnalysers.get(language); if (existing != null) { existing.mapper.parse(context); + } else { + // consume context external value + context.externalValue(); } } @@ -248,7 +251,7 @@ public void parse(ParseContext context) throws IOException { langMapper.parse(context); } } catch(LanguageDetectionException e) { - throw new IOException(e); + // language detection failed, continue } if (langs !=null && !langs.isEmpty()) {