rroonga 1.3.0-x86-mingw32 → 1.3.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. data/Rakefile +33 -2
  2. data/benchmark/common.rb +2 -2
  3. data/benchmark/read-write-many-small-items.rb +71 -62
  4. data/benchmark/write-many-small-items.rb +61 -53
  5. data/ext/groonga/rb-grn-context.c +23 -5
  6. data/ext/groonga/rb-grn-index-column.c +2 -6
  7. data/ext/groonga/rb-grn-operator.c +31 -1
  8. data/ext/groonga/rb-grn-variable-size-column.c +77 -1
  9. data/ext/groonga/rb-grn.h +2 -11
  10. data/ext/groonga/rb-groonga.c +1 -2
  11. data/lib/1.8/groonga.so +0 -0
  12. data/lib/1.9/groonga.so +0 -0
  13. data/lib/groonga/command.rb +169 -0
  14. data/lib/groonga/context.rb +4 -124
  15. data/lib/groonga/dumper.rb +10 -8
  16. data/lib/groonga/record.rb +7 -0
  17. data/lib/groonga/schema.rb +98 -7
  18. data/rroonga-build.rb +3 -3
  19. data/test/{test-context-select.rb → test-command-select.rb} +3 -3
  20. data/test/test-record.rb +18 -1
  21. data/test/test-schema-dumper.rb +48 -0
  22. data/test/test-schema-type.rb +35 -0
  23. data/test/test-schema.rb +81 -11
  24. data/test/test-table-select.rb +49 -38
  25. data/test/test-variable-size-column.rb +30 -0
  26. data/vendor/local/bin/grntest.exe +0 -0
  27. data/vendor/local/bin/groonga.exe +0 -0
  28. data/vendor/local/bin/libgroonga-0.dll +0 -0
  29. data/vendor/local/bin/libmecab-1.dll +0 -0
  30. data/vendor/local/bin/mecab.exe +0 -0
  31. data/vendor/local/include/groonga/groonga/plugin.h +3 -2
  32. data/vendor/local/include/groonga/groonga.h +106 -78
  33. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  34. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  35. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  36. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  37. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  38. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  39. data/vendor/local/lib/libgroonga.a +0 -0
  40. data/vendor/local/lib/libgroonga.dll.a +0 -0
  41. data/vendor/local/lib/libmecab.a +0 -0
  42. data/vendor/local/lib/libmecab.dll.a +0 -0
  43. data/vendor/local/lib/pkgconfig/groonga.pc +5 -2
  44. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  45. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  46. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  47. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  48. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  49. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  50. data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +42 -32
  51. data/vendor/local/share/doc/groonga/en/html/_sources/commands/delete.txt +5 -1
  52. data/vendor/local/share/doc/groonga/en/html/_sources/commands/table_create.txt +5 -2
  53. data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +4 -3
  54. data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +8 -6
  55. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt +42 -3
  56. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_in_circle.txt +26 -1
  57. data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +2 -2
  58. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +102 -27
  59. data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +10 -10
  60. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +130 -21
  61. data/vendor/local/share/doc/groonga/en/html/_sources/output.txt +164 -0
  62. data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
  63. data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +0 -5
  64. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -4
  65. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +1 -3
  66. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +2 -1
  67. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +95 -116
  68. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +1 -4
  69. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +1 -4
  70. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -0
  71. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -2
  72. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -0
  73. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +3 -0
  74. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial.txt +2 -2
  75. data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +3 -3
  76. data/vendor/local/share/doc/groonga/en/html/_static/basic.css +13 -1
  77. data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +5 -5
  78. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +11 -7
  79. data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
  80. data/vendor/local/share/doc/groonga/en/html/characteristic.html +60 -52
  81. data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
  82. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
  83. data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
  84. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
  85. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
  86. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
  87. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
  88. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
  89. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
  90. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +38 -35
  91. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
  92. data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
  93. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
  94. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
  95. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
  96. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
  97. data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
  98. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
  99. data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
  100. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +36 -36
  101. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +38 -36
  102. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
  103. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
  104. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
  105. data/vendor/local/share/doc/groonga/en/html/commands.html +41 -41
  106. data/vendor/local/share/doc/groonga/en/html/community.html +14 -12
  107. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
  108. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
  109. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
  110. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
  111. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
  112. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
  113. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
  114. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
  115. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
  116. data/vendor/local/share/doc/groonga/en/html/contribution.html +15 -13
  117. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +7 -7
  118. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +7 -7
  119. data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +7 -7
  120. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +12 -12
  121. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +7 -7
  122. data/vendor/local/share/doc/groonga/en/html/executables.html +7 -7
  123. data/vendor/local/share/doc/groonga/en/html/expr.html +25 -25
  124. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
  125. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +71 -36
  126. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +53 -33
  127. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
  128. data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
  129. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
  130. data/vendor/local/share/doc/groonga/en/html/functions.html +22 -22
  131. data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
  132. data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +7 -7
  133. data/vendor/local/share/doc/groonga/en/html/index.html +92 -87
  134. data/vendor/local/share/doc/groonga/en/html/install.html +109 -40
  135. data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -19
  136. data/vendor/local/share/doc/groonga/en/html/log.html +21 -21
  137. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
  138. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
  139. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
  140. data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
  141. data/vendor/local/share/doc/groonga/en/html/news.html +233 -112
  142. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  143. data/vendor/local/share/doc/groonga/en/html/output.html +302 -0
  144. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +21 -21
  145. data/vendor/local/share/doc/groonga/en/html/reference.html +59 -55
  146. data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
  147. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  148. data/vendor/local/share/doc/groonga/en/html/spec/search.html +11 -11
  149. data/vendor/local/share/doc/groonga/en/html/spec.html +11 -11
  150. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +7 -7
  151. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +7 -7
  152. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +7 -7
  153. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +7 -7
  154. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +7 -7
  155. data/vendor/local/share/doc/groonga/en/html/suggest.html +7 -12
  156. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  157. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +11 -11
  158. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +23 -23
  159. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +10 -10
  160. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +10 -10
  161. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +124 -164
  162. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +10 -10
  163. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +10 -10
  164. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +10 -10
  165. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +14 -14
  166. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +10 -10
  167. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +11 -10
  168. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +10 -10
  169. data/vendor/local/share/doc/groonga/en/html/tutorial.html +26 -26
  170. data/vendor/local/share/doc/groonga/en/html/type.html +31 -31
  171. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  172. data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +42 -32
  173. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/delete.txt +5 -1
  174. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/table_create.txt +5 -2
  175. data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +4 -3
  176. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +8 -6
  177. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt +42 -3
  178. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_in_circle.txt +26 -1
  179. data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +2 -2
  180. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +102 -27
  181. data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +10 -10
  182. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +130 -21
  183. data/vendor/local/share/doc/groonga/ja/html/_sources/output.txt +164 -0
  184. data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
  185. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +0 -5
  186. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -4
  187. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +1 -3
  188. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +2 -1
  189. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +95 -116
  190. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +1 -4
  191. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +1 -4
  192. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -0
  193. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -2
  194. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -0
  195. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +3 -0
  196. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial.txt +2 -2
  197. data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +3 -3
  198. data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +13 -1
  199. data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +5 -5
  200. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +11 -7
  201. data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
  202. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +55 -47
  203. data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
  204. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
  205. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
  206. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
  207. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
  208. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
  209. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
  210. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
  211. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
  212. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +38 -35
  213. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
  214. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
  215. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
  216. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
  217. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
  218. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
  219. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
  220. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
  221. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
  222. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +36 -36
  223. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +38 -36
  224. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
  225. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
  226. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
  227. data/vendor/local/share/doc/groonga/ja/html/commands.html +41 -41
  228. data/vendor/local/share/doc/groonga/ja/html/community.html +10 -8
  229. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
  230. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
  231. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
  232. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
  233. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
  234. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
  235. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
  236. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
  237. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
  238. data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
  239. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +7 -7
  240. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +7 -7
  241. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +7 -7
  242. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +12 -12
  243. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +7 -7
  244. data/vendor/local/share/doc/groonga/ja/html/executables.html +7 -7
  245. data/vendor/local/share/doc/groonga/ja/html/expr.html +25 -25
  246. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
  247. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +71 -36
  248. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +53 -33
  249. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
  250. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
  251. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
  252. data/vendor/local/share/doc/groonga/ja/html/functions.html +22 -22
  253. data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
  254. data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +7 -7
  255. data/vendor/local/share/doc/groonga/ja/html/index.html +84 -79
  256. data/vendor/local/share/doc/groonga/ja/html/install.html +92 -16
  257. data/vendor/local/share/doc/groonga/ja/html/limitations.html +13 -13
  258. data/vendor/local/share/doc/groonga/ja/html/log.html +21 -21
  259. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
  260. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
  261. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
  262. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
  263. data/vendor/local/share/doc/groonga/ja/html/news.html +202 -99
  264. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  265. data/vendor/local/share/doc/groonga/ja/html/output.html +287 -0
  266. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +21 -21
  267. data/vendor/local/share/doc/groonga/ja/html/reference.html +59 -55
  268. data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
  269. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  270. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
  271. data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
  272. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +7 -7
  273. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +7 -7
  274. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +7 -7
  275. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +7 -7
  276. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +7 -7
  277. data/vendor/local/share/doc/groonga/ja/html/suggest.html +7 -11
  278. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  279. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
  280. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +20 -20
  281. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
  282. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
  283. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +93 -115
  284. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
  285. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
  286. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
  287. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +8 -8
  288. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
  289. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -7
  290. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
  291. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -21
  292. data/vendor/local/share/doc/groonga/ja/html/type.html +31 -31
  293. data/vendor/local/share/doc/groonga/source/characteristic.txt +42 -32
  294. data/vendor/local/share/doc/groonga/source/commands/delete.txt +5 -1
  295. data/vendor/local/share/doc/groonga/source/commands/table_create.txt +5 -2
  296. data/vendor/local/share/doc/groonga/source/community.txt +4 -3
  297. data/vendor/local/share/doc/groonga/source/contribution.txt +8 -6
  298. data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +8 -8
  299. data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +4 -4
  300. data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +4 -4
  301. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +3 -15
  302. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +2 -7
  303. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -7
  304. data/vendor/local/share/doc/groonga/source/functions/geo_distance.txt +42 -3
  305. data/vendor/local/share/doc/groonga/source/functions/geo_in_circle.txt +26 -1
  306. data/vendor/local/share/doc/groonga/source/index.txt +2 -2
  307. data/vendor/local/share/doc/groonga/source/install.txt +102 -27
  308. data/vendor/local/share/doc/groonga/source/limitations.txt +10 -10
  309. data/vendor/local/share/doc/groonga/source/news.txt +130 -21
  310. data/vendor/local/share/doc/groonga/source/output.txt +164 -0
  311. data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
  312. data/vendor/local/share/doc/groonga/source/suggest.txt +0 -5
  313. data/vendor/local/share/doc/groonga/source/tutorial/data.txt +6 -4
  314. data/vendor/local/share/doc/groonga/source/tutorial/drilldown.txt +1 -3
  315. data/vendor/local/share/doc/groonga/source/tutorial/index.txt +2 -1
  316. data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +95 -116
  317. data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +1 -4
  318. data/vendor/local/share/doc/groonga/source/tutorial/micro_blog.txt +1 -4
  319. data/vendor/local/share/doc/groonga/source/tutorial/network.txt +3 -0
  320. data/vendor/local/share/doc/groonga/source/tutorial/patricia_trie.txt +1 -2
  321. data/vendor/local/share/doc/groonga/source/tutorial/query_expansion.txt +5 -0
  322. data/vendor/local/share/doc/groonga/source/tutorial/search.txt +3 -0
  323. data/vendor/local/share/doc/groonga/source/tutorial.txt +2 -2
  324. data/vendor/local/share/doc/groonga/source/type.txt +3 -3
  325. data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +1 -0
  326. data/vendor/local/share/groonga/html/admin/index.html +40 -0
  327. data/vendor/local/share/groonga/html/admin/js/jquery.flot-0.7.min.js +6 -0
  328. data/vendor/local/share/groonga/html/admin/js/jquery.flot.license.txt +22 -0
  329. data/vendor/local/share/man/ja/man1/groonga.1 +560 -138
  330. data/vendor/local/share/man/man1/groonga.1 +637 -223
  331. metadata +887 -898
  332. data/ext/groonga/Makefile +0 -184
  333. data/ext/groonga/rb-grn-query.c +0 -260
  334. data/test/test-query.rb +0 -22
@@ -1,4 +1,4 @@
1
- .TH "GROONGA" "1" "November 27, 2011" "1.2.7" "groonga"
1
+ .TH "GROONGA" "1" "January 29, 2012" "1.2.9" "groonga"
2
2
  .SH NAME
3
3
  groonga \- groonga documentation
4
4
  .
@@ -34,48 +34,57 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
34
34
  .IP \(bu 2
35
35
  \fBnews\fP
36
36
  .UNINDENT
37
- .SH THE CHARACTERISTICS OF GROONGA
38
- .SS The successor to the Senna that is an embeddable full text search engine
37
+ .SH CHARACTERISTICS OF GROONGA
38
+ .SS Groonga overview
39
39
  .sp
40
- Groonga is developed as the successor project to Senna. Senna is an embeddable full text search engine and it is used widely. Groonga takes over from Senna\(aqs characteristics that are fast, high precision and high flexibility. We started to develop groonga to improve those Senna\(aq characteristics.
41
- .SS Groonga server supports multi\-protocols such as HTTP
40
+ Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of groonga is that a newly registered document instantly appears in search results. Also, groonga allows updates without read locks. These characteristics result in superior performance on real\-time applications.
42
41
  .sp
43
- Senna is an component for an application that supports full text search. Groonga can be a server that provides search service. The groonga server supports HTTP, memcached binary protocol and gqtp (groonga query transfer protocol). Clients can search by those protocols via TCP/IP connection. It makes easy to use on a rental server that can install a library.
42
+ Groonga is also a column\-oriented database management system (DBMS). Compared with well\-known row\-oriented systems, such as MySQL and PostgreSQL, column\-oriented systems are more suited for aggregate queries. Due to this advantage, groonga can cover weakness of row\-oriented systems.
44
43
  .sp
45
- Groonga also can be used as a C library like Senna.
46
- .SS Fast data update
44
+ The basic functions of groonga are provided in a C library. Also, libraries for using groonga in other languages, such as Ruby, are provided by related projects. In addition, groonga\-based storage engines are provided for MySQL and PostgreSQL. These libraries and storage engines allow any application to use groonga. See \fI\%usage examples\fP.
45
+ .SS Full text search and Instant update
47
46
  .sp
48
- Senna that is predecessor of groonga is a full text search engine without storage. Senna was commonly used with MySQL or PostgreSQL. Tritonn is a custom MyISAM storage engine that uses Senna as full text search engine. Ludia is a extension module for a PostgreSQL to use Senna as full text search engine. But those approaches can\(aqt fully utilize the performance characteristics of Senna. Senna can update index without read lock.
47
+ In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query. In contrast, some full text search engines do not support instant updates, because it is difficult to dynamically update inverted indexes, the underlying data structure.
49
48
  .sp
50
- For example, MyISAM acquires table lock while updating records in many cases. In those cases, data update by MyISAM is a bottleneck however Senna updates an index full text search fast.
49
+ Groonga also uses inverted indexes but supports instant updates. In addition, groonga allows you to search documents even when updating the document collection. Due to these superior characteristics, groonga is very flexible as a full text search engine. Also, groonga always shows good performance because it divides a large task, inverted index merging, into smaller tasks.
50
+ .SS Column store and aggregate query
51
51
  .sp
52
- Groonga implements a storage that doesn\(aqt acquires read lock to realize search service that has immediacy.
53
- .SS Storage that can be shared with multi\-processes and multi\-threads
52
+ People can collect more than enough data in the Internet era. However, it is difficult to extract informative knowledge from a large database, and such a task requires a many\-sided analysis through trial and error. For example, search refinement by date, time and location may reveal hidden patterns. Aggregate queries are useful to perform this kind of tasks.
54
53
  .sp
55
- Groonga\(aqs storage file can be shared with multi\-processes and multi\-threads. It doesn\(aqt require explicit lock.
54
+ An aggregate query groups search results by specified column values and then counts the number of records in each group. For example, an aggregate query in which a location column is specified counts the number of records per location. Making a graph from the result of an aggregate query against a date column is an easy way to visualize changes over time. Also, a combination of refinement by location and an aggregate query against a date column allows visualization of changes over time in specific location. Thus refinement and aggregation are important to perform data mining.
56
55
  .sp
57
- \fI\%Mroonga\fP that is the successor to the Tritonn is implemented as a MySQL pruggable storage engine. Groonga\(aqs storage files that are opened by mroonga can also be shared with groonga server. For example, you can update your data via SQL and search your data via HTTP.
58
- .SS Fast aggregate query processing such as drilldown
56
+ A column\-oriented architecture allows groonga to efficiently process aggregate queries because a column\-oriented database, which stores records by column, allows an aggregate query to access only a specified column. On the other hand, an aggregate query on a row\-oriented database, which stores records by row, has to access neighbor columns, even though those columns are not required.
57
+ .SS Inverted index and tokenizer
59
58
  .sp
60
- Groonga\(aqs storage uses column oriented database model that stores data for each column. Column oriented database is suitable for fast aggregate query processing such as OLAP.
59
+ An inverted index is a traditional data structure used for large\-scale full text search. A search engine based on inverted index extracts index terms from a document when it is added. Then in retrieval, a query is divided into index terms to find documents containing those index terms. In this way, index terms play an important role in full text search and thus the way of extracting index terms is a key to a better search engine.
61
60
  .sp
62
- "Drilldown" is a processing that groups full text search result by each specified column values and counts number of records in each group. Groonga does the processing fast because groonga uses column oriented database.
63
- .SS Improved Senna\(aqs inverted index implementation
61
+ A tokenizer is a module to extract index terms. A Japanese full text search engine commonly uses a word\-based tokenizer (hereafter referred to as a word tokenizer) and/or a character\-based n\-gram tokenizer (hereafter referred to as an n\-gram tokenizer). A word tokenizer\-based search engine is superior in time, space and precision, which is the fraction of relevant documents in a search result. On the other hand, an n\-gram tokenizer\-based search engine is superior in recall, which is the fraction of retrieved documents in the perfect search result. The best choice depends on the application in practice.
64
62
  .sp
65
- Groonga\(aqs inverted index is the improved Senna\(aqs inverted index. It is more faster and more versatile.
63
+ Groonga supports both word and n\-gram tokenizers. The simplest built\-in tokenizer uses spaces as word delimiters. Built\-in n\-gram tokenizers (n = 1, 2, 3) are also available by default. In addition, a yet another built\-in word tokenizer is available if MeCab, a part\-of\-speech and morphological analyzer, is embedded. Note that a tokenizer is pluggable and you can develop your own tokenizer, such as a tokenizer based on another part\-of\-speech tagger or a named\-entity recognizer.
64
+ .SS Sharable storage and read lock\-free
66
65
  .sp
67
- Groonga can also process some complex queries fast by utilizing inverted index. Those queries are difficult to process with SQL and RDB. For example, tag search and drilldown can be processed fast by utilizing inverted index.
68
- .SS Geolocation (latitude and longitude) search
66
+ Multi\-core processors are mainstream today and the number of cores per processor is increasing. In order to exploit multiple cores, executing multiple queries in parallel or dividing a query into sub\-queries for parallel processing is becoming more important.
69
67
  .sp
70
- Groonga supports geolocation search. Supported geodetic systems are Japan geodetic system and world geodetic system (WGS 84). Supported geolocation refinement region types are circle and rectangle. Groonga also supports distance between two coordinates.
71
- .SS Auto query cache mechanism
68
+ A database of groonga can be shared with multiple threads/processes. Also, multiple threads/processes can execute read queries in parallel even when another thread/process is executing an update query because groonga uses read lock\-free data structures. This feature is suited to a real\-time application that needs to update a database while executing read queries. In addition, groonga allows you to build flexible systems. For example, a database can receive read queries through the built\-in HTTP server of groonga while accepting update queries through MySQL.
69
+ .SS Geo\-location (latitude and longitude) search
72
70
  .sp
73
- Groonga caches reference queries automatically.
71
+ Location services are getting more convenient because of mobile devices with GPS. For example, if you are going to have lunch or dinner at a nearby restaurant, a local search service for restaurants may be very useful, and for such services, fast geo\-location search is becoming more important.
72
+ .sp
73
+ Groonga provides inverted index\-based fast geo\-location search, which supports a query to find points in a rectangle or circle. Groonga gives high priority to points near the center of an area. Also, groonga supports distance measurement and you can sort points by distance from any point.
74
+ .SS Groonga library
75
+ .sp
76
+ The basic functions of groonga are provided in a C library and any application can use groonga as a full text search engine or a column\-oriented database. Also, libraries for languages other than C/C++, such as Ruby, are provided in related projects. See \fI\%related projects\fP for details.
77
+ .SS Groonga server
78
+ .sp
79
+ Groonga provides a built\-in server command which supports HTTP, the memcached binary protocol and the groonga query transfer protocol (gqtp). Also, a groonga server supports query caching, which significantly reduces response time for repeated read queries. Using this command, groonga is available even on a server that does not allow you to install new libraries.
80
+ .SS Groonga storage engine
81
+ .sp
82
+ Groonga works not only as an independent column\-oriented DBMS but also as storage engines of well\-known DBMSs. For example, \fI\%mroonga\fP is a MySQL pluggable storage engine using groonga. By using mroonga, you can use groonga for column\-oriented storage and full text search. A combination of a built\-in storage engine, MyISAM or InnoDB, and a groonga\-based full text search engine is also available. All the combinations have good and bad points and the best one depends on the application. See \fI\%related projects\fP for details.
74
83
  .SH INSTALL
75
84
  .sp
76
- We will explain of how to install Groonga for each environments.
85
+ This section describes how to install groonga on each environment.
77
86
  .sp
78
- We distribute packages for both 32\-bit and 64\-bit but we recommend that you should use 64\-bit package for server. You should use 32\-bit package just only for test or development. You will get no memory error with 32\-bit package even if you just process medium size data.
87
+ We distribute both 32\-bit and 64\-bit packages but we strongly recommend a 64\-bit package for server. You should use a 32\-bit package just only for tests or development. You will encounter an out of memory error with a 32\-bit package even if you just process medium size data.
79
88
  .SS Debian GNU/Linux squeeze
80
89
  .sp
81
90
  /etc/apt/sources.list.d/groonga.list:
@@ -96,6 +105,16 @@ Install:
96
105
  % sudo aptitude \-V \-D \-y install groonga
97
106
  .ft P
98
107
  .fi
108
+ .sp
109
+ There is a package that provides \fI\%Munin\fP plugins. If you want to monitor groonga status by Munin, please install groonga\-munin\-plugins package.
110
+ .sp
111
+ Install groonga\-munin\-plugins package:
112
+ .sp
113
+ .nf
114
+ .ft C
115
+ % sudo aptitude \-V \-D \-y install groonga\-munin\-plugins
116
+ .ft P
117
+ .fi
99
118
  .SS Debian GNU/Linux wheezy
100
119
  .sp
101
120
  /etc/apt/sources.list.d/groonga.list:
@@ -116,6 +135,14 @@ Install:
116
135
  % sudo aptitude \-V \-D \-y install groonga
117
136
  .ft P
118
137
  .fi
138
+ .sp
139
+ Install groonga\-munin\-plugins package:
140
+ .sp
141
+ .nf
142
+ .ft C
143
+ % sudo aptitude \-V \-D \-y install groonga\-munin\-plugins
144
+ .ft P
145
+ .fi
119
146
  .SS Debian GNU/Linux sid
120
147
  .sp
121
148
  /etc/apt/sources.list.d/groonga.list:
@@ -136,10 +163,18 @@ Install:
136
163
  % sudo aptitude \-V \-D \-y install groonga
137
164
  .ft P
138
165
  .fi
166
+ .sp
167
+ Install groonga\-munin\-plugins package:
168
+ .sp
169
+ .nf
170
+ .ft C
171
+ % sudo aptitude \-V \-D \-y install groonga\-munin\-plugins
172
+ .ft P
173
+ .fi
139
174
  .SS Ubuntu 10.04 LTS Lucid Lynx
140
175
  .IP Note
141
- You should add universe section in the official Ubuntu
142
- repository. The following describes how to add it.
176
+ You\(aqll need to enable the universe repository of Ubuntu to install groonga.
177
+ The following describes how to do it.
143
178
  .RE
144
179
  .sp
145
180
  /etc/apt/sources.list.d/groonga.list:
@@ -156,14 +191,22 @@ Install:
156
191
  .nf
157
192
  .ft C
158
193
  % sudo apt\-key adv \-\-recv\-keys \-\-keyserver keyserver.ubuntu.com 1C837F31
159
- % sudo aptitude update
160
- % sudo aptitude \-V \-D \-y install groonga
194
+ % sudo apt\-get update
195
+ % sudo apt\-get \-y install groonga
196
+ .ft P
197
+ .fi
198
+ .sp
199
+ Install groonga\-munin\-plugins package:
200
+ .sp
201
+ .nf
202
+ .ft C
203
+ % sudo apt\-get \-y install groonga\-munin\-plugins
161
204
  .ft P
162
205
  .fi
163
206
  .SS Ubuntu 11.04 Natty Narwhal
164
207
  .IP Note
165
- You should add universe section in the official Ubuntu
166
- repository. The following describes how to add it.
208
+ You\(aqll need to enable the universe repository of Ubuntu to install groonga.
209
+ The following describes how to do it.
167
210
  .RE
168
211
  .sp
169
212
  /etc/apt/sources.list.d/groonga.list:
@@ -180,14 +223,22 @@ Install:
180
223
  .nf
181
224
  .ft C
182
225
  % sudo apt\-key adv \-\-recv\-keys \-\-keyserver keyserver.ubuntu.com 1C837F31
183
- % sudo aptitude update
184
- % sudo aptitude \-V \-D \-y install groonga
226
+ % sudo apt\-get update
227
+ % sudo apt\-get \-y install groonga
228
+ .ft P
229
+ .fi
230
+ .sp
231
+ Install groonga\-munin\-plugins package:
232
+ .sp
233
+ .nf
234
+ .ft C
235
+ % sudo apt\-get \-y install groonga\-munin\-plugins
185
236
  .ft P
186
237
  .fi
187
238
  .SS Ubuntu 11.10 Oneiric Ocelot
188
239
  .IP Note
189
- You should add universe section in the official Ubuntu
190
- repository. The following describes how to add it.
240
+ You\(aqll need to enable the universe repository of Ubuntu to install groonga.
241
+ The following describes how to do it.
191
242
  .RE
192
243
  .sp
193
244
  /etc/apt/sources.list.d/groonga.list:
@@ -204,8 +255,16 @@ Install:
204
255
  .nf
205
256
  .ft C
206
257
  % sudo apt\-key adv \-\-recv\-keys \-\-keyserver keyserver.ubuntu.com 1C837F31
207
- % sudo aptitude update
208
- % sudo aptitude \-V \-D \-y install groonga
258
+ % sudo apt\-get update
259
+ % sudo apt\-get \-y install groonga
260
+ .ft P
261
+ .fi
262
+ .sp
263
+ Install groonga\-munin\-plugins package:
264
+ .sp
265
+ .nf
266
+ .ft C
267
+ % sudo apt\-get \-y install groonga\-munin\-plugins
209
268
  .ft P
210
269
  .fi
211
270
  .SS CentOS 5
@@ -219,6 +278,44 @@ Install:
219
278
  % sudo yum install \-y groonga
220
279
  .ft P
221
280
  .fi
281
+ .sp
282
+ There is a package that provides \fI\%Munin\fP plugins. If you want to monitor groonga status by Munin, please install groonga\-munin\-plugins package.
283
+ .IP Note
284
+ Groonga\-munin\-plugins package requires munin\-node package that isn\(aqt included in the official CentOS repository. You need to enable \fI\%RPMforge\fP repository or \fI\%EPEL\fP repository to install it by yum.
285
+ .sp
286
+ Enable RPMforge repository on i386 environment:
287
+ .sp
288
+ .nf
289
+ .ft C
290
+ % sudo rpm \-ivh http://pkgs.repoforge.org/rpmforge\-release/rpmforge\-release\-0.5.2\-2.el5.rf.i386.rpm
291
+ .ft P
292
+ .fi
293
+ .sp
294
+ Enable RPMforge repository on x86_64 environment:
295
+ .sp
296
+ .nf
297
+ .ft C
298
+ % sudo rpm \-ivh http://pkgs.repoforge.org/rpmforge\-release/rpmforge\-release\-0.5.2\-2.el5.rf.x86_64.rpm
299
+ .ft P
300
+ .fi
301
+ .sp
302
+ Enable EPEL repository on any environment:
303
+ .sp
304
+ .nf
305
+ .ft C
306
+ % sudo rpm \-ivh http://download.fedoraproject.org/pub/epel/5/i386/epel\-release\-5\-4.noarch.rpm
307
+ .ft P
308
+ .fi
309
+ .RE
310
+ .sp
311
+ Install groonga\-munin\-plugins package:
312
+ .sp
313
+ .nf
314
+ .ft C
315
+ % sudo yum update
316
+ % sudo yum install \-y groonga\-munin\-plugins
317
+ .ft P
318
+ .fi
222
319
  .SS CentOS 6
223
320
  .sp
224
321
  Install:
@@ -230,7 +327,45 @@ Install:
230
327
  % sudo yum install \-y groonga
231
328
  .ft P
232
329
  .fi
233
- .SS Fedora 15
330
+ .sp
331
+ There is a package that provides \fI\%Munin\fP plugins. If you want to monitor groonga status by Munin, please install groonga\-munin\-plugins package.
332
+ .IP Note
333
+ Groonga\-munin\-plugins package requires munin\-node package that isn\(aqt included in the official CentOS repository. You need to enable \fI\%RPMforge\fP repository or \fI\%EPEL\fP repository to install it by yum.
334
+ .sp
335
+ Enable RPMforge repository on i686 environment:
336
+ .sp
337
+ .nf
338
+ .ft C
339
+ % sudo rpm \-ivh http://pkgs.repoforge.org/rpmforge\-release/rpmforge\-release\-0.5.2\-2.el6.rf.i686.rpm
340
+ .ft P
341
+ .fi
342
+ .sp
343
+ Enable RPMforge repository on x86_64 environment:
344
+ .sp
345
+ .nf
346
+ .ft C
347
+ % sudo rpm \-ivh http://pkgs.repoforge.org/rpmforge\-release/rpmforge\-release\-0.5.2\-2.el6.rf.x86_64.rpm
348
+ .ft P
349
+ .fi
350
+ .sp
351
+ Enable EPEL repository on any environment:
352
+ .sp
353
+ .nf
354
+ .ft C
355
+ % sudo rpm \-ivh http://download.fedoraproject.org/pub/epel/6/i386/epel\-release\-6\-5.noarch.rpm
356
+ .ft P
357
+ .fi
358
+ .RE
359
+ .sp
360
+ Install groonga\-munin\-plugins package:
361
+ .sp
362
+ .nf
363
+ .ft C
364
+ % sudo yum update
365
+ % sudo yum install \-y groonga\-munin\-plugins
366
+ .ft P
367
+ .fi
368
+ .SS Fedora 16
234
369
  .sp
235
370
  Install:
236
371
  .sp
@@ -241,6 +376,16 @@ Install:
241
376
  % sudo yum install \-y groonga
242
377
  .ft P
243
378
  .fi
379
+ .sp
380
+ There is a package that provides \fI\%Munin\fP plugins. If you want to monitor groonga status by Munin, please install groonga\-munin\-plugins package.
381
+ .sp
382
+ Install groonga\-munin\-plugins package:
383
+ .sp
384
+ .nf
385
+ .ft C
386
+ % sudo yum install \-y groonga\-munin\-plugins
387
+ .ft P
388
+ .fi
244
389
  .SS Mac OS X (MacPorts)
245
390
  .sp
246
391
  Install:
@@ -261,24 +406,21 @@ Install:
261
406
  .fi
262
407
  .SS Windows (Installer)
263
408
  .sp
264
- You just download installer (.exe file) from
409
+ You just download an installer (.exe file) from
265
410
  \fI\%packages.groonga.org/windows/\fP
266
411
  and execute it.
267
412
  .SS Windows (zip)
268
413
  .sp
269
- You just download zip\-file from
414
+ You just download a zip file from
270
415
  \fI\%packages.groonga.org/windows/\fP
271
416
  and extract it.
272
417
  .SS Others
273
418
  .sp
274
- If you will use indexes of tokenizing of each morpheme for
275
- full\-text search, you should install \fI\%MeCab\fP
276
- before you install groonga.
419
+ If you want to use a morphological analyzer for tokenization in full\-text indexing, please install \fI\%MeCab\fP before installing groonga.
277
420
  .sp
278
- After, you should download tar.gz\-file from
279
- \fI\%packages.groonga.org/source/\fP
280
- for installing groonga. You should extract this file in
281
- place to install, and run commands below\-mentioned.
421
+ Then, download a tar.gz file from \fI\%packages.groonga.org/source/\fP and extract it. After that, please run the following command to install groonga.
422
+ .sp
423
+ Install:
282
424
  .sp
283
425
  .nf
284
426
  .ft C
@@ -286,9 +428,9 @@ place to install, and run commands below\-mentioned.
286
428
  .ft P
287
429
  .fi
288
430
  .sp
289
- The "prefix" option is the paramater for specified place to install.
290
- If you won\(aqt specify the option, "/usr/local" is specified.
291
- Please specify "/usr" for this option if you don\(aqt know environment variables(LD_LIBRARY_PATH and so on) well.
431
+ The "prefix" option specifies the path to install groonga. If you don\(aqt specify the install path, "/usr/local" is used. Please specify "/usr" if you are not familiar with environment variables such as LD_LIBRARY_PATH.
432
+ .sp
433
+ There are some \fI\%Munin\fP plugins in groonga package. You need to pass \fI\-\-with\-munin\-plugins\fP option to install them.
292
434
  .SH COMMUNITY
293
435
  .sp
294
436
  There are some places for sharing groonga information.
@@ -298,20 +440,21 @@ We welcome you to join our community.
298
440
  There are mailing lists for discussion about groonga.
299
441
  .INDENT 0.0
300
442
  .TP
301
- .B For Japanese developers
443
+ .B For English speaker
444
+ \fI\%groonga-talk@lists.sourceforge.net\fP
445
+ .TP
446
+ .B For Japanese speaker
302
447
  \fI\%groonga-dev@lists.sourceforge.jp\fP
303
448
  .UNINDENT
304
- .SH チュートリアル
305
- .SS Fundamental operation
449
+ .SH TUTORIAL
450
+ .SS Basic operations
306
451
  .sp
307
- You can use groonga as a library of programming language C or an executable file.
308
- This tutorial explains how to use groonga as an executable file.
309
- Using its file, you can create and operate databases, start and connect to server, and so on.
310
- .SS Create database
452
+ The groonga package provides a C library (libgroonga) and a command line tool (groonga). This tutorial explains how to use the groonga command, with which you can create/operate databases, start a server, establish a connection with a server, etc.
453
+ .SS Create a database
311
454
  .sp
312
- You can create a new database in the following command.
455
+ You can create a new database with the following command.
313
456
  .sp
314
- Form
457
+ Form:
315
458
  .sp
316
459
  .nf
317
460
  .ft C
@@ -319,22 +462,22 @@ groonga \-n DB_PATH_NAME
319
462
  .ft P
320
463
  .fi
321
464
  .sp
322
- \(aq\-n\(aq option specifies to create a database. DB_PATH_NAME specifies full\-path of new database.
465
+ The \(aq\-n\(aq option specifies to create a new database. DB_PATH_NAME specifies the path of the new database. Note that this command fails if the specified path already exists.
323
466
  .sp
324
- Groonga starts as interactive mode after you create a database with this command, and so groonga accepts commands from standard input. This mode is terminated with Ctrl\-d.
467
+ This command creates a database and then enters into interactive mode in which groonga prompts you to enter commands for operating that database. You can terminate this mode with Ctrl\-d.
325
468
  .sp
326
469
  Execution example:
327
470
  .sp
328
471
  .nf
329
472
  .ft C
330
473
  % groonga \-n /tmp/tutorial.db
331
- > ctrl\-d
474
+ > Ctrl\-d
332
475
  %
333
476
  .ft P
334
477
  .fi
335
- .SS Operate database
478
+ .SS Operate a database
336
479
  .sp
337
- Form
480
+ Form:
338
481
  .sp
339
482
  .nf
340
483
  .ft C
@@ -342,139 +485,109 @@ groonga DB_PATH_NAME [COMMAND]
342
485
  .ft P
343
486
  .fi
344
487
  .sp
345
- DB_PATH_NAME specifies full\-path of existing database.
346
- If COMMAND is specified, result of COMMAND is returned.
488
+ DB_PATH_NAME specifies the path of a target database.
347
489
  .sp
348
- With no COMMAND, this command starts groonga as interactive\-mode.
349
- Groonga of this mode reads a command from standard input evaluates it repeatedly.
350
- This tutorial uses interactive\-mode mainly.
490
+ If COMMAND is specified, groonga executes COMMAND and returns the result. Otherwise, groonga starts in interactive mode that reads commands from the standard input and execute them one by one. This tutorial focuses on the interactive mode.
351
491
  .sp
352
- For example, we will run the \fIstatus\fP command.
353
- This command returns status of groonga\(aqs execution.
492
+ Let\(aqs try to see the status of a groonga process by using a \fB/commands/status\fP command.
354
493
  .sp
355
494
  Execution example:
356
495
  .sp
357
496
  .nf
358
497
  .ft C
359
- > table_create \-\-name Type \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
360
- [[0,1317212791.02322,0.03942904],true]
361
- > column_create \-\-table Type \-\-name number \-\-type Int32
362
- [[0,1317212791.26314,0.124383285],true]
363
- > column_create \-\-table Type \-\-name float \-\-type Float
364
- [[0,1317212791.58803,0.027924039],true]
365
- > column_create \-\-table Type \-\-name string \-\-type ShortText
366
- [[0,1317212791.81654,0.040399047],true]
367
- > column_create \-\-table Type \-\-name time \-\-type Time
368
- [[0,1317212792.05751,0.027354067],true]
369
- > load \-\-table Type
370
- > [{"_key":"sample","number":12345,"float":42.195,"string":"GROONGA","time":1234567890.12}]
371
- [[0,1317212792.28516,0.200775839],1]
372
- > select \-\-table Type
373
- [[0,1317212792.68655,0.000199477],[[[1],[["_id","UInt32"],["_key","ShortText"],["time","Time"],["string","ShortText"],["number","Int32"],["float","Float"]],[1,"sample",1234567890.12,"GROONGA",12345,42.195]]]]
498
+ % groonga \-n /tmp/groonga\-databases/introduction.db
499
+ > status
500
+ [[0,1322616280.40348,0.000158121],{"alloc_count":127,"starttime":1322616279,"uptime":1,"version":"1.2.8\-9\-gbf05b82","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
374
501
  .ft P
375
502
  .fi
376
503
  .sp
377
- The mentioned above, results of executed commands are generally JSON style.
378
- The first element in a array of JSON has information of error\-code, execution time, and so on.
379
- The second element has a result of exectuted command.
380
- .SS Commands
504
+ As shown in the above example, a command basically returns a JSON array. The first element contains an error code, execution time, etc. The second element is the result of an operation.
505
+ .SS Command format
381
506
  .sp
382
- You can operate database with various commands via execution file of groonga or groonga server.
383
- There are forms of commands in the following:
507
+ Commands for operating a database accept arguments as follows:
384
508
  .sp
385
509
  .nf
386
510
  .ft C
387
- Form1: COMMAND ARGUMENT1 ARGUMENT2 ..
511
+ Form_1: COMMAND VALUE_1 VALUE_2 ..
388
512
 
389
- Form2: COMMAND \-\-ARAGUMENT1 VALUE1 \-\-ARGUMENT2 VALUE2 ..
513
+ Form_2: COMMAND \-\-NAME_1 VALUE_1 \-\-NAME_2 VALUE_2 ..
390
514
  .ft P
391
515
  .fi
392
516
  .sp
393
- You can mix these forms in commands running.
517
+ In the first form, arguments must be passed in order. This kind of arguments are called positional arguments because the position of each argument determines its meaning.
518
+ .sp
519
+ In the second form, you can specify a parameter name with its value. So, the order of arguments is not defined. This kind of arguments are known as named parameters or keyword arguments.
394
520
  .sp
395
- In Form2, if you want to specify a value including some spaces or symbols("\(aq()/), you should enclose its value with single\-quote or double\-quote.
521
+ If you want to specify a value which contains white\-spaces or special characters, such as quotes and parentheses, please enclose the value with single\-quotes or double\-quotes.
396
522
  .sp
397
- For detail, you can see paragraph of "command" in \fB/executables/groonga\fP.
398
- .SS Basicaly commands
523
+ For details, see also the paragraph of "command" in \fB/executables/groonga\fP.
524
+ .SS Basic commands
399
525
  .INDENT 0.0
400
526
  .INDENT 3.5
401
527
  .INDENT 0.0
402
528
  .TP
403
529
  .B \fB/commands/status\fP
404
- Show status of groonga process.
530
+ shows status of a groonga process.
405
531
  .TP
406
532
  .B \fB/commands/table_list\fP
407
- Show lists of tables defined in a database.
533
+ shows a list of tables in a database.
408
534
  .TP
409
535
  .B \fB/commands/column_list\fP
410
- Show lists of columns defined in a table.
536
+ shows a list of columns in a table.
411
537
  .TP
412
538
  .B \fB/commands/table_create\fP
413
- Add table to a database.
539
+ adds a table to a database.
414
540
  .TP
415
541
  .B \fB/commands/column_create\fP
416
- Add column to a table.
542
+ adds a column to a table.
417
543
  .TP
418
544
  .B \fB/commands/select\fP
419
- Search and show records included a table.
545
+ searches records from a table and shows the result.
420
546
  .TP
421
547
  .B \fB/commands/load\fP
422
- Insert record to a table.
548
+ inserts records to a table.
423
549
  .UNINDENT
424
550
  .UNINDENT
425
551
  .UNINDENT
426
- .SS Create table
552
+ .SS Create a table
427
553
  .sp
428
- \fB/commands/table_create\fP creates table.
554
+ A \fB/commands/table_create\fP command creates a table.
429
555
  .sp
430
- In using groonga, to creating tables generally needed master key.
431
- Master key should be specified the types and the way to store.
556
+ In most cases, a table of groonga has a primary key which must be specified with its data type and index type.
432
557
  .sp
433
- We\(aqre going to explain the types in tutorial after.
434
- Please imagine it as expressing sort of data.
435
- How to store master key defines speed of search with master key and advisability of begins\-with\-match search. This is also explained in this tutorial later.
558
+ There are various data types such as integers, floating\-point numbers, etc. The index type determines the search performance and the availability of prefix searches. We will explain the details later.
436
559
  .sp
437
- For example, we create \(aqSite\(aq table. This table has master key of ShortText type, and the way to store its key is HASH.
560
+ Let\(aqs create a \(aqSite\(aq table which has a primary key of ShortText. In this example, the index type is HASH.
438
561
  .sp
439
562
  Execution example:
440
563
  .sp
441
564
  .nf
442
565
  .ft C
443
- > column_create \-\-table Site \-\-name link \-\-type Site
444
- [[0,1317212792.88872,0.060705006],true]
445
- > load \-\-table Site
446
- > [{"_key":"http://example.org/","link":"http://example.net/"}]
447
- [[0,1317212793.14984,0.200481934],1]
448
- > select \-\-table Site \-\-output_columns _key,title,link._key,link.title \-\-query title:@this
449
- [[0,1317212793.55084,0.000485897],[[[1],[["_key","ShortText"],["title","ShortText"],["link._key","ShortText"],["link.title","ShortText"]],["http://example.org/","This is test record 1!","http://example.net/","test record 2."]]]]
566
+ > table_create \-\-name Site \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
567
+ [[0,1322616280.60791,0.01234375],true]
450
568
  .ft P
451
569
  .fi
452
- .SS Search
570
+ .SS View a table
453
571
  .sp
454
- \fB/commands/select\fP shows contents of table.
572
+ A \fB/commands/select\fP command shows contents of table.
455
573
  .sp
456
574
  Execution example:
457
575
  .sp
458
576
  .nf
459
577
  .ft C
460
- > column_create \-\-table Site \-\-name links \-\-flags COLUMN_VECTOR \-\-type Site
461
- [[0,1317212793.75262,0.049658904],true]
462
- > load \-\-table Site
463
- > [{"_key":"http://example.org/","links":["http://example.net/","http://example.org/","http://example.com/"]}]
464
- [[0,1317212794.00274,0.200473621],1]
465
- > select \-\-table Site \-\-output_columns _key,title,links._key,links.title \-\-query title:@this
466
- [[0,1317212794.40349,0.000384272],[[[1],[["_key","ShortText"],["title","ShortText"],["links._key","ShortText"],["links.title","ShortText"]],["http://example.org/","This is test record 1!",["http://example.net/","http://example.org/","http://example.com/"],["test record 2.","This is test record 1!","test test record three."]]]]]
578
+ > select \-\-table Site
579
+ [[0,1322616280.82196,0.000451873],[[[0],[["_id","UInt32"],["_key","ShortText"]]]]]
467
580
  .ft P
468
581
  .fi
469
582
  .sp
470
- With name of a table, \(aqselect\(aq command shows 10 contents of its table. [0] shows the number of searched records. ["_id","Uint32"] is column named "_id" and type of this column\(aqs value is UInt32. ["_key","ShortText"] is "_key" column, type of this column\(aqs value is ShortText.
583
+ When only a table is specified, the \(aqselect\(aq command returns the first (at most) 10 records of that table. "[0]" in the result shows the number of records in the \(aqSite\(aq table. The next array is a list of columns. ["_id","Uint32"] is a column of UInt32, named "_id". ["_key","ShortText"] is a column of ShortText, named "_key".
471
584
  .sp
472
- \(aqtable_create\(aq command creates table including two columns, \(aq_id\(aq and \(aq_key\(aq first. \(aq_id\(aq has ID\-number given automatically by groonga. \(aq_key\(aq column is stored master key. You cannot modify this column\(aqs name.
473
- .SS Create columns
585
+ The above two columns, \(aq_id\(aq and \(aq_key\(aq, are the necessary columns. The \(aq_id\(aq column stores IDs those are automatically allocated by groonga. The \(aq_key\(aq column is associated with the primary key. You are not allowed to rename these columns.
586
+ .SS Create a column
474
587
  .sp
475
- \fB/commands/column_create\fP command create columns.
588
+ A \fB/commands/column_create\fP command adds a column to a table.
476
589
  .sp
477
- We add a column named \(aqcomment\(aq that lets us store value whose type is ShortText.
590
+ Let\(aqs add a column of ShortText to store titles. You may give a descriptive name \(aqtitle\(aq to the column.
478
591
  .sp
479
592
  Execution example:
480
593
  .sp
@@ -487,14 +600,14 @@ Execution example:
487
600
  .ft P
488
601
  .fi
489
602
  .sp
490
- COLUMN_SCALAR means this is normal column.
491
- .SS Create terminology table with fulltext\-searching
603
+ The COLUMN_SCALAR flag specifies to add a regular column.
604
+ .SS Create a lexicon table for full text searches
492
605
  .sp
493
- This tutorial explains fulltext searching with entried data in groonga table.
606
+ Let\(aqs go on to how to make a full text search.
494
607
  .sp
495
- We need terminology table in fulltext\-searching.
496
- Terminology table is a table whose master key\(aqs values are words in text.
497
- We create \(aqTerms\(aq table, it has type of master key value is ShortText.
608
+ Groonga uses an inverted index to provide fast full text search. So, the first step is to create a lexicon table which stores an inverted index, also known as postings lists. The primary key of this table is associated with a vocabulary made up of index terms and each record stores postings lists for one index term.
609
+ .sp
610
+ The following shows a command which creates a lexicon table named \(aqTerms\(aq. The data type of its primary key is ShortText.
498
611
  .sp
499
612
  Execution example:
500
613
  .sp
@@ -505,15 +618,14 @@ Execution example:
505
618
  .ft P
506
619
  .fi
507
620
  .sp
508
- Many parameters is specified in this execution example.
509
- You don\(aqt hove to understand all parameters.
510
- There are the simple explaination, but you can skipped.
621
+ The table_create command takes many parameters but you don\(aqt need to understand all of them. Please skip the next paragraph if you are not interested in how it works.
622
+ .sp
623
+ The \(aqTABLE_PAT_KEY\(aq flag specifies to store index terms in a patricia trie. The \(aqKEY_NORMALIZE\(aq flag specifies to normalize index terms. In this example, both flags are validated by using a \(aq|\(aq. The \(aqdefault_tokenizer\(aq parameter specifies a method for tokenizing text. This example specifies \(aqTokenBigram\(aq that is generally called \(aqN\-gram\(aq.
624
+ .SS Create an index column for full text search
511
625
  .sp
512
- In this examples, \(aqTABLE_PAT_KEY|KEY_NORMALIZE\(aq stores master key in patricia\-trie and entries each teminology after nomalized.
513
- The \(aqdefault_tokenizer\(aq parametar specifies the way to tokenize target texts. In this examples, we specifies \(aqTokenBigram\(aq as this parameter, and so we choose \(aqN\-gram\(aq generally called.
514
- .SS Create index\-column with fulltext search
626
+ The second step is to create an index column, which allows you to search records from its associated column. That is to say this step specifies which column needs an index.
515
627
  .sp
516
- We will fulltext search \(aqtitle\(aq column in \(aqSite\(aq table. In this case, we create column whose type index in terminology table.
628
+ Let\(aqs create an index column for the \(aqtitle\(aq column in the \(aqSite\(aq table.
517
629
  .sp
518
630
  Execution example:
519
631
  .sp
@@ -524,11 +636,12 @@ Execution example:
524
636
  .ft P
525
637
  .fi
526
638
  .sp
527
- This command creates index column \(aqblog_title\(aq in \(aqTerm\(aq table. \(aq\-\-type\(aq option specifies target indexed table, and \(aq\-\-source\(aq option does target index column.
528
- In execution example, \(aqCOLUMN_INDEX|WITH_POSITION\(aq for \(aq\-\-flags\(aq option specifies that this column is index column for storing information of terminology existing position. This option should be specified \(aqCOLUMN_INDEX|WITH_POSITION\(aq in generally fulltext searching. This tutorial does not deal with the reason why store information of terminology existing position.
639
+ This command creates an index column \(aqblog_title\(aq in the \(aqTerms\(aq table. The \(aq\-\-type\(aq option specifies a target table and the \(aq\-\-source\(aq option specifies a target column. Then, the \(aqCOLUMN_INDEX\(aq flag specifies to create an index column and the \(aqWITH_POSITION\(aq flag specifies to create a full inverted index, which contains the positions of each index term. This combination \(aqCOLUMN_INDEX|WITH_POSITION\(aq is recommended for the general purpose.
529
640
  .SS Load data
530
641
  .sp
531
- \fB/commands/load\fP is used to load data for groonga database. This command stores json\-formatted data in a table.
642
+ A \fB/commands/load\fP command loads JSON\-formatted records into a table.
643
+ .sp
644
+ The following adds nine records to the \(aqSite\(aq table.
532
645
  .sp
533
646
  Execution example:
534
647
  .sp
@@ -550,7 +663,7 @@ Execution example:
550
663
  .ft P
551
664
  .fi
552
665
  .sp
553
- Let\(aqs make sure that its table has data with \(aqselect\(aq command.
666
+ Let\(aqs make sure that these records are correctly stored.
554
667
  .sp
555
668
  Execution example:
556
669
  .sp
@@ -562,9 +675,9 @@ Execution example:
562
675
  .fi
563
676
  .SS Search data
564
677
  .sp
565
- \(aq_id\(aq and \(aq_key\(aq columns are unique in groonga\(aqs table, so let\(aqs search data in table using these columns.
678
+ Before a full text search, let\(aqs try to search data by \(aq_id\(aq and \(aq_key\(aq. These columns work as unique keys.
566
679
  .sp
567
- You can search data using \(aqselect\(aq command with \(aqquery\(aq parameter.
680
+ You can search records by using a \(aqselect\(aq command with a \(aqquery\(aq parameter.
568
681
  .sp
569
682
  Execution example:
570
683
  .sp
@@ -575,9 +688,9 @@ Execution example:
575
688
  .ft P
576
689
  .fi
577
690
  .sp
578
- \(aq_id:1\(aq specified \(aqquery\(aq parameter means to search records whose \(aq_id\(aq column has \(aq1\(aq.
691
+ \(aq_id:1\(aq specifies to search a record whose ID is 1.
579
692
  .sp
580
- Let\(aqs search records with \(aq_key\(aq column.
693
+ Next, let\(aqs search a record by a primary key.
581
694
  .sp
582
695
  Execution example:
583
696
  .sp
@@ -588,10 +701,10 @@ Execution example:
588
701
  .ft P
589
702
  .fi
590
703
  .sp
591
- \(aq_key:"\fI\%http://example.org/\fP"\(aq specified \(aqquery\(aq parameter means to search records whose \(aq_key\(aq column has \(aq"\fI\%http://example.org/\fP"\(aq.
592
- .SS Fulltext searching
704
+ \(aq_key:"\fI\%http://example.org/\fP"\(aq specifies to search a record whose primary key is "\fI\%http://example.org/\fP".
705
+ .SS Full text search
593
706
  .sp
594
- Using \(aqquery\(aq parameter, you can fulltext search with index.
707
+ It\(aqs time to make a full text search. You can make a full text search query with the same \(aqquery\(aq parameter.
595
708
  .sp
596
709
  Execution example:
597
710
  .sp
@@ -602,15 +715,11 @@ Execution example:
602
715
  .ft P
603
716
  .fi
604
717
  .sp
605
- This command shows result of fulltext searching by string \(aqthis\(aq for \(aqtitle\(aq column.
606
- .sp
607
- "title:@this" specified \(aqquery\(aq parameter means to search records whose \(aqtitle\(aq column including \(aqthis\(aq string.
718
+ This command searches records whose \(aqtitle\(aq column contains a string \(aqthis\(aq. In this case, only one record matches this query. Note that the lower case query \(aqthis\(aq matches a capitalized \(aqThis\(aq in the 1st record because \(aqKEY_NORMALIZE\(aq was specified in lexicon column creation.
608
719
  .sp
609
- \(aqselect\(aq command has parameter \(aqmatch_columns\(aq.
720
+ The \(aqselect\(aq command has an optional parameter \(aqmatch_columns\(aq. This parameter specifies default target columns and it is used when target columns are not specified in a query.[1]_
610
721
  .sp
611
- If this parameter is specified, it means to search in columns specified \(aqmatch_columns\(aq when \(aqquery\(aq parameter doesn\(aqt specify column\-name condition.[1]_
612
- .sp
613
- If you specify \(aqmatch_columns\(aq is \(aqtitle\(aq and \(aqquery\(aq is \(aqthis\(aq, you can take same result as above query.
722
+ A combination of \(aq\-\-match_columns title\(aq and \(aq\-\-query this\(aq brings you the same result that \(aq\-\-query title:@this\(aq does.
614
723
  .sp
615
724
  Execution example:
616
725
  .sp
@@ -620,11 +729,9 @@ Execution example:
620
729
  [[0,1317212717.30596,0.000716439],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
621
730
  .ft P
622
731
  .fi
623
- .SS Specify output column
624
- .sp
625
- \(aqoutput_columns\(aq parameter in \(aqselect\(aq command specifies columns shown in result of search.
732
+ .SS Specify output columns
626
733
  .sp
627
- If you want to specify some columns, you should separate column names by comma(,).
734
+ An \(aqoutput_columns\(aq parameter in a \(aqselect\(aq command specifies columns to be shown in the search result. If you want to specify more than one columns, please separate column names by commas (,).
628
735
  .sp
629
736
  Execution example:
630
737
  .sp
@@ -635,14 +742,12 @@ Execution example:
635
742
  .ft P
636
743
  .fi
637
744
  .sp
638
- "_score" column is added to The groonga\(aqs result. This column has the higher number, the more condition of fulltext seaching matches text.
639
- .SS Ranges to display
640
- .sp
641
- \(aqselect\(aq command can display result in only specified ranges using \(aqoffset\(aq and \(aqlimit\(aq parameter. This parameters is useful when you want to show only a page in much result of searching.
745
+ This command specifies three output columns including the \(aq_score\(aq column, which stores the relevance score of each record.
746
+ .SS Specify output ranges
642
747
  .sp
643
- \(aqoffset\(aq parameter specifies starting point of result. If you want \(aqselect\(aq command to return from first records, this parameter specifies \(aq0\(aq.
748
+ A \(aqselect\(aq command returns a part of its search result if \(aqoffset\(aq and/or \(aqlimit\(aq parameters are specified. These parameters are useful to paginate a search result, a widely\-used interface which shows a search result on a page by page basis.
644
749
  .sp
645
- \(aqlimit\(aq parameter specifies how many records of searching result.
750
+ An \(aqoffset\(aq parameter specifies the starting point and a \(aqlimit\(aq parameter specifies the maximum number of records to be returned. If you need the first record in a search result, the offset parameter must be 0 or omitted.
646
751
  .sp
647
752
  Execution example:
648
753
  .sp
@@ -658,9 +763,9 @@ Execution example:
658
763
  .fi
659
764
  .SS Sort
660
765
  .sp
661
- If you use \(aqsortby\(aq parameter in \(aqselect\(aq command, this command sorts result of searching.
766
+ A \(aqselect\(aq command sorts its result when used with a \(aqsortby\(aq parameter.
662
767
  .sp
663
- When \(aqsortby\(aq parameter specifies column name, result is sorted in ascending\-order to its column\(aqs value. This \(aqselect\(aq command also sort in descending\-order when you add hyphen(\-) before column name.
768
+ A \(aqsortby\(aq parameter specifies a column as a sorting creteria. A search result is arranged in ascending order of the column values. If you want to sort a search result in reverse order, please add a leading hyphen (\-) to the column name of a parameter.
664
769
  .sp
665
770
  Execution example:
666
771
  .sp
@@ -671,7 +776,7 @@ Execution example:
671
776
  .ft P
672
777
  .fi
673
778
  .sp
674
- For condition of sort, you can use \(aq_score\(aq column introduced in the paragraph of "Specify output column".
779
+ You can use the \(aq_score\(aq column as a sorting criteria for ranking a search result.
675
780
  .sp
676
781
  Execution example:
677
782
  .sp
@@ -682,7 +787,7 @@ Execution example:
682
787
  .ft P
683
788
  .fi
684
789
  .sp
685
- If you want to specify some column names, you should use comma(,) between these names. In this case, when same value of records is existed in first column, this command sorts result of searching to value of second column.
790
+ If you want to specify more than one columns, please separate column names by commas. In such a case, a search result is sorted in order of the column values in the first column, and then records having the same values in the first column are sorted in order of the second column values.
686
791
  .sp
687
792
  Execution example:
688
793
  .sp
@@ -694,7 +799,7 @@ Execution example:
694
799
  .fi
695
800
  footnote
696
801
  .IP [1] 5
697
- In now groonga\(aqs version, you can only use \(aqmatch_columns\(aq parameter in the case of existing index of fulltext searching. This parameter cannot be use in searching for ordinary columns.
802
+ Currently, a \(aqmatch_columns\(aq parameter is available iff there exists an inverted index for full text search. A \(aqmatch_columns\(aq parameter for a regular column is not supported.
698
803
  .SS How to use groonga with network
699
804
  .sp
700
805
  You can use groonga with network. When you run groonga by using the groonga original protocol or HTTP, groonga accepts connection for network.
@@ -821,20 +926,20 @@ Execution example:
821
926
  .nf
822
927
  .ft C
823
928
  > table_create \-\-name Type \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
824
- [[0,1317212791.02322,0.03942904],true]
929
+ [[0,1322616293.7274,0.012551106],true]
825
930
  > column_create \-\-table Type \-\-name number \-\-type Int32
826
- [[0,1317212791.26314,0.124383285],true]
931
+ [[0,1322616293.94115,0.008619605],true]
827
932
  > column_create \-\-table Type \-\-name float \-\-type Float
828
- [[0,1317212791.58803,0.027924039],true]
933
+ [[0,1322616294.15095,0.004959989],true]
829
934
  > column_create \-\-table Type \-\-name string \-\-type ShortText
830
- [[0,1317212791.81654,0.040399047],true]
935
+ [[0,1322616294.35693,0.005551818],true]
831
936
  > column_create \-\-table Type \-\-name time \-\-type Time
832
- [[0,1317212792.05751,0.027354067],true]
937
+ [[0,1322616294.56333,0.006356953],true]
833
938
  > load \-\-table Type
834
939
  > [{"_key":"sample","number":12345,"float":42.195,"string":"GROONGA","time":1234567890.12}]
835
- [[0,1317212792.28516,0.200775839],1]
940
+ [[0,1322616294.77086,0.202357708],1]
836
941
  > select \-\-table Type
837
- [[0,1317212792.68655,0.000199477],[[[1],[["_id","UInt32"],["_key","ShortText"],["time","Time"],["string","ShortText"],["number","Int32"],["float","Float"]],[1,"sample",1234567890.12,"GROONGA",12345,42.195]]]]
942
+ [[0,1322616295.1744,0.000340057],[[[1],[["_id","UInt32"],["_key","ShortText"],["float","Float"],["number","Int32"],["string","ShortText"],["time","Time"]],[1,"sample",42.195,12345,"GROONGA",1234567890.12]]]]
838
943
  .ft P
839
944
  .fi
840
945
  .SS テーブル型
@@ -852,12 +957,12 @@ Execution example:
852
957
  .nf
853
958
  .ft C
854
959
  > column_create \-\-table Site \-\-name link \-\-type Site
855
- [[0,1317212792.88872,0.060705006],true]
960
+ [[0,1322616295.37864,0.005674045],true]
856
961
  > load \-\-table Site
857
962
  > [{"_key":"http://example.org/","link":"http://example.net/"}]
858
- [[0,1317212793.14984,0.200481934],1]
963
+ [[0,1322616295.5854,0.200879317],1]
859
964
  > select \-\-table Site \-\-output_columns _key,title,link._key,link.title \-\-query title:@this
860
- [[0,1317212793.55084,0.000485897],[[[1],[["_key","ShortText"],["title","ShortText"],["link._key","ShortText"],["link.title","ShortText"]],["http://example.org/","This is test record 1!","http://example.net/","test record 2."]]]]
965
+ [[0,1322616295.98732,0.000872177],[[[1],[["_key","ShortText"],["title","ShortText"],["link._key","ShortText"],["link.title","ShortText"]],["http://example.org/","This is test record 1!","http://example.net/","test record 2."]]]]
861
966
  .ft P
862
967
  .fi
863
968
  .sp
@@ -877,12 +982,12 @@ Execution example:
877
982
  .nf
878
983
  .ft C
879
984
  > column_create \-\-table Site \-\-name links \-\-flags COLUMN_VECTOR \-\-type Site
880
- [[0,1317212793.75262,0.049658904],true]
985
+ [[0,1322616296.19238,0.007598942],true]
881
986
  > load \-\-table Site
882
987
  > [{"_key":"http://example.org/","links":["http://example.net/","http://example.org/","http://example.com/"]}]
883
- [[0,1317212794.00274,0.200473621],1]
988
+ [[0,1322616296.40092,0.201036234],1]
884
989
  > select \-\-table Site \-\-output_columns _key,title,links._key,links.title \-\-query title:@this
885
- [[0,1317212794.40349,0.000384272],[[[1],[["_key","ShortText"],["title","ShortText"],["links._key","ShortText"],["links.title","ShortText"]],["http://example.org/","This is test record 1!",["http://example.net/","http://example.org/","http://example.com/"],["test record 2.","This is test record 1!","test test record three."]]]]]
990
+ [[0,1322616296.80305,0.000899975],[[[1],[["_key","ShortText"],["title","ShortText"],["links._key","ShortText"],["links.title","ShortText"]],["http://example.org/","This is test record 1!",["http://example.net/","http://example.org/","http://example.com/"],["test record 2.","This is test record 1!","test test record three."]]]]]
886
991
  .ft P
887
992
  .fi
888
993
  .sp
@@ -1841,6 +1946,8 @@ groongaでは、 \fB/commands/select\fP コマンドにquery_expansionパラメ
1841
1946
  .sp
1842
1947
  クエリ拡張機能を使用するためには、検索対象となる文書を格納するテーブル(ここでは文書テーブルと呼びます)以外に、ユーザの指定した検索文字列を置換するためのテーブル(ここでは置換テーブルと呼びます)を準備します。置換テーブルでは、その主キーが置換前の文字列となり、文字列型(ShortText)のカラムの値が置換後の文字列となります。
1843
1948
  .sp
1949
+ TODO: 文字列型のベクターカラムでも可能であり、その場合は各要素をORでつなげたものに置換されるということを記述する。
1950
+ .sp
1844
1951
  実際に文書テーブルと置換テーブルを作成してみましょう。
1845
1952
  .sp
1846
1953
  Execution example:
@@ -1905,10 +2012,6 @@ Execution example:
1905
2012
  .sp
1906
2013
  どちらのクエリ文字列も、"(シークァーサー OR シークヮーサー)"という文字列に置換されてから検索されるため、表記の揺れを吸収して検索できるようになりました。
1907
2014
  .SH SUGGEST
1908
- .IP Note
1909
- The suggest feature specification isn\(aqt stable. The
1910
- specification may be changed.
1911
- .RE
1912
2015
  .sp
1913
2016
  Groonga has the suggest feature. This section describes how to use it and how it works.
1914
2017
  .SS Introduction
@@ -3463,6 +3566,214 @@ TODO
3463
3566
  \fB/suggest\fP
3464
3567
  .. : doc:\fIgroonga\-suggest\-httpd\fP
3465
3568
  .. : doc:\fIgroonga\-suggest\-learner\fP
3569
+ .SS Output
3570
+ .sp
3571
+ Groonga supports the following output format types:
3572
+ .INDENT 0.0
3573
+ .INDENT 3.5
3574
+ .INDENT 0.0
3575
+ .IP \(bu 2
3576
+ \fI\%JSON\fP
3577
+ .IP \(bu 2
3578
+ \fI\%XML\fP
3579
+ .IP \(bu 2
3580
+ TSV (Tab Separated Values)
3581
+ .IP \(bu 2
3582
+ \fI\%MessagePack\fP
3583
+ .UNINDENT
3584
+ .UNINDENT
3585
+ .UNINDENT
3586
+ .sp
3587
+ JSON is the default output format.
3588
+ .SS Usage
3589
+ .sp
3590
+ Groonga has the following query interfaces:
3591
+ .INDENT 0.0
3592
+ .INDENT 3.5
3593
+ .INDENT 0.0
3594
+ .IP \(bu 2
3595
+ command line
3596
+ .IP \(bu 2
3597
+ HTTP
3598
+ .UNINDENT
3599
+ .UNINDENT
3600
+ .UNINDENT
3601
+ .sp
3602
+ They provides different ways to change output format type.
3603
+ .SS Command line
3604
+ .sp
3605
+ You can use command line query interface by \fBgroonga
3606
+ DB_PATH\fP or \fBgroonga \-c\fP. Those groonga commands shows
3607
+ \fB> \(ga\(ga prompt. In this query interface, you can specify
3608
+ output format type by \(ga\(gaoutput_type\fP option.
3609
+ .sp
3610
+ If you don\(aqt specify \fBoutput_type\fP option, you will get
3611
+ a result in JSON format:
3612
+ .sp
3613
+ .nf
3614
+ .ft C
3615
+ > status
3616
+ [[0,1327721628.10738,0.000131845474243164],{"alloc_count":142,"starttime":1327721626,"uptime":2,"version":"1.2.9\-92\-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
3617
+ .ft P
3618
+ .fi
3619
+ .sp
3620
+ You can specify \fBjson\fP as \fBoutput_type\fP value to get a
3621
+ result in JSON format explicitly:
3622
+ .sp
3623
+ .nf
3624
+ .ft C
3625
+ > status \-\-output_type json
3626
+ [[0,1327721639.08321,7.93933868408203e\-05],{"alloc_count":144,"starttime":1327721626,"uptime":13,"version":"1.2.9\-92\-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
3627
+ .ft P
3628
+ .fi
3629
+ .sp
3630
+ You need to specify \fBxml\fP as \fBoutput_type\fP value to
3631
+ get a result in XML format:
3632
+ .sp
3633
+ .nf
3634
+ .ft C
3635
+ > status \-\-output_type xml
3636
+ <?xml version="1.0" encoding="utf\-8"?>
3637
+ <RESULT CODE="0" UP="1327721649.61095" ELAPSED="0.000126361846923828">
3638
+ <RESULT>
3639
+ <TEXT>alloc_count</TEXT>
3640
+ <INT>146</INT>
3641
+ <TEXT>starttime</TEXT>
3642
+ <INT>1327721626</INT>
3643
+ <TEXT>uptime</TEXT>
3644
+ <INT>23</INT>
3645
+ <TEXT>version</TEXT>
3646
+ <TEXT>1.2.9\-92\-gb87d9f8</TEXT>
3647
+ <TEXT>n_queries</TEXT>
3648
+ <INT>0</INT>
3649
+ <TEXT>cache_hit_rate</TEXT>
3650
+ <FLOAT>0.0</FLOAT>
3651
+ <TEXT>command_version</TEXT>
3652
+ <INT>1</INT>
3653
+ <TEXT>default_command_version</TEXT>
3654
+ <INT>1</INT>
3655
+ <TEXT>max_command_version</TEXT>
3656
+ <INT>2</INT></RESULT>
3657
+ </RESULT>
3658
+ .ft P
3659
+ .fi
3660
+ .sp
3661
+ You need to specify \fBtsv\fP as \fBoutput_type\fP value to
3662
+ get a result in TSV format:
3663
+ .sp
3664
+ .nf
3665
+ .ft C
3666
+ > status \-\-output_type tsv
3667
+ 0 1327721664.82675 0.000113964080810547
3668
+ "alloc_count" 146
3669
+ "starttime" 1327721626
3670
+ "uptime" 38
3671
+ "version" "1.2.9\-92\-gb87d9f8"
3672
+ "n_queries" 0
3673
+ "cache_hit_rate" 0.0
3674
+ "command_version" 1
3675
+ "default_command_version" 1
3676
+ "max_command_version" 2
3677
+ END
3678
+ .ft P
3679
+ .fi
3680
+ .sp
3681
+ You need to specify \fBmsgpack\fP as \fBoutput_type\fP value to
3682
+ get a result in MessagePack format:
3683
+ .sp
3684
+ .nf
3685
+ .ft C
3686
+ > status \-\-output_type msgpack
3687
+ (... omitted because MessagePack is binary data format. ...)
3688
+ .ft P
3689
+ .fi
3690
+ .SS HTTP
3691
+ .sp
3692
+ You can use HTTP query interface by \fBgroonga \-\-protocol
3693
+ http \-s DB_PATH\fP. Groonga HTTP server starts on port 10041
3694
+ by default. In this query interface, you can specify
3695
+ output format type by extension.
3696
+ .sp
3697
+ If you don\(aqt specify extension, you will get a result in
3698
+ JSON format:
3699
+ .sp
3700
+ .nf
3701
+ .ft C
3702
+ % curl http://localhost:10041/d/status
3703
+ [[0,1327809294.54311,0.00082087516784668],{"alloc_count":155,"starttime":1327809282,"uptime":12,"version":"1.2.9\-92\-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
3704
+ .ft P
3705
+ .fi
3706
+ .sp
3707
+ You can specify \fBjson\fP as extension to get a result in
3708
+ JSON format explicitly:
3709
+ .sp
3710
+ .nf
3711
+ .ft C
3712
+ % curl http://localhost:10041/d/status.json
3713
+ [[0,1327809319.01929,9.5367431640625e\-05],{"alloc_count":157,"starttime":1327809282,"uptime":37,"version":"1.2.9\-92\-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
3714
+ .ft P
3715
+ .fi
3716
+ .sp
3717
+ You need to specify \fBxml\fP as extension to get a result in
3718
+ XML format:
3719
+ .sp
3720
+ .nf
3721
+ .ft C
3722
+ % curl http://localhost:10041/d/status.xml
3723
+ <?xml version="1.0" encoding="utf\-8"?>
3724
+ <RESULT CODE="0" UP="1327809339.5782" ELAPSED="9.56058502197266e\-05">
3725
+ <RESULT>
3726
+ <TEXT>alloc_count</TEXT>
3727
+ <INT>159</INT>
3728
+ <TEXT>starttime</TEXT>
3729
+ <INT>1327809282</INT>
3730
+ <TEXT>uptime</TEXT>
3731
+ <INT>57</INT>
3732
+ <TEXT>version</TEXT>
3733
+ <TEXT>1.2.9\-92\-gb87d9f8</TEXT>
3734
+ <TEXT>n_queries</TEXT>
3735
+ <INT>0</INT>
3736
+ <TEXT>cache_hit_rate</TEXT>
3737
+ <FLOAT>0.0</FLOAT>
3738
+ <TEXT>command_version</TEXT>
3739
+ <INT>1</INT>
3740
+ <TEXT>default_command_version</TEXT>
3741
+ <INT>1</INT>
3742
+ <TEXT>max_command_version</TEXT>
3743
+ <INT>2</INT></RESULT>
3744
+ </RESULT>
3745
+ .ft P
3746
+ .fi
3747
+ .sp
3748
+ You need to specify \fBtsv\fP as extension to get a result in
3749
+ TSV format:
3750
+ .sp
3751
+ .nf
3752
+ .ft C
3753
+ % curl http://localhost:10041/d/status.tsv
3754
+ 0 1327809366.84187 8.44001770019531e\-05
3755
+ "alloc_count" 159
3756
+ "starttime" 1327809282
3757
+ "uptime" 84
3758
+ "version" "1.2.9\-92\-gb87d9f8"
3759
+ "n_queries" 0
3760
+ "cache_hit_rate" 0.0
3761
+ "command_version" 1
3762
+ "default_command_version" 1
3763
+ "max_command_version" 2
3764
+ END
3765
+ .ft P
3766
+ .fi
3767
+ .sp
3768
+ You need to specify \fBmsgpack\fP as extension to get a result
3769
+ in MessagePack format:
3770
+ .sp
3771
+ .nf
3772
+ .ft C
3773
+ % curl http://localhost:10041/d/status.msgpack
3774
+ (... omitted because MessagePack is binary data format. ...)
3775
+ .ft P
3776
+ .fi
3466
3777
  .SS コマンド
3467
3778
  .sp
3468
3779
  まず、すべてのコマンドに関係するコマンドバージョンについて説明します。その後、組み込みのコマンドを順に説明します。
@@ -4316,7 +4627,7 @@ delete \- 一件のレコードの削除
4316
4627
  .sp
4317
4628
  .nf
4318
4629
  .ft C
4319
- delete table [key [id]]
4630
+ delete table [key [id [filter]]]
4320
4631
  .ft P
4321
4632
  .fi
4322
4633
  .SS 説明
@@ -4347,6 +4658,13 @@ deleteは、使用しているデータベースのテーブルに1件のレコ
4347
4658
  .UNINDENT
4348
4659
  .UNINDENT
4349
4660
  .sp
4661
+ \fBfilter\fP
4662
+ .INDENT 0.0
4663
+ .INDENT 3.5
4664
+ script形式のgrn_expr文字列によってレコードを指定します。filterパラメータを指定する場合は、id及びkeyパラメータを指定してはいけません。
4665
+ .UNINDENT
4666
+ .UNINDENT
4667
+ .sp
4350
4668
  返値
4351
4669
  \-\-\-
4352
4670
  .SS json形式
@@ -5608,10 +5926,13 @@ table_createコマンドは、使用しているデータベースに対して
5608
5926
  .INDENT 0.0
5609
5927
  .TP
5610
5928
  .B 0, \fBTABLE_HASH_KEY\fP
5611
- 主キー値をハッシュ表で管理するテーブルを作成します。ハッシュ表を使用したテーブルでは、主キー値に完全一致するレコードを高速に検索することができます。
5929
+ 主キー値をハッシュ表で管理するテーブルを作成します。ハッシュ表を使用したテーブルでは、主キー値に完全一致するレコードを非常に高速に検索することができます。
5612
5930
  .TP
5613
5931
  .B 1, \fBTABLE_PAT_KEY\fP
5614
- 主キー値をパトリシア木で管理するテーブルを作成します。パトリシア木を使用したテーブルでは、主キー値に完全一致するレコード、前方一致するレコード、および最長共通接頭辞となるレコードを高速に検索することができます。また、キー値の昇降順でレコードを取り出したり、キー値の範囲での検索を行うことができます。また、flagsの値に64を加えることによって、後方一致検索も可能となります。
5932
+ 主キー値をパトリシア木で管理するテーブルを作成します。パトリシア木を使用したテーブルでは、主キー値に完全一致するレコードを検索することができるとともに、前方一致するレコード、および最長共通接頭辞となるレコードを高速に検索することができます。また、キー値の昇降順でレコードを取り出したり、キー値の範囲での検索を行うことができます。また、flagsの値に64を加えることによって、後方一致検索も可能となります。
5933
+ .TP
5934
+ .B 2, \fBTABLE_DAT_KEY\fP
5935
+ 主キー値をダブル配列で管理するテーブルを作成します。ダブル配列を使用したテーブルでは、主キー値に完全一致するレコードを高速に検索することができるとともに、前方一致するレコード、および最長共通接頭辞となるレコードを検索することができます。また、キー値の昇降順でレコードを取り出したり、キー値の範囲での検索を行うことができます。
5615
5936
  .TP
5616
5937
  .B 3, \fBTABLE_NO_KEY\fP
5617
5938
  主キーを持たないテーブルを作成します。各レコードはIDのみによって特定することができます。
@@ -6062,11 +6383,11 @@ ieee754形式の64bit浮動小数点数。
6062
6383
  .SS テーブルの主キーに指定できない型
6063
6384
  .sp
6064
6385
  Text型とLongText型については、テーブルの主キーに指定することはできません。
6065
- .SS ベクトルとして格納できない型
6386
+ .SS ベクターとして格納できない型
6066
6387
  .sp
6067
- groongaのカラムは、ある型のベクトルを保存することができます。しかし、ShortText, Text, LongTextの3つの型についてはベクトルとして保存することはできません。
6388
+ groongaのカラムは、ある型のベクターを保存することができます。しかし、ShortText, Text, LongTextの3つの型についてはベクターとして保存したり出力したりすることはできますが、検索条件やドリルダウン条件に指定することができません。
6068
6389
  .sp
6069
- テーブル型は、ベクトルとして格納することができます。よって、ShortTextのベクトルを保存したい場合には、主キーがShortText型のテーブルを別途作成し、そのテーブルを型として利用します。
6390
+ テーブル型は、ベクターとして格納することができます。よって、ShortTextのベクターを検索条件やドリルダウン条件に使用したい場合には、主キーがShortText型のテーブルを別途作成し、そのテーブルを型として利用します。
6070
6391
  脚注
6071
6392
  .IP [1] 5
6072
6393
  Object型はv1.2でサポートされます。
@@ -6202,7 +6523,7 @@ geo_distance \- 指定した2点の距離を計算する
6202
6523
  .sp
6203
6524
  .nf
6204
6525
  .ft C
6205
- geo_distance(point1, point2)
6526
+ geo_distance(point1, point2[, approximate_type])
6206
6527
  .ft P
6207
6528
  .fi
6208
6529
  .SS 説明
@@ -6210,7 +6531,14 @@ geo_distance(point1, point2)
6210
6531
  groonga組込関数の一つであるgeo_distanceについて説明します。組込関数は、script形式のgrn_expr中で呼び出すことができます。
6211
6532
  .sp
6212
6533
  geo_distance() 関数は、point1に指定した座標とpoint2に指定した座標の間の距離(近似値)を求めます。
6213
- geo_distance()の他に、距離計算アルゴリズムの異なる、geo_distance2()、geo_distance3()が使用できます。それぞれ、長方形近似、球面近似、ヒュベニの距離計算式によって距離を算出します。
6534
+ .sp
6535
+ ... note:
6536
+ .sp
6537
+ .nf
6538
+ .ft C
6539
+ geo_distance()の他に、距離計算アルゴリズムの異なる、geo_distance2()、geo_distance3()がありましたが、1.2.9から非推奨になりました。 \(ga\(gageo_distance2()\(ga\(ga の代わりに \(ga\(gageo_distance(point1, point2, "sphere")\(ga\(ga を、 \(ga\(gageo_distance3()\(ga\(ga の代わりに \(ga\(gageo_distance(point1, point2, "ellipsoid")\(ga\(ga を使ってください。
6540
+ .ft P
6541
+ .fi
6214
6542
  .SS 引数
6215
6543
  .sp
6216
6544
  \fBpoint1\fP
@@ -6226,6 +6554,42 @@ geo_distance()の他に、距離計算アルゴリズムの異なる、geo_dista
6226
6554
  距離を求める2点のうちもう一つを指定します。GeoPoint型の値、あるいは座標を示す文字列を指定できます。
6227
6555
  .UNINDENT
6228
6556
  .UNINDENT
6557
+ .sp
6558
+ \fBapproximate_type\fP
6559
+ .INDENT 0.0
6560
+ .INDENT 3.5
6561
+ 距離を求めるために地形をどのように近似するかを指定します。指定できる値は以下の通りです。
6562
+ .sp
6563
+ \fB"rectangle"\fP
6564
+ .INDENT 0.0
6565
+ .INDENT 3.5
6566
+ 方形近似で近似します。単純な計算式で距離を求めることができるため高速ですが、極付近では誤差が大きくなります。
6567
+ .sp
6568
+ \fB"rect"\fP と省略して指定することもできます。
6569
+ .sp
6570
+ この近似方法がデフォルト値です。 \fBapproximate_type\fP を省略した場合は方形近似になります。
6571
+ .UNINDENT
6572
+ .UNINDENT
6573
+ .sp
6574
+ \fB"sphere"\fP
6575
+ .INDENT 0.0
6576
+ .INDENT 3.5
6577
+ 球面近似で近似します。 \fB"rectangle"\fP よりも遅くなりますが、誤差は小さいです。
6578
+ .sp
6579
+ \fB"sphr"\fP と省略して指定することもできます。
6580
+ .UNINDENT
6581
+ .UNINDENT
6582
+ .sp
6583
+ \fB"ellipsoid"\fP
6584
+ .INDENT 0.0
6585
+ .INDENT 3.5
6586
+ 楕円体近似で近似します。距離の計算にはヒュベニの距離計算式を用います。 \fB"sphere"\fP よりも遅くなりますが、誤差は小さくなります。
6587
+ .sp
6588
+ \fB"ellip"\fP と省略して指定することもできます。
6589
+ .UNINDENT
6590
+ .UNINDENT
6591
+ .UNINDENT
6592
+ .UNINDENT
6229
6593
  .SS 返値
6230
6594
  .sp
6231
6595
  指定した2点の距離をFloat型の値(単位:メートル)として返します。
@@ -6234,7 +6598,19 @@ geo_distance()の他に、距離計算アルゴリズムの異なる、geo_dista
6234
6598
  .nf
6235
6599
  .ft C
6236
6600
  geo_distance(pos, "150x150")
6237
- 100
6601
+ 100.0
6602
+
6603
+ # 方形近似を利用
6604
+ geo_distance(pos, "150x150", "rectangle")
6605
+ 100.0
6606
+
6607
+ # 球面近似を利用
6608
+ geo_distance(pos, "150x150", "sphere")
6609
+ 100.0
6610
+
6611
+ # 楕円体近似を利用
6612
+ geo_distance(pos, "150x150", "ellipsoid")
6613
+ 100.0
6238
6614
  .ft P
6239
6615
  .fi
6240
6616
  脚注
@@ -6248,7 +6624,7 @@ geo_in_circle \- 座標が円の範囲内に存在するかどうかを調べま
6248
6624
  .sp
6249
6625
  .nf
6250
6626
  .ft C
6251
- geo_in_circle(point, center, radious_or_point)
6627
+ geo_in_circle(point, center, radious_or_point[, approximate_type])
6252
6628
  .ft P
6253
6629
  .fi
6254
6630
  .SS 説明
@@ -6279,6 +6655,42 @@ geo_in_circle() 関数は、pointに指定した座標が、centerに指定し
6279
6655
  Point型の値、あるいは座標を示す文字列を指定した場合は、円周上の点の一つの座標が指定されたものとみなします。
6280
6656
  .UNINDENT
6281
6657
  .UNINDENT
6658
+ .sp
6659
+ \fBapproximate_type\fP
6660
+ .INDENT 0.0
6661
+ .INDENT 3.5
6662
+ 半径からの距離を求めるために地形をどのように近似するかを指定します。指定できる値は以下の通りです。
6663
+ .sp
6664
+ \fB"rectangle"\fP
6665
+ .INDENT 0.0
6666
+ .INDENT 3.5
6667
+ 方形近似で近似します。単純な計算式で距離を求めることができるため高速ですが、極付近では誤差が大きくなります。
6668
+ .sp
6669
+ \fB"rect"\fP と省略して指定することもできます。
6670
+ .sp
6671
+ この近似方法がデフォルト値です。 \fBapproximate_type\fP を省略した場合は方形近似になります。
6672
+ .UNINDENT
6673
+ .UNINDENT
6674
+ .sp
6675
+ \fB"sphere"\fP
6676
+ .INDENT 0.0
6677
+ .INDENT 3.5
6678
+ 球面近似で近似します。 \fB"rectangle"\fP よりも遅くなりますが、誤差は小さいです。
6679
+ .sp
6680
+ \fB"sphr"\fP と省略して指定することもできます。
6681
+ .UNINDENT
6682
+ .UNINDENT
6683
+ .sp
6684
+ \fB"ellipsoid"\fP
6685
+ .INDENT 0.0
6686
+ .INDENT 3.5
6687
+ 楕円体近似で近似します。距離の計算にはヒュベニの距離計算式を用います。 \fB"sphere"\fP よりも遅くなりますが、誤差は小さくなります。
6688
+ .sp
6689
+ \fB"ellip"\fP と省略して指定することもできます。
6690
+ .UNINDENT
6691
+ .UNINDENT
6692
+ .UNINDENT
6693
+ .UNINDENT
6282
6694
  .SS 返値
6283
6695
  .sp
6284
6696
  pointに指定した座標が円の範囲内にあるかどうかをBool型の値で返します。
@@ -6824,22 +7236,22 @@ select Shops \-\-filter \(aq"point > 3 && description @ \e"スープカレー\e"
6824
7236
  .fi
6825
7237
  .sp
6826
7238
  そのため、descriptionに「スープカレーライス」が含まれていても、「スープカレーライス」は「スープカレー」に完全一致しないのでヒットしません。
6827
- .SH 制限事項
7239
+ .SH LIMITATIONS
6828
7240
  .sp
6829
- groongaにはいくつか制限事項があります。
6830
- .SS インデックス上限値
7241
+ Groonga has some limitations.
7242
+ .SS Limitations of indexing
6831
7243
  .sp
6832
- 1つのインデックスにおける論理上の上限値は以下のとおりです。
7244
+ A full\-text index has the following limitations.
6833
7245
  .INDENT 0.0
6834
7246
  .IP \(bu 2
6835
- 最大レコード数: 268,435,455 (約2億6千万)
7247
+ The maximum number of records: 268,435,455 (more than 26 million)
6836
7248
  .IP \(bu 2
6837
- 最大語彙数: 268,435,455 (約2億6千万)
7249
+ The maximum number of distinct terms: 268,435,455 (more than 26 million)
6838
7250
  .IP \(bu 2
6839
- 最大インデックスサイズ: 256GByte
7251
+ The maximum index size: 256GBytes
6840
7252
  .UNINDENT
6841
7253
  .sp
6842
- (実際には他の諸条件の制約により上記の値まで到達しない場合もあります)
7254
+ Keep in mind that these limitations may vary depending on conditions.
6843
7255
  .SH トラブルシューティング
6844
7256
  .SS 同じ検索キーワードなのに全文検索結果が異なる
6845
7257
  .sp
@@ -7030,19 +7442,21 @@ TokenBigramIgnoreBlankSplitSymbolAlphaDigit: 記号・アルファベット・
7030
7442
  この場合も対策方法1同様、検索ノイズが上位に現れる可能性が高くなることに注意してください。検索ノイズが多くなった場合は指定する値を低くする必要があります。
7031
7443
  .SH HOW TO CONTRIBUTE TO GROONGA
7032
7444
  .sp
7033
- We are welcome to you contribute the groonga project. There
7034
- are many ways to contribute such as use, introduction, bug
7035
- report, development and documentation.
7445
+ We welcome your contributions to the groonga project. There are many ways
7446
+ to contribute, such as using groonga, introduction to others, etc.
7447
+ For example, if you find a bug when using groonga, you are welcome to
7448
+ report the bug. Coding and documentation are also welcome for groonga and
7449
+ its related projects.
7036
7450
  .INDENT 0.0
7037
7451
  .TP
7038
7452
  .B Use:
7039
- Please read this document.
7453
+ If you are interested in groonga, please read this document and try it.
7040
7454
  .TP
7041
7455
  .B Introduction:
7042
- Please talk your friends about groonga.
7456
+ Please introduce groonga to your friends and colleagues.
7043
7457
  .TP
7044
7458
  .B Bug report, development and documentation:
7045
- We describe about them in this section.
7459
+ This section describes the details.
7046
7460
  .UNINDENT
7047
7461
  .SS How to report a bug
7048
7462
  .sp
@@ -7672,7 +8086,7 @@ as \(aqja\(aq.
7672
8086
  .SH AUTHOR
7673
8087
  groonga project
7674
8088
  .SH COPYRIGHT
7675
- 2009-2011, Brazil, Inc
8089
+ 2009-2012, Brazil, Inc
7676
8090
  .\" Generated by docutils manpage writer.
7677
8091
  .\"
7678
8092
  .