Solr doesn't natively handle array types, you probably have to do something
like

for (long l : arryOfLong) {
doc.set(... l );
}

Although I'm not all that familiar with the update set syntax...

FWIW,
Erick


On Wed, Dec 19, 2012 at 6:26 PM, leonildo <leonildo.am...@gmail.com> wrote:

> Hello,
>
> I´m using solr 1.4
>
> How can I update solr index creating fields that must be updated with
> arrays
> ?
>
> My code is:
>
> long arrayOfLong[] = new long [] {1,2,3} ;
> SolrInputDocument doc = new SolrInputDocument();
> doc.setField(field.getFieldName(), arrayOfLong);
>
> when updating the following error is generated:
>
> Exception in thread "main" org.apache.solr.common.SolrException: Internal
> Server Error
>
> Inside the schema.xml file we have:
>  <field name="catalog_id" type="long" indexed="true" stored="true"
> multiValued="true"/>
>
> Any help is usefull to me.
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Using-SolrJ-to-update-index-with-array-fields-tp4028181.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to