HAYASHI Kentaro
null+****@clear*****
Tue Apr 28 14:21:53 JST 2015
HAYASHI Kentaro 2015-04-28 14:21:53 +0900 (Tue, 28 Apr 2015) New Revision: 0eab8c3e92e0bfb5fb87f0ade1954887fd05a5a5 https://github.com/groonga/groonga/commit/0eab8c3e92e0bfb5fb87f0ade1954887fd05a5a5 Message: doc: add Geo prefix Modified files: doc/source/tutorial/index.rst Modified: doc/source/tutorial/index.rst (+6 -4) =================================================================== --- doc/source/tutorial/index.rst 2015-04-28 14:19:50 +0900 (a23beff) +++ doc/source/tutorial/index.rst 2015-04-28 14:21:53 +0900 (021f76f) @@ -105,17 +105,19 @@ Groonga is very fast because it use such indexes against the column which contai .. groonga-command .. include:: ../example/tutorial/index-6.log +.. table_create --name GeoSite --flags TABLE_HASH_KEY --key_type ShortText +.. column_create --table GeoSite --name location --type WGS84GeoPoint .. table_create --name GeoIndex --flags TABLE_PAT_KEY --key_type WGS84GeoPoint -.. column_create --table GeoIndex --name index_point --type Site --flags COLUMN_INDEX --source location -.. load --table Site +.. column_create --table GeoIndex --name index_point --type GeoSite --flags COLUMN_INDEX --source location +.. load --table GeoSite .. [ .. {"_key":"http://example.org/","location":"128452975x503157902"}, .. {"_key":"http://example.net/","location":"128487316x502920929"} .. ] -.. select --table Site --filter 'geo_in_circle(location, "128515259x503187188", 5000)' --output_columns _key,location +.. select --table GeoSite --filter 'geo_in_circle(location, "128515259x503187188", 5000)' --output_columns _key,location These indexes are also used when sorting the records with geo location search. .. groonga-command .. include:: ../example/tutorial/index-7.log -.. select --table Site --filter 'geo_in_circle(location, "128515259x503187188", 50000)' --output_columns _key,location,_score --sortby '-geo_distance(location, "128515259x503187188")' --scorer '_score = geo_distance(location, "128515259x503187188")' +.. select --table GeoSite --filter 'geo_in_circle(location, "128515259x503187188", 50000)' --output_columns _key,location,_score --sortby '-geo_distance(location, "128515259x503187188")' --scorer '_score = geo_distance(location, "128515259x503187188")' -------------- next part -------------- HTML����������������������������... Descargar