将data-config.xml配置如下,加入 batchSize="-1":
<?xml version="1.0" encoding="UTF-8" ?><dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/solr"
user="root"
password="123456"
batchSize="-1"
/>
<document>
<entity name="employee" query="SELECT emp_no,birth_date,first_name,last_name,gender,hire_date FROM employees ">
<field column="emp_no" name="id"/>
<field column="birth_date" name="birth_date"/>
<field column="first_name" name="first_name"/>
<field column="last_name" name="last_name"/>
<field column="gender" name="gender"/>
<field column="hire_date" name="hire_date"/>
</entity>
</document>