solr使用suggest框架时不支持中文怎么办,有好的解决方案吗

kongwei302 2012-09-20 06:57:00
RT
...全文
264 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
JONERXQ12 2012-12-21
  • 打赏
  • 举报
回复
增加这个就能行吗,能把真个schma.xml 和solrcongfig贴出来吗,我的配置,如下
flexstruts 2012-09-21
  • 打赏
  • 举报
回复
同求。。支持下
kongwei302 2012-09-21
  • 打赏
  • 举报
回复
solr使用suggest框架时不支持中文怎么办,有好的解决方案吗,没人知道吗?
kaixinwoo2 2012-09-21
  • 打赏
  • 举报
回复
<searchComponent class="solr.SpellCheckComponent" name="suggest">
<str name="queryAnalyzerFieldType">text</str>
<lst name="spellchecker">
<str name="name">suggest</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
<!--<str name="storeDir">suggest</str>-->
<str name="buildOnCommit">false</str>
<!--<bool name="exactMatchFirst">true</bool>
<str name="sourceLocation">phrasesuggest.txt</str>-->

<!-- Alternatives to lookupImpl:
org.apache.solr.spelling.suggest.fst.FSTLookup [finite state automaton]
org.apache.solr.spelling.suggest.fst.WFSTLookupFactory [weighted finite state automaton]
org.apache.solr.spelling.suggest.jaspell.JaspellLookup [default, jaspell-based]
org.apache.solr.spelling.suggest.tst.TSTLookup [ternary trees]
-->
<str name="field">sugg</str> <!-- the indexed field to derive suggestions from -->
<float name="threshold">0.005</float>
<!--<str name="buildOnCommit">true</str>-->
<!--
<str name="sourceLocation">american-english</str>
-->
</lst>
</searchComponent>


设置成你分析的类型
kaixinwoo2 2012-09-21
  • 打赏
  • 举报
回复
<searchComponent class="solr.SpellCheckComponent" name="suggest">
<str name="queryAnalyzerFieldType">text</str>
<lst name="spellchecker">
<str name="name">suggest</str>
<str name="classname">org.apache.solr.spelling.suggest.Suggester</str>
<str name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup</str>
<!--<str name="storeDir">suggest</str>-->
<str name="buildOnCommit">false</str>
<!--<bool name="exactMatchFirst">true</bool>
<str name="sourceLocation">phrasesuggest.txt</str>-->

<!-- Alternatives to lookupImpl:
org.apache.solr.spelling.suggest.fst.FSTLookup [finite state automaton]
org.apache.solr.spelling.suggest.fst.WFSTLookupFactory [weighted finite state automaton]
org.apache.solr.spelling.suggest.jaspell.JaspellLookup [default, jaspell-based]
org.apache.solr.spelling.suggest.tst.TSTLookup [ternary trees]
-->
<str name="field">sugg</str> <!-- the indexed field to derive suggestions from -->
<float name="threshold">0.005</float>
<!--<str name="buildOnCommit">true</str>-->
<!--
<str name="sourceLocation">american-english</str>
-->
</lst>
</searchComponent>
kongwei302 2012-09-21
  • 打赏
  • 举报
回复
期待大神出现.自己顶自己一下.

25,985

社区成员

发帖
与我相关
我的任务
社区描述
高性能WEB开发
社区管理员
  • 高性能WEB开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧