hello,
for WordDelimiterFilterFactory:
this is an exemple in schema.xml to folow:
<field name="spell" type="textSpell" multiValued="true" indexed="true"
required="false" stored="false"/>
<fieldType name="textSpell" class="solr.TextField"
positionIncrementGap="100" omitNorms="true">
<analyzer type="index">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.PatternReplaceFilterFactory"
pattern="^(\p{Punct}*)(.*?)(\p{Punct}*)$" replacement="$2"/>
<filter class="solr.LengthFilterFactory" min="3" max="20" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
<filter class="solr.WordDelimiterFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.PatternReplaceFilterFactory"
pattern="^(\p{Punct}*)(.*?)(\p{Punct}*)$" replacement="$2"/>
<filter class="solr.LengthFilterFactory" min="3" max="20" />
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
<filter class="solr.StopFilterFactory" words="stopwords.txt"
ignoreCase="true"/>
<filter class="solr.WordDelimiterFilterFactory"/>
</analyzer>
</fieldType>
and for WordBreakSolrSpellChecker folow this in solrconfig.xml:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">wordbreak</str>
<str name="classname">solr.WordBreakSolrSpellChecker</str>
<str name="field">spell</str>
<str name="combineWords">true</str>
<str name="breakWords">true</str>
<int name="maxChanges">10</int>
</lst>
</searchComponent>
<requestHandler name="/spellcheck" class="solr.SearchHandler">
<lst name="defaults">
<str name="echoParams">explicit</str>
<int name="rows">10</int>
<str name="qf">your field</str>
str name="qt">spellchecker</str>
<str name="cmd">rebuild</str>
<str name="spellcheck.dictionary">wordbreak</str>
<str name="spellcheck">on</str>
<str name="spellcheck.extendedResults">true</str>
<str name="spellcheck.count">10</str>
<str name="spellcheck.alternativeTermCount">5</str>
<str name="spellcheck.maxResultsForSuggest">5</str>
<str name="spellcheck.collate">true</str>
<str name="spellcheck.onlyMorePopular">true</str>
<str name="spellcheck.maxCollations">5</str>
<str name="spellcheck.collateExtendedResults">true</str>
<str name="spellcheck">true</str>
<str name="spellcheck.build">true</str>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
regards,
Anass BENJELLOUN
--
View this message in context:
http://lucene.472066.n3.nabble.com/questions-on-Solr-WordBreakSolrSpellChecker-and-WordDelimiterFilterFactory-tp4147390p4147859.html
Sent from the Solr - User mailing list archive at Nabble.com.