I noticed this method briefly described in the docs 
<https://github.com/jeremyevans/sequel/blob/master/doc/schema_modification.rdoc#full_text_index-and-spatial_index>.
 
I just tried to use it to index columns :latitude and :longitude (both type 
Float) in a PostgreSQL database and got this error in a migration:

Sequel::DatabaseError: PG::UndefinedObject: ERROR:  data type double 
> precision has no default operator class for access method "gist"
> HINT:  You must specify an operator class for the index or define a 
> default operator class for the data type.
> <migration file>:5:in `block (2 levels) in <top (required)>'
> <path>migrate.rake:26:in `block (2 levels) in <top (required)>'
>
> Caused by:
> PG::UndefinedObject: ERROR:  data type double precision has no default 
> operator class for access method "gist"
> HINT:  You must specify an operator class for the index or define a 
> default operator class for the data type.
>

I have since defined a normal composite index on the two columns (to 
optimize searches with the geocoder gem)  but I am interested in what a 
spatial_index is, what it does and which databases support it.

Many thanks in advance.

Bruce

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to