null+****@clear*****
null+****@clear*****
2012年 8月 1日 (水) 16:33:55 JST
HAYASHI Kentaro 2012-08-01 16:33:55 +0900 (Wed, 01 Aug 2012) New Revision: 6c59bfcdac75f40d2aa933b6c2e7f43021e53d39 https://github.com/groonga/groonga/commit/6c59bfcdac75f40d2aa933b6c2e7f43021e53d39 Log: doc: change the geo_distance example Tokyo to Sapporo-> New York City to London Modified files: doc/source/example/reference/functions/geo_distance_distance_rectangle.log doc/source/example/reference/functions/geo_distance_location_ellipsoid.log doc/source/example/reference/functions/geo_distance_location_rectangle.log doc/source/example/reference/functions/geo_distance_location_sphere.log doc/source/example/reference/functions/geo_distance_setup_location.log doc/source/reference/functions/geo_distance.txt Modified: doc/source/example/reference/functions/geo_distance_distance_rectangle.log (+2 -2) =================================================================== --- doc/source/example/reference/functions/geo_distance_distance_rectangle.log 2012-07-31 15:00:41 +0900 (2dda047) +++ doc/source/example/reference/functions/geo_distance_distance_rectangle.log 2012-08-01 16:33:55 +0900 (108541f) @@ -1,6 +1,6 @@ Execution example:: - select Geo --output_columns distance --scorer 'distance = geo_distance("128452975x503157902", "155047000x508862800", "rectangle")' + select Geo --output_columns distance --scorer 'distance = geo_distance("146566000x-266422000", "185428000x-461000", "rectangle")' # [ # [ # 0, @@ -19,7 +19,7 @@ Execution example:: # ] # ], # [ - # 830849 + # 5807750 # ] # ] # ] Modified: doc/source/example/reference/functions/geo_distance_location_ellipsoid.log (+2 -2) =================================================================== --- doc/source/example/reference/functions/geo_distance_location_ellipsoid.log 2012-07-31 15:00:41 +0900 (9b3602f) +++ doc/source/example/reference/functions/geo_distance_location_ellipsoid.log 2012-08-01 16:33:55 +0900 (5f5c2c6) @@ -1,6 +1,6 @@ Execution example:: - select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "ellipsoid")' + select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "ellipsoid")' # [ # [ # 0, @@ -19,7 +19,7 @@ Execution example:: # ] # ], # [ - # 15400284 + # 5706263 # ] # ] # ] Modified: doc/source/example/reference/functions/geo_distance_location_rectangle.log (+2 -2) =================================================================== --- doc/source/example/reference/functions/geo_distance_location_rectangle.log 2012-07-31 15:00:41 +0900 (a4b52c1) +++ doc/source/example/reference/functions/geo_distance_location_rectangle.log 2012-08-01 16:33:55 +0900 (3ff622b) @@ -1,6 +1,6 @@ Execution example:: - select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "rectangle")' + select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "rectangle")' # [ # [ # 0, @@ -19,7 +19,7 @@ Execution example:: # ] # ], # [ - # 15351658 + # 5715104 # ] # ] # ] Modified: doc/source/example/reference/functions/geo_distance_location_sphere.log (+2 -2) =================================================================== --- doc/source/example/reference/functions/geo_distance_location_sphere.log 2012-07-31 15:00:41 +0900 (444b3d8) +++ doc/source/example/reference/functions/geo_distance_location_sphere.log 2012-08-01 16:33:55 +0900 (cde9369) @@ -1,6 +1,6 @@ Execution example:: - select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "sphere")' + select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "sphere")' # [ # [ # 0, @@ -19,7 +19,7 @@ Execution example:: # ] # ], # [ - # 13845929 + # 5715102 # ] # ] # ] Modified: doc/source/example/reference/functions/geo_distance_setup_location.log (+4 -4) =================================================================== --- doc/source/example/reference/functions/geo_distance_setup_location.log 2012-07-31 15:00:41 +0900 (57ae865) +++ doc/source/example/reference/functions/geo_distance_setup_location.log 2012-08-01 16:33:55 +0900 (f840775) @@ -1,16 +1,16 @@ Execution example:: - table_create Stations TABLE_HASH_KEY ShortText + table_create Cities TABLE_HASH_KEY ShortText # [[0, 1337566253.89858, 0.000355720520019531], true] - column_create Stations location COLUMN_SCALAR WGS84GeoPoint + column_create Cities location COLUMN_SCALAR WGS84GeoPoint # [[0, 1337566253.89858, 0.000355720520019531], true] - load --table Stations + load --table Cities [ { "_key", "location" }, { - "Tokyo", "128452975x503157902" + "New York City", "146566000x-266422000", }, ] # [[0, 1337566253.89858, 0.000355720520019531], 1] Modified: doc/source/reference/functions/geo_distance.txt (+20 -20) =================================================================== --- doc/source/reference/functions/geo_distance.txt 2012-07-31 15:00:41 +0900 (5415bef) +++ doc/source/reference/functions/geo_distance.txt 2012-08-01 16:33:55 +0900 (1f946ac) @@ -50,58 +50,58 @@ Lets's learn about ``geo_distance`` usage with examples. This section shows simple usages. Here are two schema definition and sample data to show the difference according to the usage. -Those samples show how to calculate the value of distance between Tokyo and Sapporo. +Those samples show how to calculate the value of distance between New York City and London. -#. Using the column value of location for calculating the distance (``Stations`` table) +#. Using the column value of location for calculating the distance (``Cities`` table) #. Using the explicitly specified coordinates for calculating the distance (``Geo`` table) Using the column value of location ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Here are a schema definition of ``Stations`` table and sample data to show usage. +Here are a schema definition of ``Cities`` table and sample data to show usage. :: - table_create Stations TABLE_HASH_KEY ShortText - column_create Stations location COLUMN_SCALAR WGS84GeoPoint - load --table Stations + table_create Cities TABLE_HASH_KEY ShortText + column_create Cities location COLUMN_SCALAR WGS84GeoPoint + load --table Cities [ { "_key", "location" }, { - "Tokyo", "128452975x503157902" + "New York City", "146566000x-266422000", }, ] .. groonga-command .. include:: ../../example/reference/functions/geo_distance_setup_location.log -.. table_create Stations TABLE_HASH_KEY ShortText -.. column_create Stations location COLUMN_SCALAR WGS84GeoPoint -.. load --table Stations +.. table_create Cities TABLE_HASH_KEY ShortText +.. column_create Cities location COLUMN_SCALAR WGS84GeoPoint +.. load --table Cities .. [ .. { .. "_key", "location" .. }, .. { -.. "Tokyo", "128452975x503157902" +.. "New York City", "146566000x-266422000", .. }, .. ] -This execution example creates a table named ``Stations`` which has one column named ``location``. +This execution example creates a table named ``Cities`` which has one column named ``location``. ``location`` column stores the value of coordinate. The coordinate of Tokyo is stored as sample data. .. groonga-command .. include:: ../../example/reference/functions/geo_distance_location_rectangle.log -.. select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "rectangle")' +.. select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "rectangle")' This sample shows that ``geo_distance`` use the value of ``location`` column and the value of coordinate to calculate distance. -The value ("155047000x508862800") passed to ``geo_distance`` as the second argument is -the coordinate of Sapporo. +The value ("185428000x-461000") passed to ``geo_distance`` as the second argument is +the coordinate of London. Using the explicitly specified value of location @@ -137,10 +137,10 @@ This execution example creates a table named ``Geo`` which has one column named .. groonga-command .. include:: ../../example/reference/functions/geo_distance_distance_rectangle.log -.. select Geo --output_columns distance --scorer 'distance = geo_distance("128452975x503157902", "155047000x508862800", "rectangle")' +.. select Geo --output_columns distance --scorer 'distance = geo_distance("146566000x-266422000", "185428000x-461000", "rectangle")' -This sample shows that ``geo_distance`` use the coordinate of Tokyo -and the coordinate of Sapporo to calculate distance. +This sample shows that ``geo_distance`` use the coordinate of London +and the coordinate of New York to calculate distance. Parameters ---------- @@ -252,7 +252,7 @@ Here is a sample about calculating the value of distance with column value. .. groonga-command .. include:: ../../example/reference/functions/geo_distance_location_sphere.log -.. select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "sphere")' +.. select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "sphere")' ``ellipsoid`` ............... @@ -270,7 +270,7 @@ Here is a sample about calculating the value of distance with column value. .. groonga-command .. include:: ../../example/reference/functions/geo_distance_location_ellipsoid.log -.. select Stations --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "155047000x508862800", "ellipsoid")' +.. select Cities --output_columns _score --filter 1 --scorer '_score = geo_distance(location, "185428000x-461000", "ellipsoid")' Return value ------------ -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B... 下载