tomcat 安装solr
1. tomcat安装solr,solr.war不要放在webapps目录下,多个应用用一个
2. 装好tomcat,在conf\Catalina\localhost 中建两个文件solr1.xml, solr2.xml
这是装两个solr应用,一个建一个文件
solr1.xml, solr2.xml类似
<?xml version="1.0" encoding="utf-8"?><Context docBase="d:\in\wars\solr1.4.war" debug="0" crossContext="true" > <Environment name="solr/home" type="java.lang.String" value="d:\in\solrdate\solr1" override="true" /></Context>
<requestHandler name="/dataimport" clob="true"中的列名DETAIL一定要大写,要不会不起作用
<dataConfig> <dataSource type="JdbcDataSource" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:XE" user="username" password="password"/> <document> <entity name="pinyin" transformer="MbBlobTransformer" query="select id, title, detail,gatedate,typeid,marketid,sourcenet,click,stewardcount,mark,samecode,isdelmark,pic,standard,price from commodity"> <field column="DETAIL" blob="true"/> </entity> </document></dataConfig>
1 楼 敲键盘的狗 2011-12-22 MbBlobTransformer咋写啊,大侠