Hi Gora,
I'm solrj4.1 with spring data solr.
here is my code.

PartialUpdate update = new PartialUpdate("id", "123");
update.setValueOfField("mutiValuedField", null);
solrTemplate.saveBean(update);
solrTemplate.commit();



On Fri, Jan 18, 2013 at 6:44 PM, Gora Mohanty <g...@mimirtech.com> wrote:

> On 18 January 2013 18:34, Muhzin R <muhsinlo...@gmail.com> wrote:
> > Hi all, I'm trying to set the value of a field in my schema to null.The
> > solr throws the following exception .
> > ________________________________________________
> >
> [...]
>
> This is the relevant part of the error:
>
> > INFO  - 2013-01-18 18:13:35.409;
> > org.apache.solr.update.processor.LogUpdateProcessor; [core0] webapp=/solr
> > path=/update params={wt=javabin&version=2} {} 0 3
> > ERROR - 2013-01-18 18:13:35.409; org.apache.solr.common.SolrException;
> > org.apache.solr.common.SolrException: [doc=10] missing required field:
> > countryId
> [...]
>
> > __________________________________________________
> >  Even though I'm trying to modify a field other than countryId. FYI i'm
> > trying to do a partial update.
> > The schema of countryId is as :
> > ============================
> > <field name="countryId" type="int" indexed="true" stored="true" required=
> > "true"/>
> > ============================
> > Why is solr logging a me the wrong exception?
>
> Please show us the code that triggers this exception. Seems
> like you are trying to do an update without providing a value
> for a required field.
>
> If you are using Solr 4.0, here is how to update only a specific
> in a document:
> http://solr.pl/en/2012/07/09/solr-4-0-partial-documents-update/
>
> Regards,
> Gora
>

Reply via email to