centos7下搭建solr服务器
1.Solr的环境
Solr是java开发。
需要安装jdk。
安装环境Linux。
需要安装Tomcat。
1.2. 搭建步骤
第一步:把solr 的压缩包上传到Linux系统
第二步:解压solr。
第三步:安装Tomcat,解压缩即可。
第四步:把solr部署到Tomcat下。
第五步:解压缩war包。启动Tomcat解压。
第六步:把/root/solr-4.10./example/lib/ext目录下的所有的jar包,添加到solr工程中。
[root@localhost ext]# pwd
/root/solr-4.10./example/lib/ext
[root@localhost ext]# cp * /usr/local/solr/tomcat/webapps/solr/WEB-INF/lib/
第七步:创建一个solrhome。/example/solr目录就是一个solrhome。复制此目录到/usr/local/solr/solrhome
[root@localhost example]# pwd
/root/solr-4.10./example
[root@localhost example]# cp -r solr /usr/local/solr/solrhome
[root@localhost example]#
第八步:关联solr及solrhome。需要修改solr工程的web.xml文件。 第九步:启动Tomcat
http://192.168.25.154:8080/solr/
和windows下的配置完全一样。 1.3. 配置业务域
schema.xml中定义
、商品Id
、商品标题
、商品卖点
、商品价格
、商品图片
、分类名称
、商品描述 创建对应的业务域。需要制定中文分析器。 创建步骤:
第一步:把中文分析器添加到工程中。
、把IKAnalyzer2012FF_u1.jar添加到solr工程的lib目录下
、把扩展词典、配置文件放到solr工程的WEB-INF/classes目录下。
第二步:配置一个FieldType,制定使用IKAnalyzer
修改schema.xml文件
修改Solr的schema.xml文件,添加FieldType:
<fieldType name="text_ik" class="solr.TextField">
<analyzer class="org.wltea.analyzer.lucene.IKAnalyzer"/>
</fieldType> 第三步:配置业务域,type制定使用自定义的FieldType。
设置业务系统Field
<field name="item_title" type="text_ik" indexed="true" stored="true"/>
<field name="item_sell_point" type="text_ik" indexed="true" stored="true"/>
<field name="item_price" type="long" indexed="true" stored="true"/>
<field name="item_image" type="string" indexed="false" stored="true" />
<field name="item_category_name" type="string" indexed="true" stored="true" />
<field name="item_desc" type="text_ik" indexed="true" stored="false" /> <field name="item_keywords" type="text_ik" indexed="true" stored="false" multiValued="true"/>
<copyField source="item_title" dest="item_keywords"/>
<copyField source="item_sell_point" dest="item_keywords"/>
<copyField source="item_category_name" dest="item_keywords"/>
<copyField source="item_desc" dest="item_keywords"/> 第四步:重启tomcat
centos7下搭建solr服务器的更多相关文章
- CentOS7下搭建邮件服务器(dovecot + postfix + SSL)
CentOS 花了基本上两天的时间去配置CentOS7下的邮件服务器.其中艰辛太多了,一定得总结下. 本文的目的在于通过一系列配置,在CentOS 7下搭建dovecot + postfix + ...
- 在Centos7下搭建Git服务器
① 安装 Git ② 服务器端创建 git 用户,用来管理 Git 服务,并为 git 用户设置密码 ③ 服务器端创建 Git 仓库 ④ 客户端 clone 远程仓库 ⑤ 客户端创建 SSH 公钥和私 ...
- Centos7下搭建NFS服务器与连接详解
一,环境介绍 本实验使用了两台centos7虚拟机,其中 服务器:192.168.1.188 客户端:192.168.1.189 二,实验步骤 192.168.1.1 ...
- linux环境下搭建solr服务器--单机版
前提需要在安装好jdk和tomcat,本人用的是jdk1.8+tomcat8.5+solr4.10. 第一步:安装linux.jdk.tomcat.(这步都是比较简单的,就不多说了) 第二步:把sol ...
- centos7下搭建NFS服务器
NFS是Network File System的缩写,即网络文件系统.客户端通过挂载的方式将NFS服务器端共享的数据目录挂载到本地目录下. nfs为什么需要RPC?因为NFS支持的功能很多,不同功能会 ...
- CentOS7下搭建SVN服务器
(1).安装SVN 1)安装SVN [root@youxi1 ~]# yum -y install subversion mod_dav_svn [root@youxi1 ~]# cat /etc/s ...
- CentOS7下搭建Tomcat服务器
Tomcat 服务器是一个免费的开放源代码的 Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试 JSP 程序的首选.Tomcat 和 IIS ...
- 第四百零五节,centos7下搭建sentry错误日志服务器,接收python以及Django错误,
第四百零五节,centos7下搭建sentry错误日志服务器,接收python以及Django错误, 注意:版本,不然会报错 Docker >=1.11Compose >1.6.0 通过d ...
- Windows系统环境下Solr之Java实战(一)搭建solr服务器并配置IK分词
搭建solr服务器 1.下载地址:http://archive.apache.org/dist/lucene/solr/ 2.将D:\JavaWeb\Solr\solr-6.2.0\server\so ...
随机推荐
- 工具-VS CODE安装
在Linux下的安装 1.下载tar.gz文件包, 2.要注意加一条命令,这样在任何目录下就可以使用code .直接启动应用程序了 1 sudo ln -s /path/to/vscode/Code ...
- 《Python 源码阅读》之 类型Type
py一切皆对象: 那么Type也是个对象.对象类型叫PyTypeObject demo >>> a = 1 >>> a 1 >>> type(a) ...
- [HTML 5] Atomic Relevant Busy
Together 'aria-live', we can use 'aria-atomic', 'aria-relevant' and 'aria-busy' to give more informa ...
- Visual C++ 经常使用快捷键
大写和小写 Ctrl+Shift+U: 所有变为大写 Ctrl+U: 所有变为小写 凝视 Ctrl+K+Crtr+C: 凝视选定内容 Ctrl+K+Crtr+U: 取消选定凝视内容 折叠 折叠代码: ...
- Mediator Design Pattern 中介者模式
就是设计一个Mediator类,能够处理其它类的关系. Mediator类: 1 拥有其它全部类的实例对象 2 设置一个接口供其它类使用,其它类也拥有一个Mediator类成员,仅仅需调用这个Medi ...
- 源码高速定位工具-qwandry
https://github.com/adamsanderson/qwandry qwandry 能高速定位到我们须要找到 库文件, 项目 的工具. Ruby中实现高速定位的方法有好多种.我知道的有三 ...
- kentico在使用局域网ip访问的时候提示Missing license或者Invalid website
Missing license Requested URL: http://172.31.212.20/kentico10/ License status: Missing license If yo ...
- Swift - 获取应用名称、应用版本、设备型号、系统版本等信息
有时我们在 App 中提交一些统计信息或者用户反馈信息时,为了能更好地进行分析,通常会附带上当前应用程序的名称.版本号.设备型号.以及设备系统版本.下面演示如何获取这些信息. 1,效果图 程序启动后自 ...
- DNS隧道工具汇总——补充,还有IP over DNS的工具NSTX、Iodine、DNSCat
github上有一堆的工具:https://github.com/search?utf8=%E2%9C%93&q=DNS+tunnel+&type= DNS隧道大检阅 研究了一天的DN ...
- SSH不允许进行DNS解析
ssh设置DNS不解析 sed -i "s/#UseDNS yes/UseDNS no/" /etc/ssh/sshd_config/etc/init.d/sshd restar ...