如何用Solr搭建大數據查詢平臺

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


發佈了23 篇原創文章 · 獲贊 8 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章