RE: DIH and updating specific record

2011-02-22 Thread David Yang
Chris Hostetter answered this just recently:
http://wiki.apache.org/solr/DataImportHandler#Accessing_request_paramete
rs

My addition:
Pass a parameter like command=delta-import&idz=31415
And access it via 'sql where id=${dataimporter.request.idz}'

If the idz is a string you might need to prequote the idz value.

-Original Message-
From: Olson, Ron [mailto:rol...@lbpc.com] 
Sent: Tuesday, February 22, 2011 3:18 PM
To: solr-user@lucene.apache.org
Subject: DIH and updating specific record

Hi all-

I am trying to determine if there is a way to tell Solr to update its
index with a specific ID to a record in the database. All the examples
and documentation seems to discuss using a "last updated" date/time
field, but in this case modifying the table would not be an option.
Instead, I'd like to invoke Solr's DIH delta query with a specific ID to
say "here's something new or updated, please update your index with it".

I apologize if this is a trivial thing, but I can't seem to find any
documentation on how to do it.

Thanks,

Ron


DISCLAIMER: This electronic message, including any attachments, files or
documents, is intended only for the addressee and may contain
CONFIDENTIAL, PROPRIETARY or LEGALLY PRIVILEGED information. If you are
not the intended recipient, you are hereby notified that any use,
disclosure, copying or distribution of this message or any of the
information included in or with it is unauthorized and strictly
prohibited. If you have received this message in error, please notify
the sender immediately by reply e-mail and permanently delete and
destroy this message and its attachments, along with any copies thereof.
This message does not create any contractual obligation on behalf of the
sender or Law Bulletin Publishing Company.
Thank you.


DIH and updating specific record

2011-02-22 Thread Olson, Ron
Hi all-

I am trying to determine if there is a way to tell Solr to update its index 
with a specific ID to a record in the database. All the examples and 
documentation seems to discuss using a "last updated" date/time field, but in 
this case modifying the table would not be an option. Instead, I'd like to 
invoke Solr's DIH delta query with a specific ID to say "here's something new 
or updated, please update your index with it".

I apologize if this is a trivial thing, but I can't seem to find any 
documentation on how to do it.

Thanks,

Ron


DISCLAIMER: This electronic message, including any attachments, files or 
documents, is intended only for the addressee and may contain CONFIDENTIAL, 
PROPRIETARY or LEGALLY PRIVILEGED information. If you are not the intended 
recipient, you are hereby notified that any use, disclosure, copying or 
distribution of this message or any of the information included in or with it 
is unauthorized and strictly prohibited. If you have received this message in 
error, please notify the sender immediately by reply e-mail and permanently 
delete and destroy this message and its attachments, along with any copies 
thereof. This message does not create any contractual obligation on behalf of 
the sender or Law Bulletin Publishing Company.
Thank you.