Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

solr delta import "fetches" but does not "process"

when I run /solr/dataimport?command=full-import it processes all the documents. However, when I run a delta import (/solr/dataimport?command=delta-import) it correctly identifies the updated data (returns "<str name="Total Rows Fetched">1</str>") but does not process any of it (returns "<str name="Total Changed Documents">0</str>")

my data-config.xml looks something like this:

<entity name="category" pk="catID" 
query="SELECT CONCAT('c_',catID) ID, catID, catName FROM category" 
deltaImportQuery="SELECT CONCAT('c_',catID) ID, catID, catName FROM category WHERE catID = '{$dataimporter.delta.catID}'" 
deltaQuery="SELECT catID FROM category WHERE catDate &gt; '${dataimporter.last_index_time}'"/>

(note - there is a seperate reason for my concat)

why does the full import process while the delta import fetches but does not process?

like image 329
YWSW Avatar asked May 01 '12 20:05

YWSW


2 Answers

'{$dataimporter.delta.catID}', here the catID should be the value of the name attribute in the field definitions. I had same problem, then realized that the referenced variable is the field name... I hope it works.

like image 129
Recep YALMAN Avatar answered Nov 14 '22 06:11

Recep YALMAN


I had same issue and figured out that deltaImportQuery is case sensitive

Made my id Column as "ID"

deltaImportQuery="select id,state,name,place,city from temp where ID='${dih.delta.ID}

like image 45
user888263 Avatar answered Nov 14 '22 06:11

user888263