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