[
https://issues.apache.org/jira/browse/LUCENE-1473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652962#action_12652962
]
robert engels commented on LUCENE-1473:
---------------------------------------
The reason the XML is not needed, is because the string format is robust
enough, and is simpler...
I am not focused on performance. It is just that Java serialization works well
for temporary persistence. Other formats are better for long-term persistence.
If you are only doing temporary persistence, you don't need backwards
compatibility.
Also if the API is exposed to the world (i.e. non-Java), a human readable (or
even binary) format that is not based on Java serialization is going to work
much better.
if you use a non-binary protocol it is far easier to extend it in the future,
and retain the ability to easily read older versions. This is why Swing uses
XML for serialization, and not binary.
You could certainly use specialized class loaders to load old versions of
classes in order to maintain the ability to read old now incompatible
classes... it is just a lot of work (maintenance too, need to keep the old code
around... etc.) for not a lot of benefit.
As for SOLR's binary protocol, fine, but it is probably for a fringe use case,
or the submitter didn't do real world tests... The XML parsing is just not
that much greater than binary (at least in Java, since it is the object
creation they both use that affects it). The search time is going to be far
greater.
For large updates a binary loader can be more efficient that XML, but if you
test it using real-world examples, I doubt you will see a huge difference - at
least for the types of application TYPICALLY written using Lucene.
> Implement Externalizable in main top level searcher classes
> -----------------------------------------------------------
>
> 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
>
>
> To maintain serialization compatibility between Lucene versions, major
> classes can implement Externalizable. This will make Serialization faster
> due to no reflection required and maintain backwards compatibility.
--
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]