You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Peter Wolanin <pe...@acquia.com> on 2011/07/27 15:01:12 UTC
what data type for geo fields?
Looking at the example schema:
http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_3/solr/example/solr/conf/schema.xml
the solr.PointType field type uses double (is this just an example
field, or used for geo search?), while the solr.LatLonType field uses
tdouble and it's unclear how the geohash is translated into lat/lon
values or if the geohash itself might typically be used as a copyfield
and use just for matching a query on a geohash?
Is there an advantage in terms of speed to using Trie fields for
solr.LatLonType? I would assume so, e.g. for bbox operations.
Thanks,
Peter
--
Peter M. Wolanin, Ph.D. : Momentum Specialist, Acquia. Inc.
peter.wolanin@acquia.com : 978-296-5247
"Get a free, hosted Drupal 7 site: http://www.drupalgardens.com"
Re: what data type for geo fields?
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Jul 28, 2011 at 10:24 AM, Peter Wolanin
<pe...@acquia.com> wrote:
> Thanks for the feedback. I'll have look more at how geohash works.
>
> Looking at the sample schema more closely, I see:
>
> <fieldType name="double" class="solr.TrieDoubleField"
> precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
>
> So in fact "double" is also Trie, but just with precisionStep 0 in the example.
Right, which means it's a "normal" numeric field with one token
indexed per value (i.e. no tradeoff to to speed up range queries by
increasing index size).
-Yonik
http://www.lucidimagination.com
Re: what data type for geo fields?
Posted by Peter Wolanin <pe...@acquia.com>.
Thanks for the feedback. I'll have look more at how geohash works.
Looking at the sample schema more closely, I see:
<fieldType name="double" class="solr.TrieDoubleField"
precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
So in fact "double" is also Trie, but just with precisionStep 0 in the example.
-Peter
On Wed, Jul 27, 2011 at 9:57 AM, Yonik Seeley
<yo...@lucidimagination.com> wrote:
> On Wed, Jul 27, 2011 at 9:01 AM, Peter Wolanin <pe...@acquia.com> wrote:
>> Looking at the example schema:
>>
>> http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_3/solr/example/solr/conf/schema.xml
>>
>> the solr.PointType field type uses double (is this just an example
>> field, or used for geo search?)
>
> While you could possibly use PointType for geo search, it doesn't have
> good support for it (it's more of a general n-dimension point)
> The LatLonType has all the geo support currently.
>
>>, while the solr.LatLonType field uses
>> tdouble and it's unclear how the geohash is translated into lat/lon
>> values or if the geohash itself might typically be used as a copyfield
>> and use just for matching a query on a geohash?
>
> There's no geohash used in LatLonType
> It is indexed as a lat and lon under the covers (using the suffix "_d")
>
>> Is there an advantage in terms of speed to using Trie fields for
>> solr.LatLonType?
>
> Currently only for explicit range queries... like point:[10,10 TO 20,20]
>
>> I would assume so, e.g. for bbox operations.
>
> It's a bit of an implementation detail, but bbox doesn't currently use
> range queries.
>
> -Yonik
> http://www.lucidimagination.com
>
--
Peter M. Wolanin, Ph.D. : Momentum Specialist, Acquia. Inc.
peter.wolanin@acquia.com : 978-296-5247
"Get a free, hosted Drupal 7 site: http://www.drupalgardens.com"
Re: what data type for geo fields?
Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Wed, Jul 27, 2011 at 9:01 AM, Peter Wolanin <pe...@acquia.com> wrote:
> Looking at the example schema:
>
> http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_3/solr/example/solr/conf/schema.xml
>
> the solr.PointType field type uses double (is this just an example
> field, or used for geo search?)
While you could possibly use PointType for geo search, it doesn't have
good support for it (it's more of a general n-dimension point)
The LatLonType has all the geo support currently.
>, while the solr.LatLonType field uses
> tdouble and it's unclear how the geohash is translated into lat/lon
> values or if the geohash itself might typically be used as a copyfield
> and use just for matching a query on a geohash?
There's no geohash used in LatLonType
It is indexed as a lat and lon under the covers (using the suffix "_d")
> Is there an advantage in terms of speed to using Trie fields for
> solr.LatLonType?
Currently only for explicit range queries... like point:[10,10 TO 20,20]
> I would assume so, e.g. for bbox operations.
It's a bit of an implementation detail, but bbox doesn't currently use
range queries.
-Yonik
http://www.lucidimagination.com