我已经安装了solr及其中文分词包。它在http://localhost:8983/solr/admin/analysis.jsp中工作正常。 solr分析工具可以正常使用中文分词包。
我的问题是,如何将分词请求传递给solr,如何获得良好的响应?我试图从浏览器访问“http:// localhost:8983 / solr / analysis / field?analysis.fieldtype = text& q = adfasd”,但它失败了。
请提供一些提示,关键字,API。
答案 0 :(得分:0)
http://localhost:8983/solr/analysis/field?analysis.fieldtype=text&analysis.fieldvalue=keyword&wt=json
将返回json文件。关键字将是您想要拆分为关键字的句子
参考:
http://lucene.apache.org/solr/api/org/apache/solr/handler/FieldAnalysisRequestHandler.html