Return-Path: Delivered-To: apmail-lucene-solr-commits-archive@locus.apache.org Received: (qmail 2570 invoked from network); 19 Mar 2008 08:57:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2008 08:57:06 -0000 Received: (qmail 90073 invoked by uid 500); 19 Mar 2008 08:57:04 -0000 Delivered-To: apmail-lucene-solr-commits-archive@lucene.apache.org Received: (qmail 90050 invoked by uid 500); 19 Mar 2008 08:57:04 -0000 Mailing-List: contact solr-commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-commits@lucene.apache.org Received: (qmail 90041 invoked by uid 99); 19 Mar 2008 08:57:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 01:57:04 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2008 08:56:34 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 671CED2DB for ; Wed, 19 Mar 2008 08:56:45 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: solr-commits@lucene.apache.org Date: Wed, 19 Mar 2008 08:56:45 -0000 Message-ID: <20080319085645.10717.87789@eos.apache.org> Subject: [Solr Wiki] Update of "DataImportHandler" by NoblePaul X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification. The following page has been changed by NoblePaul: http://wiki.apache.org/solr/DataImportHandler ------------------------------------------------------------------------------ In order to get data from the database, our design philosophy revolves around 'templatized sql' entered by the user for each entity. This gives the user the entire power of SQL if he needs it. The root entity is the central table whose primary key can be used to join this table with other child entities. == Commands == + + The handler exposes all its API as http requests . The following are the possible operations + * '''full-import''' : Full Import operation can be started by hitting the URL `http://:/solr/dataimport?command=full-import`. This operation will be started in a new thread and the ''status'' attribute in the response should be shown ''busy'' now. Depending on the size of your data set, this operation may take some time. When full-import command is executed, it stores the start time of the operation in a file located at ''conf/dataimport.properties''. This stored timestamp is used when a delta-import operation is executed. + * '''delta-import''' : For incremental imports and change detection run the command `http://:/solr/dataimport?command=delta-import` + * '''status''' : To know the status of the current command , hit the URL `http://:/solr/dataimport` .It gives an elaborate statistics on no:of docs created, deleted, queries run, rows fetched , status etc - === Using `full-import` command === - Full Import operation can be started by hitting the URL [http://localhost:8983/solr/dataimport?command=full-import]. This operation will be started in a new thread and the ''status'' attribute in the response should be shown ''busy'' now. Depending on the size of your data set, this operation may take some time. At any time, you can hit [http://localhost:8983/solr/dataimport] to see the status flag. - - When full-import command is executed, it stores the start time of the operation in a file located at ''conf/dataimport.properties''. This stored timestamp is used when a delta-import operation is executed. - - === Checking the status === - The request returns immedietly after trigggerring the command. To know the status of the current import , hit the URL [http://localhost:8983/solr/dataimport] - - It gives an elaborate statistics on no:of docs created, deleted, queries run, rows fetched , status etc - - === Reload config === - If the data-config is changed and you wissh to reload the file without restarting Solr. eun the command [http://localhost:8983/solr/dataimport?command=reload-config] + * '''reload-config''' : If the data-config is changed and you wissh to reload the file without restarting Solr. run the command `http://:/solr/dataimport?command=reload-config` + * '''abort''' : Abort an ongoing opertaion by hitting the url `http://:/solr/dataimport?command=abort` - === Full Import Example === + == Full Import Example == Let us consider an example. Suppose we have the following schema in our database