{"record":{"id":"d12ee0220d307888","repo":"elastic/elasticsearch","slug":"hyphenation-patterns-path-is-a-required-setting","errorCode":null,"errorMessage":"hyphenation_patterns_path is a required setting.","messagePattern":"hyphenation_patterns_path is a required setting\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HyphenationCompoundWordTokenFilterFactory.java","lineNumber":40,"sourceCode":"import java.nio.file.Path;\n\n/**\n * Uses the {@link org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter} to decompound tokens based on hyphenation rules.\n *\n * @see org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter\n */\npublic class HyphenationCompoundWordTokenFilterFactory extends AbstractCompoundWordTokenFilterFactory {\n\n    private final boolean noSubMatches;\n    private final boolean noOverlappingMatches;\n    private final HyphenationTree hyphenationTree;\n\n    HyphenationCompoundWordTokenFilterFactory(IndexSettings indexSettings, Environment env, String name, Settings settings) {\n        super(indexSettings, env, name, settings);\n\n        String hyphenationPatternsPath = settings.get(\"hyphenation_patterns_path\", null);\n        if (hyphenationPatternsPath == null) {\n            throw new IllegalArgumentException(\"hyphenation_patterns_path is a required setting.\");\n        }\n\n        Path hyphenationPatternsFile = env.configDir().resolve(hyphenationPatternsPath);\n\n        try {\n            InputStream in = Files.newInputStream(hyphenationPatternsFile);\n            hyphenationTree = HyphenationCompoundWordTokenFilter.getHyphenationTree(new InputSource(in));\n        } catch (Exception e) {\n            throw new IllegalArgumentException(\"Exception while reading hyphenation_patterns_path.\", e);\n        }\n\n        noSubMatches = settings.getAsBoolean(\"no_sub_matches\", false);\n        noOverlappingMatches = settings.getAsBoolean(\"no_overlapping_matches\", false);\n    }\n\n    @Override\n    public TokenStream create(TokenStream tokenStream) {\n        return new HyphenationCompoundWordTokenFilter(","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HyphenationCompoundWordTokenFilterFactory.java#L22-L58","documentation":"Error \"hyphenation_patterns_path is a required setting.\" thrown in elastic/elasticsearch.","triggerScenarios":"Thrown at modules/analysis-common/src/main/java/org/elasticsearch/analysis/common/HyphenationCompoundWordTokenFilterFactory.java:40 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}