You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Frank A <fs...@gmail.com> on 2010/07/08 19:54:18 UTC

Delta Import by ID

I'm still having issues - my config looks like:

            <entity name="place" query="select DestID,DestinationName,Geo_
Long,Geo_Lat,Address,City,State,Zip,PhoneNumber,cost from destinations"
                deltaQuery="select DestID from destinations where
CreationDate > '${dataimporter.last_index_time}'"
                deltaImportQuery="select
DestID,DestinationName,Geo_Long,Geo_Lat,Address,City,State,Zip,PhoneNumber,cost
from destinations where DestID='${dataimporter.delta.id}'"
                >

However I really dont want to use CreationDate, but rather just pass in the
id (as done in the deltaImportQuery) - Can I do that directly - if so how do
I specify the value for dataimporter.delta.id?

(P.S. sorry for a new thread, I kept getting my mail bounced back when I did
a reply, so I'm trying a new thread.)

Re: Delta Import by ID

Posted by Chris Hostetter <ho...@fucit.org>.
I'm not certain but i think what you want is something like this...

deltaQuery="select '${dataimporter.request.do_this_id}'"
deltaImportQuery="select ... from destinations 
                  where DestID='${dataimporter.delta.id}'
           "
...and then hit the handler with a URL like..

   /dataimport?config=data-config.xml&command=delta-import&do_this_id=XYZ&

Normally, the job of deltaQuery is to pick a list of IDs based on the 
${dataimporter.last_index_time}, and the ndeleteImportQuery fetches all 
the data for those Ids -- but in your case you don't care about the 
last index time, you just want to force it to index a specific id.  so you 
just need to select that id as is in your request params.


:             <entity name="place" query="select DestID,DestinationName,Geo_
: Long,Geo_Lat,Address,City,State,Zip,PhoneNumber,cost from destinations"
:                 deltaQuery="select DestID from destinations where
: CreationDate > '${dataimporter.last_index_time}'"
:                 deltaImportQuery="select
: DestID,DestinationName,Geo_Long,Geo_Lat,Address,City,State,Zip,PhoneNumber,cost
: from destinations where DestID='${dataimporter.delta.id}'"
:                 >
: 
: However I really dont want to use CreationDate, but rather just pass in the
: id (as done in the deltaImportQuery) - Can I do that directly - if so how do
: I specify the value for dataimporter.delta.id?
: 
: (P.S. sorry for a new thread, I kept getting my mail bounced back when I did
: a reply, so I'm trying a new thread.)
: 



-Hoss