public class FileBasedSpellChecker extends AbstractRondhuitSpellChecker
<fieldType name="text_ja_spell" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"> <analyzer> <charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ja.txt"/> <charFilter class="com.rondhuit.solr.analysis.NakaguroCharFilterFactory"/> <tokenizer class="solr.JapaneseTokenizerFactory"/> <filter class="solr.JapaneseKatakanaStemFilterFactory"/> <filter class="com.rondhuit.solr.analysis.JaReadingInjectionFilterFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> </fieldType>
<searchComponent name="spellcheck" class="solr.SpellCheckComponent"> <str name="queryAnalyzerFieldType">text_ws</str> <lst name="spellchecker"> <str name="classname">com.rondhuit.solr.spell.FileBasedSpellChecker</str> <str name="name">default</str> <str name="sourceLocation">spellings.txt</str> <str name="characterEncoding">UTF-8</str> <str name="spellcheckIndexDir">spellchecker</str> <str name="wordAnalyzerFieldType">text_ja_spell</str> </lst> </searchComponent> <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy"> <lst name="defaults"> <str name="df">statement</str> <str name="spellcheck.onlyMorePopular">false</str> <str name="spellcheck.extendedResults">false</str> <str name="spellcheck.count">1</str> </lst> <arr name="last-components"> <str>spellcheck</str> </arr> </requestHandler>
修飾子とタイプ | フィールドと説明 |
---|---|
static java.lang.String |
SOURCE_FILE_CHAR_ENCODING |
static java.lang.String |
WORD_FIELD_NAME |
accuracy, ACCURACY, COMPARATOR_CLASS, DEFAULT_SUGGESTION_COUNT, dictionary, FREQ_COMP, index, INDEX_DIR, indexDir, LOCATION, SCORE_COMP, sd, sourceLocation, spellChecker, SPELLCHECKER_ARG_NAME, STRING_DISTANCE
analyzer, DEFAULT_DICTIONARY_NAME, DICTIONARY_NAME, field, FIELD, FIELD_TYPE, fieldTypeName, name
コンストラクタと説明 |
---|
FileBasedSpellChecker() |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
build(SolrCore core,
SolrIndexSearcher searcher) |
protected IndexReader |
determineReader(IndexReader reader)
Override to return null, since there is no reader associated with a file based index
|
java.lang.String |
getCharacterEncoding() |
java.lang.String |
init(org.apache.solr.common.util.NamedList config,
SolrCore core) |
getAccuracy, getField, getFieldTypeName, getIndexDir, getSourceLocation, getSpellChecker, getStringDistance, getSuggestions, initIndex, reload
getDictionaryName, getQueryAnalyzer, isSuggestionsMayOverlap, mergeSuggestions
public static final java.lang.String SOURCE_FILE_CHAR_ENCODING
public static final java.lang.String WORD_FIELD_NAME
public java.lang.String init(org.apache.solr.common.util.NamedList config, SolrCore core)
init
クラス内 AbstractRondhuitSpellChecker
public void build(SolrCore core, SolrIndexSearcher searcher) throws java.io.IOException
build
クラス内 SolrSpellChecker
java.io.IOException
protected IndexReader determineReader(IndexReader reader)
determineReader
クラス内 AbstractRondhuitSpellChecker
public java.lang.String getCharacterEncoding()
Copyright © 2009-2018 RONDHUIT Co.,Ltd. All Rights Reserved.