本例结合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>
<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>