lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Fäßler <erik.faess...@uni-jena.de>
Subject Serialization of Lucene Document objects
Date Tue, 22 Feb 2011 13:58:05 GMT
  Hi there,

I'd like to serialize some Lucene Documents I've built before. My goal 
is to send the documents over a http connection to a Solr server which 
then should add them to its index.

I thought this would work as the Document class implements Serializable 
as do the Fields. Unfortunately, the serialization fails because the 
TokenStream class is not serializable. But if you create Fields on 
TokenStreams, these are stored in the Field objects and so the 
serialization does not seem possible.

Did I miss something? Or is it just the case that you can serialize 
documents whose fields only have String values (I didn't check if this 
works indeed, but I guess so) and no documents which need a TokenStream?

Other ideas how to archive my goal? I already have a solution where I 
let Solr build the document. This is too slow, however, I'd like to 
scale to document construction, so I'd rather want to do as much as work 
before as possible (my data is rather large and of a bit complicated 
structure).

Thanks for any hints!

Regards,

     Erik

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


Mime
View raw message