On 10/11/2011 12:23 AM, nagarjuna wrote:
Hi pravesh Thank u for ur reply..............
i am using DIH,but right now i dont have timestamp in my
database....instead of that i have datecreated column which wont updated for
the changes .....when ever i created some thing it just store the created
time.....is there any chance to do with this column instead of the timestamp
....
By passing variables in via the DIH url and tracking it yourself, you
can use arbitrary information outside of Solr for keeping track of
what's new for delta-imports.
Here's the URL template that I use, and the DIH config that goes with
it. I keep track of the minDid and maxDid values outside of Solr and
pass them in on each request with values appropriate for the shard
that's being updated. Note that < and > are encode as < and > as
required by XML.
http://HOST:PORT/solr/CORE/dataimport?command=COMMAND&dbHost=DBSERVER&dbSchema=DBSCHEMA&dataView=DATAVIEW&numShards=NUMSHARDS&modVal=MODVAL&minDid=MINDID&maxDid=MAXDID&extraWhere=EXTRAWHERE
query="
SELECT * FROM ${dataimporter.request.dataView}
WHERE (
(
did > ${dataimporter.request.minDid}
AND did <= ${dataimporter.request.maxDid}
)
${dataimporter.request.extraWhere}
) AND (crc32(did) % ${dataimporter.request.numShards})
IN (${dataimporter.request.modVal})
"
deltaImportQuery="
SELECT * FROM ${dataimporter.request.dataView}
WHERE (
(
did > ${dataimporter.request.minDid}
AND did <= ${dataimporter.request.maxDid}
)
${dataimporter.request.extraWhere}
) AND (crc32(did) % ${dataimporter.request.numShards})
IN (${dataimporter.request.modVal})
"
deltaQuery="SELECT 1 AS did"