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 "Pai, Gurunath (GE Corporate, consultant)" <gu...@ge.com> on 2014/06/24 14:07:18 UTC
How to add some more documents to an existing index file
I am having an index file which contains the data from mysql database, I created this index file using dataimporthandler of solr. My requirement is, suppose if i add a new row to database, I want to update that row in my existing index file of solr. I dont have any idea how to add the new record from database to solr ? Do I need to re-index the index file again or even single record update is possible.
Thanks & Regards
Gurunath Pai.
Re: How to add some more documents to an existing index file
Posted by Erik Hatcher <er...@gmail.com>.
Single document update is quite possible! No worries there.
Since you’re using DIH (data import handler) you can use the delta-import command, see https://cwiki.apache.org/confluence/display/solr/Uploading+Structured+Data+Store+Data+with+the+Data+Import+Handler#UploadingStructuredDataStoreDatawiththeDataImportHandler-DataImportHandlerCommands
You’ll need some way to determine what a “new” document is. DIH provides the last indexed timestamp that you can leverage in the delta query configuration to pick up documents since that time.
Erik
On Jun 24, 2014, at 8:07 AM, Pai, Gurunath (GE Corporate, consultant) <gu...@ge.com> wrote:
> I am having an index file which contains the data from mysql database, I created this index file using dataimporthandler of solr. My requirement is, suppose if i add a new row to database, I want to update that row in my existing index file of solr. I dont have any idea how to add the new record from database to solr ? Do I need to re-index the index file again or even single record update is possible.
>
> Thanks & Regards
> Gurunath Pai.
Re: How to add some more documents to an existing index file
Posted by gurunath <gu...@ge.com>.
I have found the answer for the above query, i.e, by using Delta import
handler. But If I am going to use the deltaimporthandler of solr, Then I
need to add a last modified column in the database table. Is it possible to
achieve the same without altering the database table.
--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-add-some-more-documents-to-an-existing-index-file-tp4143677p4143690.html
Sent from the Solr - User mailing list archive at Nabble.com.