You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Darniz <rn...@edmunds.com> on 2012/11/26 19:58:27 UTC

Re: How to post atomic updates using xml

i tried using the same logic to update a specific field and to my surprise
all my other fields were lost. i had a doc with almost 50 fields and i
wanted to update only the gender field i issued the below command

curl http://host:8080/solr/update?commit=true -H 'Content-type:text/xml' -d
'<add><doc><field name="id">63481697</field><field name="authorGender"
update="set">male</field></doc></add>' 

to me it looks like it replace my entire document.

Can you please let me know what went wrong



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-post-atomic-updates-using-xml-tp4007323p4022424.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to post atomic updates using xml

Posted by Erick Erickson <er...@gmail.com>.
So each and every one of your original fields has stored="true", not just
the authorGender field?

The only exception can be the dest fields in copyField directives.

Best
Erick


On Tue, Nov 27, 2012 at 6:58 AM, Darniz <rn...@edmunds.com> wrote:

> yes here is the snippet from schema.xml file
> <field name="authorGender" type="string" indexed="true" stored="true"
> omitNorms="true"/>
>
> and i do use version 4.0 for solr
>
> thx
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-post-atomic-updates-using-xml-tp4007323p4022590.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: How to post atomic updates using xml

Posted by Darniz <rn...@edmunds.com>.
yes here is the snippet from schema.xml file
<field name="authorGender" type="string" indexed="true" stored="true"
omitNorms="true"/>

and i do use version 4.0 for solr

thx



--
View this message in context: http://lucene.472066.n3.nabble.com/How-to-post-atomic-updates-using-xml-tp4007323p4022590.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: How to post atomic updates using xml

Posted by Martin Koch <ma...@issuu.com>.
Are all your fields marked as "stored" in your schema? This is a
requirement for atomic updates.

/Martin Koch


On Mon, Nov 26, 2012 at 7:58 PM, Darniz <rn...@edmunds.com> wrote:

> i tried using the same logic to update a specific field and to my surprise
> all my other fields were lost. i had a doc with almost 50 fields and i
> wanted to update only the gender field i issued the below command
>
> curl http://host:8080/solr/update?commit=true -H 'Content-type:text/xml'
> -d
> '<add><doc><field name="id">63481697</field><field name="authorGender"
> update="set">male</field></doc></add>'
>
> to me it looks like it replace my entire document.
>
> Can you please let me know what went wrong
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/How-to-post-atomic-updates-using-xml-tp4007323p4022424.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>