[
https://issues.apache.org/jira/browse/LUCENE-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653421#action_12653421
]
robert engels commented on LUCENE-1473:
---------------------------------------
Even if you changed SUIDs based on version changes, there is the very real
possibility that the new code CAN'T be instantiated in any meaningful way from
the old data. Then what would you do?
Even if you had all of the old classes, and their dependencies available from
dynamic classloading, it still won't work UNLESS every new feature is designed
with backwards compatibility with previous versions - a burden that is just
too great when required of all Lucene code.
Given that, as has been discussed, there are other formats that can be used
where isolated backwards persistence is desired (like XML based query
descriptions). Even these won't work if the XML description references
explicit classes - which is why designing such a format for a near limitless
query structure (given user defined query classes) is probably impossible.
So strive for a decent solution that covers most cases, and fails gracefully
when it can't work.
using standard serialization (with proper transient fields) seems to fit this
bill, since in a stable API, most core classes should remain fairly constant,
and those that are bound to change may take explicit steps in their
serialization (if deemed needed)
> 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
>
> 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]