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 Gary Yngve <ga...@gmail.com> on 2013/01/15 03:27:11 UTC

incorrect solr update behavior

Posting this

<?xml version="1.0" encoding="UTF-8"?><add><doc><field name="nickname_s"
update="set">blah</field><field name="tags_ss"
update="add">qux</field><field name="tags_ss"
update="add">quux</field><field name="id">foo</field></doc></add>

to an existing doc with foo and bar tags
results in tags_ss containing
<arr name="tags_ss">
<str>{add=qux}</str>
<str>{add=quux}</str>
</arr>

whereas posting this

<?xml version="1.0" encoding="UTF-8"?><add><doc><field name="nickname_s"
update="set">blah</field><field name="tags_ss"
update="add">qux</field><field name="id">foo</field></doc></add>

results in the expected behavior:
<arr name="tags_ss">
<str>foo</str>
<str>bar</str>
<str>qux</str>
</arr>

Any ideas?

Thanks,
Gary

Re: incorrect solr update behavior

Posted by Gary Yngve <ga...@gmail.com>.
Of course, as soon as I post this, I discover this:

https://issues.apache.org/jira/browse/SOLR-4134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537900#comment-13538174

i'll give this patch a spin in the morning.

(this is not an example of how to use antecedents :))

-g


On Mon, Jan 14, 2013 at 6:27 PM, Gary Yngve <ga...@gmail.com> wrote:

> Posting this
>
> <?xml version="1.0" encoding="UTF-8"?><add><doc><field name="nickname_s"
> update="set">blah</field><field name="tags_ss"
> update="add">qux</field><field name="tags_ss"
> update="add">quux</field><field name="id">foo</field></doc></add>
>
> to an existing doc with foo and bar tags
> results in tags_ss containing
> <arr name="tags_ss">
> <str>{add=qux}</str>
> <str>{add=quux}</str>
> </arr>
>
> whereas posting this
>
> <?xml version="1.0" encoding="UTF-8"?><add><doc><field name="nickname_s"
> update="set">blah</field><field name="tags_ss"
> update="add">qux</field><field name="id">foo</field></doc></add>
>
> results in the expected behavior:
> <arr name="tags_ss">
> <str>foo</str>
> <str>bar</str>
> <str>qux</str>
> </arr>
>
> Any ideas?
>
> Thanks,
> Gary
>