private AutoSuggest(String name, Index index, Directory dir, Analyzer indexAnalyzer, Analyzer searchAnalyzer, boolean useTerms, int minChars) throws IndexException { this._name = name; this._index = index; this._useTerms = useTerms; try { this.suggester = new AnalyzingInfixSuggester(dir, indexAnalyzer, searchAnalyzer, minChars, true, true, true); } catch (IOException ex) { LOGGER.error("Failed to build autosuggest {}", this._name, ex); throw new IndexException("Failed to build autosuggest", ex); } }