首页 文章

使用mysql进行Solr fullimport或delta导入

提问于
浏览
0

我使用solr 4.4,我的config.xml文件如下所示 .

我第一次完全导入40000行,它被编入索引 .

现在在我的应用程序中,我再添加一行,总数达到40001,我需要

进行完全导入或增量导入?

我知道delta导入应用于索引的行,

将新行添加到mysql时的方法是什么,我们是否需要使用full

导入所有40001数据?

<dataConfig> 
     <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mydb" user="uname" password="pwd" batchSize="1" />  
     <document name="resource">   
      <entity name="resource" query="SELECT * FROM resource" 
      deltaImportQuery="SELECT * FROM resource  WHERE ref = '${dataimporter.delta.ref}'"
      deltaQuery="SELECT * FROM resource  WHERE last_modified > '${dataimporter.last_index_time}'" transformer="RegexTransformer">    
        <field column="ref" name="ref"/>    
        <field column="name" name="name"/> 
................
............    
    </entity>   
 </document>
</dataConfig>

1 回答

相关问题