solr第五篇 solr-4.9

https://wiki.apache.org/solr/SolrTomcat

Beginning with Solr 5.0, Solr is no longer distributed as a "war" (Web Application Archive) suitable for deployment in any Servlet Container. Solr is now distributed as a stand alone java server application, including start and stop scripts for use on Unix and MS-Windows platforms, as well as an installation script for setting up a "production" installation of Solr on *nix platforms managed via /etc/init.d. See https://wiki.apache.org/solr/WhyNoWar

Why No War

https://wiki.apache.org/solr/WhyNoWar

solr5.0变更,以后不再支持提供war包。

solr-4.9安装

http://www.voidcn.com/article/p-qssraupt-bog.html

ik分词器安装

1)下载jar包
solr-4.9对应的ik分词器是
IKAnalyzer2012FF_u1.jar

2)添加ik配置文件
https://github.com/navis87/IKAnalyzer

image.png

添加到
solr/tomcat7-solr/webapps/solr/WEB-INF/classes

3)添加ik分词器到
/solr/solrHome/collection1/conf/schema.xml
添加内容是
https://my.oschina.net/cloudcoder/blog/304984

<!-- china -->
<fieldType name="text_ik" class="solr.TextField">
    <analyzer type="index" isMaxWordLength="false" class="org.wltea.analyzer.lucene.IKAnalyzer"/>
    <analyzer type="query" isMaxWordLength="true" class="org.wltea.analyzer.lucene.IKAnalyzer"/>
</fieldType>

注意: ik分词器要和solr版本匹配。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容