Hi,

Lucene never appends to files, so this is not something that is not used 
anywhere. Whenever Lucene updates something in the index, it creates a new 
file. In earlier Lucene version there was seeking supported, but this is 
removed since Lucene 4.7 (I think). This was just a hack around some problems 
(requirement to modify header after writing file), but this is now solved, so 
seek() was removed completely. And it won't come back.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de

> -----Original Message-----
> From: Vlad K [mailto:kuzmi...@gmail.com]
> Sent: Wednesday, September 02, 2015 8:07 AM
> To: java-user@lucene.apache.org
> Subject: Lucene 5.2.1: FSDirectory, is it possible to open existing output for
> append?
> 
> FSDirectory createOutput re-creates file because it opens stream with
> TRUNCATE_EXISTING. What is the way to open existing file and append
> data? I used it at Lucene 4.1 to create store with raw messages. I could use
> Files.newOutputStream directly to do that but I just want to understand
> what is the idea of the design that prohibits appending to existing data? I
> can't keep IndexOutput always open, at least after restart of application I
> have to re-open existing data and continue to append. What is the way
> Lucene suggest for that now?


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to