Ok Thanks it's very clear.
Just do you know why my cron job doesn't work :

# m h  dom mon dow   command
*/5 * * * * /usr/bin/wget
http://solr-test.books.com:8080/solr/books/dataimport?command=delta-import

When I go to check the date in conf/dataimport.properties, the date and hour
doesn't change? so yesterday :
#Wed Sep 17 18:07:14 CEST 2008
last_index_time=2008-09-17 17\:24\:07

and weirdly if I run wget
http://solr-test.books.com:8080/solr/books/dataimport?command=delta-import
[EMAIL PROTECTED]:/# wget
http://solr-test.adm.books.com:8180/solr/books/dataimport?command=delta-import
--09:26:24-- 
http://solr-test.adm.books.com:8180/solr/books/dataimport?command=delta-import
           => `dataimport?command=delta-import.2'
Resolving solr-test.adm.books.com... 10.97.1.151
Connecting to solr-test.adm.books.com|10.97.1.151|:8180... connected.
HTTP request sent, awaiting response... Read error (Connection reset by
peer) in headers.
Retrying.

--09:27:51-- 
http://solr-test.adm.books.com:8180/solr/video/dataimport?command=delta-import
  (try: 2) => `dataimport?command=delta-import.2'
Connecting to solr-test.adm.books.com|10.97.1.151|:8180... connected.
HTTP request sent, awaiting response... 200 OK
Length: 807 [text/xml]

100%[==============================================================================================================================>]
807           --.--K/s             
09:27:51 (174.91 MB/s) - `dataimport?command=delta-import.2' saved [807/807]

And my dataimport.properties doesn't change either.

But If i go through my browser it does change my dataimport.properties.








Shalin Shekhar Mangar wrote:
> 
> On Wed, Sep 17, 2008 at 9:42 PM, sunnyfr 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.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/cron-job-update-index-tp19520468p19547964.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to