lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: solr update dynamic field generates multiValued error
Date Tue, 05 Aug 2014 04:28:16 GMT
Hmmm, I jus tried this with a 4.x build and I can update the document
multiple times without a problem. I just indexed the standard exampledocs
and then updated a doc like this (vidcard.xml was the base):

<add>
<doc>
  <field name="id">EN7800GTX/2DHTV/256M</field>

  <field name="manu_id_s" update="set">eoe changed this puppy</field>
</doc>
  <!-- yes, you can add more than one document at a time -->
</add>

I'm not getting any multiple values in the _coordinate fields. However, I
_do_ get the error if my dynamic *_coordinate field is set to stored="true".

Did you perhaps change this at some point? Whenever I change the schema, I
try to 'rm -rf solr/collection/data' just to be sure I've purged all traces
of the former schema definition.

Best,
Erick


On Mon, Aug 4, 2014 at 7:04 PM, Franco Giacosa <fgiacosa@gmail.com> wrote:

> No, they are not declarad explicitly.
>
> This is how they are created:
>
> <field name="latLong" type="location" indexed="true" stored="true"/>
>
> <dynamicField name="*_coordinate"  type="tdouble" indexed="true"
>  stored="false"/>
>
> <fieldType name="location" class="solr.LatLonType"
> subFieldSuffix="_coordinate"/>
>
>
>
>
> 2014-08-04 22:28 GMT-03:00 Michael Ryan <mryan@moreover.com>:
>
> > Are the latLong_0_coordinate and latLong_1_coordinate fields populated
> > using copyField? If so, this sounds like it could be
> > https://issues.apache.org/jira/browse/SOLR-3502.
> >
> > -Michael
> >
> > -----Original Message-----
> > From: Franco Giacosa [mailto:fgiacosa@gmail.com]
> > Sent: Monday, August 04, 2014 9:05 PM
> > To: solr-user@lucene.apache.org
> > Subject: solr update dynamic field generates multiValued error
> >
> > Hello everyone, this is my first time posting a question, so forgive me
> if
> > i'm missing something.
> >
> > This is my problem:
> >
> > I have a schema.xml that has the following latLong information
> >
> > The dynamicField generates 2 dynamic fields that have the lat and the
> long
> > (latLong_0_coordinate and latLong_1_coordinate)
> >
> > So for example a document will have
> >
> > "latLong_0_coordinate": 40.4114, "latLong_1_coordinate": -74.1031,
> > "latLong": "40.4114,-74.1031",
> >
> > Now when I try to update a document (i don't update the latLong field. I
> > just update other parts of the document using atomic update) solr
> > re-creates the dynamicField and adds the same value again, like its using
> > add instead of set. So when i do an update the fields of the doc look
> like
> > this
> >
> > "latLong_0_coordinate": [40.4114,40.4114] "latLong_1_coordinate":
> > [-74.1031,-74.1031] "latLong": "40.4114,-74.1031",
> >
> > So the dynamicFields now have 2 values, so the next time that I want to
> > update the document a schema error is throw because im trying to store a
> > collection into a none multivalued field.
> >
> >
> > Thanks in advanced.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message