Hi Vicenzo,

May be looking at the overridden toString() would give you a clue.

The second part, I don't think SolrJ holds it it twice(if you are worried
about redundant usage of memory), BUT if you haven't used SolrJ so far and
wanted to know if this is the format in which it pushes to Solr, I'm pretty
sure it doesn't push this format into Solr.

Thanks,
Sam
https://www.linkedin.com/in/skasimalla

On Wed, Jun 26, 2019 at 11:52 AM Vincenzo D'Amore <v.dam...@gmail.com>
wrote:

> Hi all,
>
> I have a very basic question related to the SolrInputDocument behaviour.
>
> Looking at SolrInputDocument source code I found how the method setField
> works:
>
>   public void setField(String name, Object value )
>   {
>     SolrInputField field = new SolrInputField( name );
>     _fields.put( name, field );
>     field.setValue( value );
>   }
>
> The field name is "duplicated" into the SolrInputField.
>
> For example, if I'm storing a field "color" with value "red"  what we have
> is a Map like this:
>
> { "key" : "color", "value" : { "name" : "color", "value" : "red" } }
>
> the name field "color" appears twice. Very likely there is a reason for
> this, could you please point me in the right direction?
>
> For example, I'm worried about at what happens with SolrJ when I'm sending
> a lot of documents, where for each field the fieldName is sent twice.
>
> Thanks,
> Vincenzo
>
>
> --
> Vincenzo D'Amore
>

Reply via email to