2010-08-04 61 views
10

Solr 1.4數據導入處理程序的delta導入語法允許最多4個查詢(查詢,deltaImportQuery,deltaQuery & parentDeltaQuery),但我不清楚「查詢」查詢的用法。Solr DataImportHandler delta導入查詢

在以下示例中,「查詢」查詢與不帶where子句的deltaImportQuery執行的操作相同。

<entity name="data-table" pk="id" 
     query="select id,Subject,Text,UserID,CreatedDate,TopicID,TopicType,EPiPageID,ForumID,Room1ID,Room1Name,LastModifiedDate from dbo.CustomForumPosts" 
     deltaImportQuery="select id,Subject,Text,UserID,CreatedDate,TopicID,TopicType,EPiPageID,ForumID,Room1ID,Room1Name,LastModifiedDate from dbo.CustomForumPosts where id='${dataimporter.delta.id}'" 
     deltaQuery="select id from dbo.CustomForumPosts where LastModifiedDate > '${dataimporter.last_index_time}'">    
</entity> 

我不明白爲什麼,或者如果我需要「查詢」查詢 - 它會出現這樣做無非就是形容全進口相當於這個三角洲。誰能解釋一下?

回答

20

查詢引用按照您暗示的方式執行完全導入時使用的查詢。該文件說:

  • 查詢給需要在全進口Solr的文檔 的 填入字段中的數據
  • 的deltaImportQuery使填充字段所需的數據 運行 Δ-​​時進口
  • 的deltaQuery給出了主鍵的當前實體的 具有改變 自上次索引時間

http://wiki.apache.org/solr/DataImportHandler#Using_delta-import_command

+0

啊,所以當我命令使用此數據配置全進口,它使用「查詢」查詢,當我指揮增量導入它使用的增量部分。那是對的嗎? – Jason 2010-08-09 07:41:54

+1

是的,這是它的工作方式。 – 2010-08-09 08:37:34

相關問題