[ 
https://issues.apache.org/jira/browse/SOLR-9838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15730105#comment-15730105
 ] 

Hoss Man commented on SOLR-9838:
--------------------------------

I noticed this while working on SOLR-5944, as part of that issue i'll add an 
{{\@AwaitsFix}} test that points to this jira, but the general gist of the 
problem is that if you do something like this...

{noformat}
clearIndex();
assertU(adoc(sdoc("id", "7", "field_with_default", ImmutableMap.of("inc", 
"666"))));
{noformat}
..the end result is that doc#7 gets a value of 666 in "field_with_default" 
instead of 666 + whatever the default field value is.

> atomic "inc" when adding doc doesn't respect field "default" from schema
> ------------------------------------------------------------------------
>
>                 Key: SOLR-9838
>                 URL: https://issues.apache.org/jira/browse/SOLR-9838
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>
> If you do an "atomic update" when adding a document for the first time, then 
> the "inc" operator acts as if the field has a default of 0.
> But if the {{<field/>}} has an *actual* default in the schema.xml (example: 
> {{default="42"}}) then that default is ignored by the atomic update code path.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to