In the above scenario, the SOLR configuration and the import database have been successful, and we have implemented the SOLR incremental indexing functionality.
Detailed steps:
1, add a Date Type field to the table in the database, my field name is Createtime;
2. Modify the Solr-date-config.xml file as follows
<dataConfig>
<datasource password= "1234" user= "sa" url= "jdbc:sqlserver://127.0.0.1:1433;databasename=ssh"//database to be connected and user name password Database driver driver= "Com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<document name= "Info" pk= "id" >
<entity name= "Zpxx" transformer= "Clobtransformer" pk= "id"
query= "SELECT * from Users"//query: Querying database tables to match record data
deltaimportquery= "Select Id,name, pwd from SSH.dbo.users where id = ' ${dih.delta.id} '"//Incremental index query imported data
deltaquery= "SELECT ID from Users where createtime > ' ${dataimporter.last_index_time} '">//deltaquery: Incremental index query primary key ID
<field name= "id" column= "id"/>
<field name= "name" column= "name"/>
<field name= "pwd" column= "pwd"/>
<filed name= "Createtime" coiumn= "Createtime"/>
</entity>
</document>
</dataConfig>
3, in the schema. The Createtime field in the XML file that you just added
<field name= "Createtime" type= "date" indexed= "true" stored= "true" multivalued= "false"/>
4, the new data inserted in the database, and then in the SOLR home using command = Delta Import Import data, and then in query to see whether the data can be queried, if it is successful, if not, then check the configuration file there is a problem.
SOLR Implements incremental indexing