solr6.5.1(1)定时增量更新,data-config配置

1.data-config.xml配置增量执行语句





    
    
    
      query="select distinct * from member" 
      deltaQuery="select memid from member
          where mem_date_updated > '${dataimporter.last_index_time}'"
      deltaImportQuery="select memid from member
          where mem_date_updated > '${dataimporter.last_index_time}'">
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
  
    
  
 

delta-import:通过deltaQuery,查到数据库中未被索引记录的ids(id1,id2...),然后执行deltaImportQuery,如果没用deltaImportQuery,就通过Query去组装deltaImportQuery。对于上面的配置文件,就应该组装成这样的query:select distinct * from member where memid = id1,把这条记录导入索引库里面,然后再导id2。曾以为solr应该组装select .. from .. where .. and memid in (id1, id2)这样的query,可好像它并没这样做。

你可能感兴趣的:(solr6.5.1(1)定时增量更新,data-config配置)