Solr4.10.2集成Nutch1.9与自带UI界面使用
来源:互联网 发布:网络语拔草是什么意思 编辑:程序博客网 时间:2024/05/16 19:28
原文地址:http://blog.csdn.net/fyfmfof/article/details/42803841
一、Solr4.10.2与Nutch1.9集成
环境:Solr4.10.2已经配置在Tomcat上
Solr的Tomcat配置详见Solr4.10.2的Tomcat配置
将NUTCH_DIR/conf/schema-solr4.xml拷贝到SOLR_HOME/collection1/conf/,重命名为schema.xml,并在<fields>...</fields>
最后添加一行 <field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>
重启Tomcat后即可用Nutch的crawl命令带上solrURL参数进行爬取索引工作了
Nutch1.9的命令使用详见 Nutch1.9安装配置与基本使用介绍
在爬取索引后进入solr管理界面可以看到solr下已经有索引好的数据了:
二、Solr4.10.2的自带UI界面(Solritas)
1.拷贝solr-4.10.2\contrib\velocity\lib以及solr-4.10.2\dist下面的所有jar包到SOLR_SERVER\WEB-INF\lib目录下
2.如果不进行上一步集成Nutch,这一步就可以跳过了,如果集成了Nutch则需要在新的schema.xml文件中继续添加配置
① 在</types>
前加上
<!-- Money/currency field type. Seehttp://wiki.apache.org/solr/MoneyFieldType Parameters: defaultCurrency: Specifies thedefault currency if none specified. Defaults to "USD" precisionStep: Specifies the precisionStep for the TrieLongfield used for the amount providerClass: Lets you plug in other exchange providerbackend: solr.FileExchangeRateProvider is the default and takes one parameter: currencyConfig:name of an xml file holding exchange rates solr.OpenExchangeRatesOrgProvider uses rates from openexchangerates.org: ratesFileLocation:URL or path to rates JSON file (default latest.json on the web) refreshInterval:Number of minutes between each rates fetch (default: 1440, min: 60) --> <fieldType name="currency"class="solr.CurrencyField" precisionStep="8" defaultCurrency="USD" currencyConfig="currency.xml" /> <!-- boolean type: "true" or "false" --> <fieldType name="boolean" class="solr.BoolField"sortMissingLast="true"/>
②在</fields>
前加上
<field name="cat" type="string"indexed="true" stored="true" multiValued="true"/><field name="manu_exact" type="string"indexed="true" stored="false"/><field name="content_type" type="string"indexed="true" stored="true"multiValued="true"/><field name="price" type="float" indexed="true"stored="true"/><field name="popularity" type="int"indexed="true" stored="true" /><field name="inStock" type="boolean"indexed="true" stored="true" /><dynamicField name="*_s" type="string" indexed="true" stored="true"/><dynamicField name="*_c" type="currency" indexed="true" stored="true"/> <dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
③在</schema>
前加上 <copyField source="author" dest="author_s"/>
<copyField source="price"dest="price_c"/>
④ 中文分词按照之前的方法配置就好,IK分词器配置详见Solr4.10.2的IK Analyzer分词器配置
3.重启Tomcat,访问http://localhost:8080/solr/browse即可
- Solr4.10.2集成Nutch1.9与自带UI界面使用
- Solr4.10.2集成Nutch1.9与自带UI界面使用
- nutch1.9与solr4.8.1整合
- redhat 5.5nutch1.9和solr4.9集成
- nutch1.9和solr4.5集成 输出信息
- Ubuntu13.10下配置Nutch1.7和Solr4.6集成
- Slor5.x与mmseg4j的集成【使用solr自带的Jetty Server】
- Nutch1.9安装配置与基本使用介绍
- Nutch1.9安装配置与基本使用介绍
- 使用Ogre自带UI(SdkTrays)创建应用程序
- Solr4.4 + hadoop2.0 + nutch1.8
- Nutch1.2 的安装与使用
- 如何使用openfire自带的数据库HyperSQL (界面设置)
- Android 手机获取短信验证码—自带UI界面
- MySQL自带函数整理与使用
- MFC UI界面自绘制
- tomcat7 集成 solr4.3.1
- Nutch1.8+Hadoop1.2+Solr4.3分布式集群配置
- Lua学习之从文件中找字符串
- 1092. To Buy or Not to Buy (20)建立查询表,或者叫哈希表
- 战国策评析(三)---齐
- C#水晶报表教程
- NYOJ 题目1091 还是01背包(二分,超大01背包)
- Solr4.10.2集成Nutch1.9与自带UI界面使用
- Maven的作用到底是什么?
- read()
- IE9在WIN7下不能输入任何文字数字 字母
- Android--多线程之Handler
- HTML中margin与padding的区别
- Qtcreator中常用快捷键总结
- 返回二进制数中1的个数
- C++之虚函数