Windows系统环境下Solr之Java实战(二)配置从MySQL数据库批量导入索引
<?xml version="1.0" encoding="UTF-8"?><dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/lucene?characterEncoding=utf-8"
user="root"
password="root"
batchSize="-1" />
<document>
<entity name="product"query="select pid,name,catalog,catalog_name,price,number,description,picture,release_time fromproducts" >
<field column="pid" name="id"/>
<field column="name" name="product_name"/>
<field column="catalog_name" name="product_catalog_name"/>
<field column="price" name="product_price"/>
<field column="description" name="product_description"/>
<field column="picture" name="product_picture"/>
</entity>
</document>
</dataConfig>
页:
[1]