lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: What's the difference between LatLonPoint and LatLonDocValuesField?
Date Fri, 10 Jan 2020 08:56:08 GMT
Your understanding is correct. It is common to index geo points by creating
a LatLonPoint, a LatLonDocValuesField and a StoredField. Even though
LatLonDocValuesField is stored in the index, the fact it's column-stored
makes it a good choice for sorting or facets, but a poor choice to retrieve
information about a hit, which is why doc.getFields() doesn't return it.

On Fri, Jan 10, 2020 at 9:06 AM 小鱼儿 <> wrote:

> In my understanding from reading the oniline documentation, LatLonPoint is
> used for BKD indexing, and LatLonDocValuesField is used for Sort argument's
> input.
> But does it means if a POI has a GeoPoint type "location" field, then i
> must add the same location value to the 2 fields which makes me confusing:
> because the api exposes internals to api users...
> There seems 2 kind of Fields: one is the normal XxxField which is for
> indexing and is row-stored, the other (XxxDocValuesField) is
> column-stored, LatLonPoint may be taken as indexing field...
> In my opinion, the 2 fields are both stored, so StoredField's naming is
> somewhat misleading, if i add another StoredField with the same field name,
> then later when using List<IndexableField> L = doc.getFields(); to retrieve
> the document fields, i only get the last StoredField
> value,  LatLonDocValuesField is not got.


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