On 9/9/2010 1:23 PM, Vladimir Sutskever wrote:
Shawn,
Can you provide a sample of passing the parameter via URL? And how using it
would look in the data-config.xml
Here's the URL that I send to do a full build on my last shard:
http://idxst5-a:8983/solr/build/dataimport?command=full-import&optimize=true&commit=true&dataTable=ncdat&numShards=6&modVal=5&minDid=0&maxDid=242895591
If I want to do a delta, I just change the command to delta-import and
give it a proper minDid value, rather than 0.
Below is the entity from my data-config.xml. You have to have a
deltaQuery defined for delta-import to work, but if you're going to use
your own placeholders, just put something in that returns a single value
very quickly. In my case, my query and deltaImportQuery are actually
identical.
<entity name="dataTable" pk="did"
query="SELECT *,FROM_UNIXTIME(post_date) as pd FROM
${dataimporter.request.dataTable} WHERE did >
${dataimporter.request.minDid} AND did <=
${dataimporter.request.maxDid} AND (did %
${dataimporter.request.numShards}) IN (${dataimporter.request.modVal})"
deltaQuery="SELECT MAX(did) FROM ${dataimporter.request.dataTable}"
deltaImportQuery="SELECT *,FROM_UNIXTIME(post_date) as pd FROM
${dataimporter.request.dataTable} WHERE did >
${dataimporter.request.minDid} AND did <=
${dataimporter.request.maxDid} AND (did %
${dataimporter.request.numShards}) IN (${dataimporter.request.modVal})">
</entity>