You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Aditya Liviandi <ad...@i2r.a-star.edu.sg> on 2006/03/20 07:05:21 UTC

serializable RAMDirectory

Is there any implementation of lucene that allows the index to be
portable? It seems pointless that I have to do the indexing operation to
a directory with FSDirectory, and then copy the directory over to the
portable file, and unpack the file whenever I want to search the
directory at another place...

Can anyone help me?


--------------------------------------------------- I²R Disclaimer ------------------------------
This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
-------------------------------------------------------------------------------------------------


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


RE: serializable RAMDirectory

Posted by Aditya Liviandi <ad...@i2r.a-star.edu.sg>.
Because I'm embedding the index inside another file...
So that file is self-contained, containing both the payload (which might
not be text) and the index...

But I figured out how to do it already... I just made RAMDirectory and
RAMFile Serializable and create my own build of lucene...

-----Original Message-----
From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
Sent: Monday, March 20, 2006 7:21 PM
To: java-user@lucene.apache.org
Subject: Re: serializable RAMDirectory


On Mar 20, 2006, at 1:05 AM, Aditya Liviandi wrote:

> Is there any implementation of lucene that allows the index to be
> portable? It seems pointless that I have to do the indexing 
> operation to
> a directory with FSDirectory, and then copy the directory over to the
> portable file, and unpack the file whenever I want to search the
> directory at another place...

Could you be more specific about what you want that Lucene does not 
already provide?

FSDirectory is essentially a serialized RAMDirectory.  What do you 
mean by "unpack the file"?  There is nothing special needed to move 
an index from one machine to another, simply copy the entire 
directory and use your searching code to refer to its location.

	Erik


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


--------------------------------------------------- I²R Disclaimer ------------------------------
This email is confidential and may be privileged.  If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you.
-------------------------------------------------------------------------------------------------


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


Re: serializable RAMDirectory

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 20, 2006, at 1:05 AM, Aditya Liviandi wrote:

> Is there any implementation of lucene that allows the index to be
> portable? It seems pointless that I have to do the indexing  
> operation to
> a directory with FSDirectory, and then copy the directory over to the
> portable file, and unpack the file whenever I want to search the
> directory at another place...

Could you be more specific about what you want that Lucene does not  
already provide?

FSDirectory is essentially a serialized RAMDirectory.  What do you  
mean by "unpack the file"?  There is nothing special needed to move  
an index from one machine to another, simply copy the entire  
directory and use your searching code to refer to its location.

	Erik


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