Yup.  And if you have the original lat/lon then you can forgo the
complexity of reverse-engineering it from postings.
~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley


On Thu, Mar 28, 2019 at 2:49 PM Adrien Grand <jpou...@gmail.com> wrote:

> Hi Trejkaz,
>
> My best guess would be to look at
>
> https://github.com/apache/lucene-solr/blob/7f13105fbe0023771b581c0423df7eaa6a76335e/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointField.java
> and
> https://github.com/apache/lucene-solr/blob/7f13105fbe0023771b581c0423df7eaa6a76335e/lucene/spatial/src/java/org/apache/lucene/spatial/geopoint/document/GeoPointTokenStream.java
> .
>
> It seems like you would need to reverse the logic in
> geoCodedToPrefixCodedBytes to filter terms that have full accuracy and
> then decode the long value into a latitude and a longitude.
>
> On Thu, Mar 28, 2019 at 1:13 AM Trejkaz <trej...@trypticon.org> wrote:
> >
> > On Mon, Mar 11, 2019 at 1:15 PM Trejkaz <trej...@trypticon.org> wrote:
> > >
> > > Hi all.
> > >
> > > I'm attempting to migrate from GeoPointField to LatLonPoint so that we
> > > might have a hope in updating to Lucene 7. The first hurdle I'm
> > > hitting is while writing the migration code.
> > >
> > > I inserted a single document with one geo point in it on Lucene 6.6,
> > > and when I iterate the postings, I see the following binary terms:
> > >
> > >     [37 80 0 0 a]
> > >     [37 ac 80 0 13]
> > >     [37 ac 98 0 1c]
> > >
> > > 1) The existence of three terms is presumably something to do with
> > > multiple precision. Is there a safe way to figure out which value I
> > > want? e.g., is 0x1C always the value that I want?
> > >
> > > 2) When I figure out which value I want, where should I be looking for
> > > the logic to get out the latitude and longitude?
> >
> > After a couple weeks it appears that nobody knows the answer, but does
> > anyone at least know where in the Lucene code I should be looking to
> > find the answer for myself?
> >
> > TX
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> > For additional commands, e-mail: java-user-h...@lucene.apache.org
> >
>
>
> --
> Adrien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

Reply via email to