Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

Lucene IndexOutput

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


nithinkamathm at gmail

Nov 21, 2009, 7:36 AM

Post #1 of 2 (439 views)
Permalink
Lucene IndexOutput

I use Lucene's IndexOutput to dump index contents to a file, I use
createOutput method in FSDirectory to create the file in the directory with
the given name and use writeString and writeInt to write into it.

The createOutput method though creates a new file each time, is there anyway
that I can append to an existing file by seeking to the end of the file?

Thanks,
nithin
--
View this message in context: http://old.nabble.com/Lucene-IndexOutput-tp26457669p26457669.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


lucene at mikemccandless

Nov 24, 2009, 12:51 PM

Post #2 of 2 (364 views)
Permalink
Re: Lucene IndexOutput [In reply to]

No, createOutput is designed to always create a new file. This fits
with Lucene because Lucene is "write once" (never writes to the same
file more than once).

Probably you should fallback to Java's IO APIs?

Mike

On Sat, Nov 21, 2009 at 10:36 AM, nithin kamath <nithinkamathm [at] gmail> wrote:
>
> I use Lucene's IndexOutput to dump index contents to a file, I use
> createOutput method in FSDirectory to create the file in the directory with
> the given name and use writeString and writeInt to write into it.
>
> The createOutput method though creates a new file each time, is there anyway
> that I can append to an existing file by seeking to the end of the file?
>
> Thanks,
> nithin
> --
> View this message in context: http://old.nabble.com/Lucene-IndexOutput-tp26457669p26457669.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.