You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2017/03/08 14:28:38 UTC

[jira] [Comment Edited] (SOLR-10245) Error partial update location type

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

Alexandre Rafalovitch edited comment on SOLR-10245 at 3/8/17 2:27 PM:
----------------------------------------------------------------------

The Dynamic field *\*_coordinates* should be *stored=false*. You have it set to true. If you change it back to false and reindex, the problem should go away.

The question is why is it true for your setup. The Solr examples have it as false, including useDocValuesAsStored="false" as well.

The root cause is that the content of the field is created from the other source, on update, when the document is reconstructed, the coordinates field gets its own stored value and then a second copy of it when the parent location type splits into the coordinates fields internally.


was (Author: arafalov):
The Dynamic field *_coordinates should be *stored=false*. You have it set to true. If you change it back to false and reindex, the problem should go away.

The question is why is it true for your setup. The Solr examples have it as false, including useDocValuesAsStored="false" as well.

The root cause is that the content of the field is created from the other source, on update, when the document is reconstructed, the coordinates field gets its own stored value and then a second copy of it when the parent location type splits into the coordinates fields internally.

> Error partial update location type
> ----------------------------------
>
>                 Key: SOLR-10245
>                 URL: https://issues.apache.org/jira/browse/SOLR-10245
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: update
>    Affects Versions: 6.0
>         Environment: Ubuntu 14.04
>            Reporter: Silvestre Losada
>
> Hi, have an issue with partial updates + solr location type
> In my schema I have the following fields
>  <field name="Location" type="location" indexed="true" stored="true" multiValued="false"/>
> config is
> <dynamicField name="*_coordinates" type="double" indexed="true" stored="true" multiValued="false"/>
> <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinates"/>
> There is anohter field called numItems
> Im trying to do a partial update on numitems
> curl http://10.14.0.30:8080/solr/core/update/json -d '[{"Id":"1100543535","numItems":{"set":"8"}}]'
> After update the fiels _coordinates has two values
> And I get the following error
> 1{"responseHeader":{"status":400,"QTime":3},"error":{"metadata":["error-class","org.apache.solr.common.SolrException","root-error-class","org.apache.solr.common.SolrException"],"msg":"ERROR: [doc=1100543535] multiple values encountered for non multiValued field Location_0_coordinates: [43.7501, 43.7501]","code":400}}
> I'm not updating that field, and if solr make some update internally I expect to make a set not add,



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org