Upayavira, please help

With Regards
Aman Tandon

On Mon, Sep 21, 2015 at 2:38 PM, Aman Tandon <amantandon...@gmail.com>
wrote:

> Error is
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">400</int><int
> name="QTime">28</int></lst><lst name="error"><str name="msg">ERROR:
> [doc=9474144846] multiple values encountered for non multiValued field
> latlon_0_coordinate: [11.0183, 11.0183]</str><int
> name="code">400</int></lst>
> </response>
>
> And my configuration is
>
> <!-- Type used to index the lat and lon components for the "location"
> FieldType -->
>    <dynamicField name="*_coordinate"  type="tdouble" indexed="true"
>  stored="true" />
>
>  <!-- A specialized field for geospatial search. If indexed, this
> fieldType must not be multivalued. -->
>     <fieldType name="location" class="solr.LatLonType"
> subFieldSuffix="_coordinate"/>
>
>   <field name="latlon" type="location" indexed="true" stored="true"
> required="false" multiValued="false" />
>
>  how you know it is because of stored="true"?
>
> As Erick replied in the last mail thread,
> 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".
>
> And stored="true" is mandatory for using the atomic updates.
>
> With Regards
> Aman Tandon
>
> On Mon, Sep 21, 2015 at 2:22 PM, Upayavira <u...@odoko.co.uk> wrote:
>
>> Can you show the error you are getting, and how you know it is because
>> of stored="true"?
>>
>> Upayavira
>>
>> On Mon, Sep 21, 2015, at 09:30 AM, Aman Tandon wrote:
>> > Hi Erick,
>> >
>> > I am getting the same error because my dynamic field *_coordinate is
>> > stored="true".
>> > How can I get rid of this error?
>> >
>> > And I have to use the atomic update. Please help!!
>> >
>> > With Regards
>> > Aman Tandon
>> >
>> > On Tue, Aug 5, 2014 at 10:27 PM, Franco Giacosa <fgiac...@gmail.com>
>> > wrote:
>> >
>> > > Hey Erick, i think that you were right, there was a mix in the
>> schemas and
>> > > that was generating the error on some of the documents.
>> > >
>> > > Thanks for the help guys!
>> > >
>> > >
>> > > 2014-08-05 1:28 GMT-03:00 Erick Erickson <erickerick...@gmail.com>:
>> > >
>> > > > 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 <fgiac...@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 <mr...@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:fgiac...@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.
>> > > > > >
>> > > > >
>> > > >
>> > >
>>
>
>

Reply via email to