On 2/15/2012 11:26 PM, nagarjuna wrote:
hi all..
i am new to solr .....can any body explain me about the delta-import and
delta query and also i have the below questions
1.is it possible to run deltaimport without delataquery?
2. is it possible to write a delta query without having last_modified column
in database? if yes pls explain me
Assuming I understand what you're asking:
Define deltaImportQuery to be the same as query, then set deltaQuery to
something that always returns some kind of value in the field you have
designated as your primary key. The data doesn't have to be relevant to
anything at all, it just needs to return something for the primary key
field. Here's what I have in mine, my pk is did:
deltaQuery="SELECT 1 AS did"
If you wish, you can completely ignore lastModified and track your own
information about what data is new, then pass parameters via the
dataimport handler URL to be used in your queries. This is what both my
query and deltaImportQuery are set to:
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})
Thanks,
Shawn