lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Using SolrJ to update index with array fields
Date Fri, 21 Dec 2012 13:08:58 GMT
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.amigo@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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message