<dataSource driver="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/webmsg" user="sa" password="sa"/>
<!--數據庫字符串的配置-->
<document><!--
transformer 格式轉換:HTMLStripTransformer 索引中忽略HTML標簽
query:完全索引查詢語句
deltaQuery:增量索引查詢主鍵ID
deltaImportQuery:增量索引查詢導入數據
deletedPkQuery:增量索引刪除主鍵ID查詢
-->
<dataConfig> <dataSource driver="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://localhost:1433/webmsg" user="sa" password="sa"/> <document name="doc"> <entity name="msg" pk="ID" transformer="HTMLStripTransformer" query="select * from msg" deltaQuery="select * from msg where msglastmodifytime > '${dataimporter.last_index_time}'"> <field column="ID"/> <field column="MSGTITLE"/> <field column="MSGCONTENT" stripHTML="true"/><!--查詢字段名,配置字段名,是否使用格式化--> <field column="MSGURL"/> <field column="MSGDATE"/> </entity> </document> </dataConfig>