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 hadi <md...@gmail.com> on 2011/10/23 13:32:13 UTC

Update document field with solrj

I want to edit document filed in solr,for example edit the author name,so i
use the following code in solrj:

params.set("literal.author","anaconda")

but the author multivalued="true" in schema and because of that "anaconde"
is not replace with it's previous name and add to the end of the author
name,
also if i omit the multivalued field or set it to false the bad request
exception happen in re-indexing file with new author field,how can i solve
this problem and delete or modify the previous document field in solrj? or
does it any config i miss in schema? thanks


--
View this message in context: http://lucene.472066.n3.nabble.com/Update-document-field-with-solrj-tp3445488p3445488.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Update document field with solrj

Posted by Erick Erickson <er...@gmail.com>.
You cannot update a single field in a document in Solr, you need to
replace the entire document. multiValued is irrelevant to this problem..

Or did I misunderstand your problem?

Best
Erick

On Sun, Oct 23, 2011 at 1:32 PM, hadi <md...@gmail.com> wrote:
> I want to edit document filed in solr,for example edit the author name,so i
> use the following code in solrj:
>
> params.set("literal.author","anaconda")
>
> but the author multivalued="true" in schema and because of that "anaconde"
> is not replace with it's previous name and add to the end of the author
> name,
> also if i omit the multivalued field or set it to false the bad request
> exception happen in re-indexing file with new author field,how can i solve
> this problem and delete or modify the previous document field in solrj? or
> does it any config i miss in schema? thanks
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Update-document-field-with-solrj-tp3445488p3445488.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>