Hi David,

Thanks for your explanation.
I don't see there's a need to to use the gps_0_coordinate and
gps_1_coordinate field for the time being, as the query which I'm using are
querying directly to the gps field.

Regards,
Edwin


On 14 June 2016 at 12:39, David Smiley <david.w.smi...@gmail.com> wrote:

> Zheng,
> There are a few Solr FieldTypes that are basically composite fields -- a
> virtual field of other fields.  AFAIK they are all spatial related.  You
> don't necessarily need to pay attention to the fact that gps_1_coordinate
> exists under the hood unless you wish to customize the options on that
> field type in the schema.  e.g. if you don't need it for filtering (perhaps
> using RPT for that) then you can set indexed=false.
> ~ David
>
> On Fri, Jun 10, 2016 at 8:43 PM Zheng Lin Edwin Yeo <edwinye...@gmail.com>
> wrote:
>
> > Would like to check, what is the use of the gps_0_coordinate and
> > gps_1_coordinate
> > field then? Is it just to store the data points, or does it have any
> other
> > use?
> >
> > When I do the query, I found that we are only querying the gps_field,
> which
> > is something like this:
> > http://localhost:8983/solr/collection1/highlight?q=*:*&fq={!geofilt
> > pt=1.5,100.0
> > <
> http://localhost:8983/solr/collection1/highlight?q=*:*&fq=%7B!geofiltpt=1.5,100.0
> >
> > sfield=gps d=5}
> >
> >
> > Regards,
> > Edwin
> >
> > On 27 May 2016 at 08:48, Erick Erickson <erickerick...@gmail.com> wrote:
> >
> > > Should be fine. When the location field is
> > > re-indexed (as it is with Atomic Updates)
> > > the two fields will be filled back in.
> > >
> > > Best,
> > > Erick
> > >
> > > On Thu, May 26, 2016 at 4:45 PM, Zheng Lin Edwin Yeo
> > > <edwinye...@gmail.com> wrote:
> > > > Thanks Erick for your reply.
> > > >
> > > > It works when I remove the 'stored="true" ' from the gps_0_coordinate
> > and
> > > > gps_1_coordinate.
> > > >
> > > > But will this affect the search functions of the gps coordinates in
> the
> > > > future?
> > > >
> > > > Yes, I am referring to Atomic Updates.
> > > >
> > > > Regards,
> > > > Edwin
> > > >
> > > >
> > > > On 27 May 2016 at 02:02, Erick Erickson <erickerick...@gmail.com>
> > wrote:
> > > >
> > > >> Try removing the 'stored="true" ' from the gps_0_coordinate and
> > > >> gps_1_coordinate.
> > > >>
> > > >> When you say "...tried to do an update on any other fileds" I'm
> > assuming
> > > >> you're
> > > >> talking about Atomic Updates, which require that the destinations of
> > > >> copyFields are single valued. Under the covers the location type is
> > > >> split and copied to the other two fields so I suspect that's what's
> > > going
> > > >> on.
> > > >>
> > > >> And you could also try one of the other types, see:
> > > >> https://cwiki.apache.org/confluence/display/solr/Spatial+Search
> > > >>
> > > >> Best,
> > > >> Erick
> > > >>
> > > >> On Thu, May 26, 2016 at 1:46 AM, Zheng Lin Edwin Yeo
> > > >> <edwinye...@gmail.com> wrote:
> > > >> > Anyone has any solutions to this problem?
> > > >> >
> > > >> > I tried to remove the gps_0_coordinate and gps_1_coordinate, but I
> > > will
> > > >> get
> > > >> > the following error during indexing.
> > > >> > ERROR: [doc=id1] unknown field 'gps_0_coordinate'
> > > >> >
> > > >> > Regards,
> > > >> > Edwin
> > > >> >
> > > >> >
> > > >> > On 25 May 2016 at 11:37, Zheng Lin Edwin Yeo <
> edwinye...@gmail.com>
> > > >> wrote:
> > > >> >
> > > >> >> Hi,
> > > >> >>
> > > >> >> I have an implementation of storing the coordinates in Solr
> during
> > > >> >> indexing.
> > > >> >> During indexing, I will only store the value in the field name
> > > ="gps".
> > > >> For
> > > >> >> the field name = "gps_0_coordinate" and "gps_1_coordinate", the
> > value
> > > >> will
> > > >> >> be auto filled and indexed from the "gps" field.
> > > >> >>
> > > >> >>    <field name="gps" type="location" indexed="true" stored="true"
> > > >> required="false"/>
> > > >> >>    <field name="gps_0_coordinate" type="double" indexed="true"
> > > >> stored="true" required="false"/>
> > > >> >>    <field name="gps_1_coordinate" type="double" indexed="true"
> > > >> stored="true" required="false"/>
> > > >> >>
> > > >> >> But when I tried to do an update on any other fields in the
> index,
> > > Solr
> > > >> >> will try to add another value in the "gps_0_coordinate" and
> > > >> >> "gps_1_coordinate". However, as these 2 fields are not
> > multi-Valued,
> > > it
> > > >> >> will lead to an error:
> > > >> >> multiple values encountered for non multiValued field
> > > gps_0_coordinate:
> > > >> >> [1.0,1.0]
> > > >> >>
> > > >> >> Does anyone knows how we can solve this issue?
> > > >> >>
> > > >> >> I am using Solr 5.4.0
> > > >> >>
> > > >> >> Regards,
> > > >> >> Edwin
> > > >> >>
> > > >>
> > >
> >
> --
> Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
> LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
> http://www.solrenterprisesearchserver.com
>

Reply via email to