You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Ryan McKinley <ry...@gmail.com> on 2008/07/21 21:30:25 UTC
SolrDocument serializable?
How do you all feel about forcing the fields in SolrDocument to be
Serializable?
from
private Map<String,Object> _fields = null;
to:
private Map<String,Serializable> _fields = null;
likewise with SolrInputField?
from:
Object value = null;
to
Serializable value = null;
Everything we are pumping into these fields is serializable. The only
catch is that List/Map are not Serializable, but the implementations
we use are.
thoughts?
Re: SolrDocument serializable?
Posted by Ryan McKinley <ry...@gmail.com>.
forget I suggested it...
I just tried implementing it, and the changes are more substantial
then I imagined.
On Jul 22, 2008, at 12:06 AM, Noble Paul നോബിള്
नोब्ळ् wrote:
> I do not think it makes any difference.SolrDocument is already
> Serializable. And it is clean in the current form. . Moreover, if your
> using POJO's (DocumentObjectBinder), we use reflection to insert
> fields where it is possible to insert a non-serializable object.
> generic type information is a compile time thing
>
> Not every user actually serialize these objects . For the ones who use
> it we can add a note in the javadocs.
>
>
>
> On Tue, Jul 22, 2008 at 1:00 AM, Ryan McKinley <ry...@gmail.com>
> wrote:
>> How do you all feel about forcing the fields in SolrDocument to be
>> Serializable?
>> from
>> private Map<String,Object> _fields = null;
>> to:
>> private Map<String,Serializable> _fields = null;
>>
>> likewise with SolrInputField?
>> from:
>> Object value = null;
>> to
>> Serializable value = null;
>>
>> Everything we are pumping into these fields is serializable. The
>> only catch
>> is that List/Map are not Serializable, but the implementations we
>> use are.
>>
>> thoughts?
>
>
>
> --
> --Noble Paul
Re: SolrDocument serializable?
Posted by Noble Paul നോബിള് नोब्ळ् <no...@gmail.com>.
I do not think it makes any difference.SolrDocument is already
Serializable. And it is clean in the current form. . Moreover, if your
using POJO's (DocumentObjectBinder), we use reflection to insert
fields where it is possible to insert a non-serializable object.
generic type information is a compile time thing
Not every user actually serialize these objects . For the ones who use
it we can add a note in the javadocs.
On Tue, Jul 22, 2008 at 1:00 AM, Ryan McKinley <ry...@gmail.com> wrote:
> How do you all feel about forcing the fields in SolrDocument to be
> Serializable?
> from
> private Map<String,Object> _fields = null;
> to:
> private Map<String,Serializable> _fields = null;
>
> likewise with SolrInputField?
> from:
> Object value = null;
> to
> Serializable value = null;
>
> Everything we are pumping into these fields is serializable. The only catch
> is that List/Map are not Serializable, but the implementations we use are.
>
> thoughts?
--
--Noble Paul