lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin A. Burton" <bur...@newsmonster.org>
Subject Re: update performance
Date Thu, 11 Mar 2004 19:26:40 GMT
Chris Kimm wrote:

> Unfortunately, I'm not able to batch the updates.  The application 
> needs to make some descisions based on what each document looks like 
> before and  after the update, so I have to do it one at a time.  I 
> guess this is not a common useage scenario for Lucene.  Otherwise, an 
> update() might already be built in somewhere.
>
> Is there anything in the locking/sync framework which precludes saving 
> the cost of closing the Directory object and deleting the temp lock 
> file each time an update is made?
>
Use a RAM directory... then when you're pretty sure you're done call 
IndexWriter.addIndexes() on the disk index.

Will that work for you?

You can also do this every N documents, or minutes, or memory usage, and 
have the commit work with a synchronized thread.

Kevin

-- 

Please reply using PGP.

    http://peerfear.org/pubkey.asc    
    
    NewsMonster - http://www.newsmonster.org/
    
Kevin A. Burton, Location - San Francisco, CA, Cell - 415.595.9965
       AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
  IRC - freenode.net #infoanarchy | #p2p-hackers | #newsmonster


Mime
View raw message