nutch的index-writers.xml
生活随笔
收集整理的這篇文章主要介紹了
nutch的index-writers.xml
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
nutch的index-writers.xml
出現在較高版本的nutch中
該文件出現在比較高的nutch版本,對于一些比較低的nutch版本中并沒有這個配置文件,如:在nutch1.7中并沒有這個index-writers.xml。
在版本nutch1.7中對于索引的映射配置文件在solrindex-mapping.xml,該文件是和solr服務器建立索引映射的配置文件。
index-writers.xml解讀
官網對該配置文件的解析:IndexWriters - NUTCH - Apache Software Foundation
目前官方支持以下索引服務的配置:
| indexer-solr | Indexer for a Solr server |
| indexer-rabbit | Indexer for a RabbitMQ server |
| indexer-dummy | Indexer usually used for debugging, it writes in a plain text file |
| indexer-elastic | Indexer for an Elasticsearch server |
| indexer-elastic-rest | Indexer for Elasticsearch, but using Jest to connect with the REST API provided by Elasticsearch |
| indexer-cloudsearch | Indexer for Amazon CloudSearch |
| indexer-csv | Indexer for writing documents to a CSV file |
官方提供的index-writers.xml已經提供了多個索引服務的配置,這里只介紹solr,其他的writers類似,具體看官方文檔。
<writer id="indexer_solr_1" class="org.apache.nutch.indexwriter.solr.SolrIndexWriter"><!--服務基礎參數配置--><parameters><param name="type" value="http"/><!--solr中core的地址--><param name="url" value="http://localhost:8983/solr/nutch"/><param name="collection" value=""/><param name="weight.field" value=""/><param name="commitSize" value="1000"/><!--solr服務器登錄認證(如果solr沒配置登錄的賬號密碼,默認沒有)--><param name="auth" value="false"/><param name="username" value="username"/><param name="password" value="password"/></parameters><mapping><copy><!-- <field source="content" dest="search"/> --><!-- <field source="title" dest="title,search"/> --></copy><!--nutch中解析出來的一些字段信息重命名--><rename><field source="metatag.description" dest="description"/><field source="metatag.keywords" dest="keywords"/></rename><!--映射時移除segment字段--><remove><field source="segment"/></remove></mapping></writer>總結
以上是生活随笔為你收集整理的nutch的index-writers.xml的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 正畸方案多久能拿到
- 下一篇: Taylor Swift 荣膺 2023