On Wed, Sep 17, 2008 at 9:42 PM, sunnyfr <[EMAIL PROTECTED]> wrote:

>
> Sorry but silly question about  "Then the main "query" is
> executed for each primary key identified by the deltaQuery. This main query
> is used to create the documents and index them."
>
> I don't see in the code the link between the deltaQuery and and the main
> Query, how does it get back this ids which has been modified?
>

After the delta query is executed and the changed IDs (PK) are collected. It
modified the "query" using the "pk" attribute with a value in delta list and
runs it to create the document.

For example:
<entity pk="id" query="select * from books" deltaQuery="select id from books
where modified >  '${dataimport.last_index_time}'">

Suppose changed pk given by deltaQuery is [1,5,7] then the following queries
are executed:
select * from books where id = '1';
select * from books where id = '5';
select * from books where id = '7';



> ho just finished, it tooks actually a long time : so maybe my cron job has
> to be less often ?
> <str name="">
> Indexing completed. Added/Updated: 390796 documents. Deleted 0 documents.
> </str>
> <str name="Committed">2008-09-17 18:07:47</str>
> <str name="Time taken ">0:43:40.465</str>


Vary the cron job depending on how frequently and by how many documents the
DB is updated. If an existing import is running, additional calls to start
an import operation are ignored.

-- 
Regards,
Shalin Shekhar Mangar.

Reply via email to