Lucene IndexOutput

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lucene IndexOutput

nithin kamath
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
Reply | Threaded
Open this post in threaded view
|

Re: Lucene IndexOutput

Michael McCandless-2
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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]