[ 
https://issues.apache.org/jira/browse/LUCENE-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Rutherglen updated LUCENE-1473:
-------------------------------------

    Attachment: LUCENE-1473.patch

LUCENE-1473.patch

serialVersionUID added to the relevant classes manually.  Defaulted to 10 
because it does not matter, as long it is different between versions.  Thought 
of writing some code to go through the Lucene JAR, do an instanceof on the 
classes for Serializable and then verify that the serialVersionUID is 10.  

Term implements Externalizable.  

SerializationUtils was adapted from WriteableUtils of Hadoop for writing VLong. 
 

TestSerialization use case does term serialization and serializes an arbitrary 
query to a file and compares them.  

TODO: 
- Implement Externalizable
- More unit tests?  How to write a unit test for multiple versions?

> Implement standard Serialization across Lucene versions
> -------------------------------------------------------
>
>                 Key: LUCENE-1473
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1473
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 2.4
>            Reporter: Jason Rutherglen
>            Priority: Minor
>         Attachments: LUCENE-1473.patch, LUCENE-1473.patch
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> To maintain serialization compatibility between Lucene versions, 
> serialVersionUID needs to be added to classes that implement 
> java.io.Serializable.  java.io.Externalizable may be implemented in classes 
> for faster performance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to