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 nagarjuna <na...@gmail.com> on 2012/02/16 07:26:42 UTC

is it possible to run deltaimport command with out delta query?

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


pls help me anybody
thanx in advance.........

--
View this message in context: http://lucene.472066.n3.nabble.com/is-it-possible-to-run-deltaimport-command-with-out-delta-query-tp3749328p3749328.html
Sent from the Solr - User mailing list archive at Nabble.com.

AW: is it possible to run deltaimport command with out delta query?

Posted by Ramo Karahasan <ra...@googlemail.com>.
Hi,

may you have a look at
http://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImport

hth,
Ramo

-----Ursprüngliche Nachricht-----
Von: nagarjuna [mailto:nagarjuna.avula89@gmail.com] 
Gesendet: Donnerstag, 16. Februar 2012 07:27
An: solr-user@lucene.apache.org
Betreff: is it possible to run deltaimport command with out delta query?

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


pls help me anybody
thanx in advance.........

--
View this message in context:
http://lucene.472066.n3.nabble.com/is-it-possible-to-run-deltaimport-command
-with-out-delta-query-tp3749328p3749328.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: is it possible to run deltaimport command with out delta query?

Posted by "Dyer, James" <Ja...@ingrambook.com>.
There is a good example on how to do a delta update using "command=full-update&clean=false" on the wiki, here:  http://wiki.apache.org/solr/DataImportHandlerFaq#fullimportdelta

This can be advantageous if you are updating a ton of data at once and do not want it executing as many queries to the database.  It also can be easier to maintain just 1 set of queries for both full and delta imports.

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311

-----Original Message-----
From: Shawn Heisey [mailto:solr@elyograg.org] 
Sent: Thursday, February 16, 2012 10:04 AM
To: solr-user@lucene.apache.org
Subject: Re: is it possible to run deltaimport command with out delta query?

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 &gt; ${dataimporter.request.minDid}
             AND did &lt;= ${dataimporter.request.maxDid}
           )
           ${dataimporter.request.extraWhere}
         ) AND (crc32(did) % ${dataimporter.request.numShards})
           IN (${dataimporter.request.modVal})

Thanks,
Shawn


Re: is it possible to run deltaimport command with out delta query?

Posted by Shawn Heisey <so...@elyograg.org>.
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 &gt; ${dataimporter.request.minDid}
             AND did &lt;= ${dataimporter.request.maxDid}
           )
           ${dataimporter.request.extraWhere}
         ) AND (crc32(did) % ${dataimporter.request.numShards})
           IN (${dataimporter.request.modVal})

Thanks,
Shawn