lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Sekiguchi <k...@r.email.ne.jp>
Subject Re: issue in adding data to a multivalued field
Date Fri, 09 Oct 2009 00:32:04 GMT
Hi Rakhi,

Use multiValued (capital V), not multivalued. :)

Koji


Rakhi Khatwani wrote:
> Hi,
>       i have a small schema with some of the fields defined as:
> <field name="id" type="string" indexed="true" stored="true"
> multiValued="false" required="true"/>
>  <field name="content" type="text" indexed="true" stored="true"
> multivalued="false" />
>  <field name="author_name" type="text" indexed="true" stored="false"
> multivalued="true"/>
>
> where the field author_name is multivalued.
> however in UI (schema browser), following r the details of author_name
> field,  its nowhere mentioned tht its multivalued.
> Field: author_name
> Field Type: text
>
> Properties: Indexed, Tokenized
> when i try creating and adding a document into solr, i get an exception
> ERROR_id1_multiple_values_encountered_for_non_multiValued_field_author_name_ninad_raakhi_goureya_sheetal
> here's my code snippet:
>   solrDoc17.addField("id", "id1");
>   solrDoc17.addField("content", "SOLRRRRR");
>   solrDoc17.addField("author_name", "ninad");
>   solrDoc17.addField("author_name", "raakhi");
>   solrDoc17.addField("author_name", "goureya");
>   solrDoc17.addField("author_name", "sheetal");
>   server.add(solrDoc17);
>   server.commit();
> ny pointers??
> regards,
> Raakhi
>
>   


Mime
View raw message