You could use Infinispan as an adaptor between the Lucene Directory and a JDBC database connection: http://infinispan.org/docs/8.0.x/user_guide/user_guide.html#_infinispan_as_a_storage_for_lucene_indexes
Infinispan is primarily meant as an in-memory high perfomance storage but can be used as a "front cache" backed by other persistent stores; such a persistent store can be another NoSQL technology to write on disks (Infinispan focuses on in-memory) or a relational database. The license is ASL2 and it includes a Lucene Directory implementation which I try to keep up to date with latest Lucene changes. We created it to simplify synchronization between various nodes of small read-mostly indexes, as Infinispan supports the clustering types I needed but it will work fine even for a single node. Regards, Sanne On 7 January 2016 at 11:03, Uwe Schindler <u...@thetaphi.de> wrote: > Hi, > > Lucene does not support any serialization out of the box. If you really need > to serialize the RAMDirectory, you have to do it on your own using the > IndexInputs provided. > Lucene 3 accidentally had RAMDirectory be able to be serialized, but it was > broken. All of this was removed in 4.0. > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > >> -----Original Message----- >> From: ankit.mura...@ril.com [mailto:ankit.mura...@ril.com] >> Sent: Thursday, January 07, 2016 11:53 AM >> To: java-user@lucene.apache.org >> Subject: RAM Directory not Serializable in Lucene 4.4 as well as 5.X >> >> Dear Team, >> >> I am trying to serialize RAM Directory object but it throws an exception >> every >> time. >> >> MY use case is to serialize the object and store it in Database for reasons >> beyond my control. >> >> Same also for retrieving the object from database and then putting it into >> RAM Directory. >> >> Need your support to understand what can be done to serialize/deserialize >> this object. >> >> Regards, >> Ankit Murarka >> "Confidentiality Warning: This message and any attachments are intended >> only for the use of the intended recipient(s). >> are confidential and may be privileged. If you are not the intended >> recipient. >> you are hereby notified that any >> review. re-transmission. conversion to hard copy. copying. circulation or >> other use of this message and any attachments is >> strictly prohibited. If you are not the intended recipient. please notify the >> sender immediately by return email. >> and delete this message and any attachments from your system. >> >> Virus Warning: Although the company has taken reasonable precautions to >> ensure no viruses are present in this email. >> The company cannot accept responsibility for any loss or damage arising from >> the use of this email or attachment." > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org