如何用Solr搭建大数据查询平台

来源:互联网 发布:暖男的同义网络词 编辑:程序博客网 时间:2024/05/22 15:41

本例结合solr+mysql搭建一个比较高效的大数据量查询的平台,主要4部操作

1、安装配置solr 2、结合mysql某些表配置solr 3、建立solr core  4、导入mysql数据和java环境测试


具体步骤参考 :http://www.freebuf.com/articles/database/100423.html,作者有两个地方错误了,一个是

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

这个定义应该是加入schema.xml中,不是solrconfig中;另外一个地方要修改一下,就是elevate.xml这个配置文件里的设置,修改 elevate.xml 里面的内容
<query text="ipod">
<doc id="MA147LL/A" /> <!– put the actual ipod at the top –>
<doc id="IW-02" exclude="true" /> <!– exclude this cable –>
</query>

<query text="ipod">
<doc id="1" /> <!– put the actual ipod at the top –>
<doc id="2" exclude="true" /> <!– exclude this cable –>
</query>


0 0
原创粉丝点击