[ 
https://issues.apache.org/jira/browse/LUCENE-2707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992990#comment-12992990
 ] 

Uwe Schindler commented on LUCENE-2707:
---------------------------------------

In Lucene trunk (coming version 4.0) we removed support for Serialization in 
Lucene entirely: LUCENE-2908

So there is no need to fix this, as it was never working correctly and lead to 
very stupid problems. Remote Search was broken and was also removed in Lucene 
trunk.

I keep this open an will supply a patch to add the missing getter methods, 
which are indeed missing (also for NumericRangeQuery).

> NumericField throws a NotSerializableException when it is serialized, even 
> though it implements Serializable
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2707
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2707
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.3, 3.0.2
>            Reporter: Marc Tinkler
>
> NumericField extends from AbstractField, which implements Serializable.
>  
> NumericField cannot be serialized because it stores the precisionStep in the 
> underlying NumericTokenStream, which is not serializable.  The 
> NumericTokenStream should either be made serializable, or made transient in 
> NumericField, and the precisionStep should be stored directly in 
> NumericField, and recreated on deserialization.
> Not entirely related, but the real reason I found this bug was because Field 
> and NumericField are not cloneable and there is no way to make a copy 
> manually, since there is no getter method for precisionStep on NumericField, 
> so I thought I was going to be clever and do a "poor man's clone" by 
> serializing/deserializing a NumericField.  No such luck.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to