rroonga 2.0.0-x86-mingw32 → 2.0.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. data/Rakefile +3 -2
  2. data/ext/groonga/rb-grn-expression.c +4 -3
  3. data/ext/groonga/rb-grn-object.c +13 -0
  4. data/ext/groonga/rb-grn-snippet.c +32 -126
  5. data/ext/groonga/rb-grn.h +14 -11
  6. data/lib/1.8/groonga.so +0 -0
  7. data/lib/1.9/groonga.so +0 -0
  8. data/rroonga-build.rb +1 -1
  9. data/vendor/local/bin/{grntest.exe → groonga-benchmark.exe} +0 -0
  10. data/vendor/local/bin/groonga.exe +0 -0
  11. data/vendor/local/bin/libgroonga-0.dll +0 -0
  12. data/vendor/local/bin/libmecab-1.dll +0 -0
  13. data/vendor/local/bin/libmsgpack-3.dll +0 -0
  14. data/vendor/local/bin/libmsgpackc-2.dll +0 -0
  15. data/vendor/local/bin/mecab.exe +0 -0
  16. data/vendor/local/include/groonga/groonga/plugin.h +1 -1
  17. data/vendor/local/include/groonga/groonga.h +10 -3
  18. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  19. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  20. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  21. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  22. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  23. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  24. data/vendor/local/lib/libgroonga.a +0 -0
  25. data/vendor/local/lib/libgroonga.dll.a +0 -0
  26. data/vendor/local/lib/libmecab.a +0 -0
  27. data/vendor/local/lib/libmecab.dll.a +0 -0
  28. data/vendor/local/lib/libmsgpack.a +0 -0
  29. data/vendor/local/lib/libmsgpack.dll.a +0 -0
  30. data/vendor/local/lib/libmsgpackc.a +0 -0
  31. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  32. data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
  33. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  34. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  35. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  36. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  37. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  38. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  39. data/vendor/local/share/doc/groonga/en/html/_sources/commands/suggest.txt +19 -0
  40. data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +2 -2
  41. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +72 -8
  42. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +45 -1
  43. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +112 -33
  44. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +109 -99
  45. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +76 -40
  46. data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +30 -21
  47. data/vendor/local/share/doc/groonga/en/html/_static/favicon.ico +0 -0
  48. data/vendor/local/share/doc/groonga/en/html/_static/groonga.css +309 -101
  49. data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +4 -154
  50. data/vendor/local/share/doc/groonga/en/html/_static/logo.png +0 -0
  51. data/vendor/local/share/doc/groonga/en/html/_static/navigation-bar.png +0 -0
  52. data/vendor/local/share/doc/groonga/en/html/_static/underscore.js +29 -21
  53. data/vendor/local/share/doc/groonga/en/html/characteristic.html +1 -1
  54. data/vendor/local/share/doc/groonga/en/html/command_version.html +1 -1
  55. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +1 -1
  56. data/vendor/local/share/doc/groonga/en/html/commands/check.html +1 -1
  57. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +1 -1
  58. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +1 -1
  59. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +1 -1
  60. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +1 -1
  61. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +1 -1
  62. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +1 -1
  63. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +1 -1
  64. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +1 -1
  65. data/vendor/local/share/doc/groonga/en/html/commands/load.html +1 -1
  66. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +1 -1
  67. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +1 -1
  68. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +1 -1
  69. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +1 -1
  70. data/vendor/local/share/doc/groonga/en/html/commands/select.html +1 -1
  71. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +1 -1
  72. data/vendor/local/share/doc/groonga/en/html/commands/status.html +1 -1
  73. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +21 -1
  74. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +1 -1
  75. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +1 -1
  76. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +1 -1
  77. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +1 -1
  78. data/vendor/local/share/doc/groonga/en/html/commands.html +1 -1
  79. data/vendor/local/share/doc/groonga/en/html/community.html +3 -3
  80. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +1 -1
  81. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +1 -1
  82. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +1 -1
  83. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +1 -1
  84. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +1 -1
  85. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +1 -1
  86. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +1 -1
  87. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +1 -1
  88. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +1 -1
  89. data/vendor/local/share/doc/groonga/en/html/contribution.html +1 -1
  90. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +1 -1
  91. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +1 -1
  92. data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +1 -1
  93. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +1 -1
  94. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +1 -1
  95. data/vendor/local/share/doc/groonga/en/html/executables.html +1 -1
  96. data/vendor/local/share/doc/groonga/en/html/expr.html +1 -1
  97. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +1 -1
  98. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +1 -1
  99. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +1 -1
  100. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +1 -1
  101. data/vendor/local/share/doc/groonga/en/html/functions/now.html +1 -1
  102. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +1 -1
  103. data/vendor/local/share/doc/groonga/en/html/functions.html +1 -1
  104. data/vendor/local/share/doc/groonga/en/html/genindex.html +1 -1
  105. data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +1 -1
  106. data/vendor/local/share/doc/groonga/en/html/index.html +25 -18
  107. data/vendor/local/share/doc/groonga/en/html/indexing.html +1 -1
  108. data/vendor/local/share/doc/groonga/en/html/install.html +59 -9
  109. data/vendor/local/share/doc/groonga/en/html/limitations.html +1 -1
  110. data/vendor/local/share/doc/groonga/en/html/log.html +1 -1
  111. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +1 -1
  112. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +1 -1
  113. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +1 -1
  114. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +1 -1
  115. data/vendor/local/share/doc/groonga/en/html/news/senna.html +1 -1
  116. data/vendor/local/share/doc/groonga/en/html/news.html +66 -15
  117. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  118. data/vendor/local/share/doc/groonga/en/html/output.html +1 -1
  119. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +1 -1
  120. data/vendor/local/share/doc/groonga/en/html/reference.html +1 -1
  121. data/vendor/local/share/doc/groonga/en/html/search.html +1 -1
  122. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  123. data/vendor/local/share/doc/groonga/en/html/spec/search.html +1 -1
  124. data/vendor/local/share/doc/groonga/en/html/spec.html +1 -1
  125. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +1 -1
  126. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +1 -1
  127. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +1 -1
  128. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +1 -1
  129. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +1 -1
  130. data/vendor/local/share/doc/groonga/en/html/suggest.html +1 -1
  131. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +1 -1
  132. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +1 -1
  133. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +141 -53
  134. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +1 -1
  135. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +1 -1
  136. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +112 -106
  137. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +1 -1
  138. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +1 -1
  139. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +2 -2
  140. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +92 -58
  141. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +1 -1
  142. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +1 -1
  143. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
  144. data/vendor/local/share/doc/groonga/en/html/tutorial.html +21 -14
  145. data/vendor/local/share/doc/groonga/en/html/type.html +30 -22
  146. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  147. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/suggest.txt +19 -0
  148. data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +2 -2
  149. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +72 -8
  150. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +45 -1
  151. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +112 -33
  152. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +109 -99
  153. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +76 -40
  154. data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +30 -21
  155. data/vendor/local/share/doc/groonga/ja/html/_static/favicon.ico +0 -0
  156. data/vendor/local/share/doc/groonga/ja/html/_static/groonga.css +309 -101
  157. data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +4 -154
  158. data/vendor/local/share/doc/groonga/ja/html/_static/logo.png +0 -0
  159. data/vendor/local/share/doc/groonga/ja/html/_static/navigation-bar.png +0 -0
  160. data/vendor/local/share/doc/groonga/ja/html/_static/underscore.js +29 -21
  161. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +1 -1
  162. data/vendor/local/share/doc/groonga/ja/html/command_version.html +1 -1
  163. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +1 -1
  164. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +1 -1
  165. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +1 -1
  166. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +1 -1
  167. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +1 -1
  168. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +1 -1
  169. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +1 -1
  170. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +1 -1
  171. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +1 -1
  172. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +1 -1
  173. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +1 -1
  174. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +1 -1
  175. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +1 -1
  176. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +1 -1
  177. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +1 -1
  178. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +1 -1
  179. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +1 -1
  180. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +1 -1
  181. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +19 -1
  182. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +1 -1
  183. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +1 -1
  184. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +1 -1
  185. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +1 -1
  186. data/vendor/local/share/doc/groonga/ja/html/commands.html +1 -1
  187. data/vendor/local/share/doc/groonga/ja/html/community.html +3 -3
  188. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +1 -1
  189. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +1 -1
  190. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +1 -1
  191. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +1 -1
  192. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +1 -1
  193. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +1 -1
  194. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +1 -1
  195. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +1 -1
  196. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +1 -1
  197. data/vendor/local/share/doc/groonga/ja/html/contribution.html +1 -1
  198. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +1 -1
  199. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +1 -1
  200. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +1 -1
  201. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +1 -1
  202. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +1 -1
  203. data/vendor/local/share/doc/groonga/ja/html/executables.html +1 -1
  204. data/vendor/local/share/doc/groonga/ja/html/expr.html +1 -1
  205. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +1 -1
  206. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +1 -1
  207. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +1 -1
  208. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +1 -1
  209. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +1 -1
  210. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +1 -1
  211. data/vendor/local/share/doc/groonga/ja/html/functions.html +1 -1
  212. data/vendor/local/share/doc/groonga/ja/html/genindex.html +1 -1
  213. data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +1 -1
  214. data/vendor/local/share/doc/groonga/ja/html/index.html +25 -18
  215. data/vendor/local/share/doc/groonga/ja/html/indexing.html +1 -1
  216. data/vendor/local/share/doc/groonga/ja/html/install.html +72 -22
  217. data/vendor/local/share/doc/groonga/ja/html/limitations.html +1 -1
  218. data/vendor/local/share/doc/groonga/ja/html/log.html +1 -1
  219. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +1 -1
  220. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +1 -1
  221. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +1 -1
  222. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +1 -1
  223. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +1 -1
  224. data/vendor/local/share/doc/groonga/ja/html/news.html +60 -14
  225. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  226. data/vendor/local/share/doc/groonga/ja/html/output.html +1 -1
  227. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +1 -1
  228. data/vendor/local/share/doc/groonga/ja/html/reference.html +1 -1
  229. data/vendor/local/share/doc/groonga/ja/html/search.html +1 -1
  230. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  231. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +1 -1
  232. data/vendor/local/share/doc/groonga/ja/html/spec.html +1 -1
  233. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +1 -1
  234. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +1 -1
  235. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +1 -1
  236. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +1 -1
  237. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +1 -1
  238. data/vendor/local/share/doc/groonga/ja/html/suggest.html +1 -1
  239. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +1 -1
  240. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +1 -1
  241. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +141 -53
  242. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +1 -1
  243. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +1 -1
  244. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +108 -102
  245. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +1 -1
  246. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +1 -1
  247. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +2 -2
  248. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +92 -55
  249. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +1 -1
  250. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +1 -1
  251. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
  252. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -14
  253. data/vendor/local/share/doc/groonga/ja/html/type.html +30 -22
  254. data/vendor/local/share/doc/groonga/source/commands/suggest.txt +19 -0
  255. data/vendor/local/share/doc/groonga/source/community.txt +2 -2
  256. data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +2 -15
  257. data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +11 -7
  258. data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +13 -7
  259. data/vendor/local/share/doc/groonga/source/example/tutorial/data-4.log +13 -0
  260. data/vendor/local/share/doc/groonga/source/example/tutorial/data-5.log +13 -0
  261. data/vendor/local/share/doc/groonga/source/example/tutorial/data-6.log +13 -0
  262. data/vendor/local/share/doc/groonga/source/example/tutorial/data-7.log +10 -0
  263. data/vendor/local/share/doc/groonga/source/example/tutorial/data-8.log +10 -0
  264. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +0 -2
  265. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-10.log +2 -2
  266. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-11.log +2 -2
  267. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-12.log +2 -2
  268. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-13.log +2 -2
  269. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-14.log +2 -6
  270. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-15.log +6 -2
  271. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-16.log +2 -2
  272. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-17.log +2 -2
  273. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-18.log +5 -0
  274. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +3 -2
  275. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -2
  276. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-4.log +1 -3
  277. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-5.log +4 -2
  278. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-6.log +13 -2
  279. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-7.log +2 -13
  280. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-8.log +2 -2
  281. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-9.log +2 -2
  282. data/vendor/local/share/doc/groonga/source/example/tutorial/network-1.log +1 -1
  283. data/vendor/local/share/doc/groonga/source/example/tutorial/network-3.log +6 -6
  284. data/vendor/local/share/doc/groonga/source/install.txt +72 -8
  285. data/vendor/local/share/doc/groonga/source/news.txt +45 -1
  286. data/vendor/local/share/doc/groonga/source/tutorial/data.txt +112 -33
  287. data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +109 -99
  288. data/vendor/local/share/doc/groonga/source/tutorial/network.txt +76 -40
  289. data/vendor/local/share/doc/groonga/source/type.txt +30 -21
  290. data/vendor/local/share/groonga/html/admin/css/admin.css +1 -1
  291. data/vendor/local/share/groonga/html/admin/favicon.ico +0 -0
  292. data/vendor/local/share/groonga/html/admin/favicon.png +0 -0
  293. data/vendor/local/share/groonga/html/admin/favicon.svg +107 -547
  294. data/vendor/local/share/groonga/html/admin/images/groonga.png +0 -0
  295. data/vendor/local/share/groonga/html/admin/index.html +1 -1
  296. data/vendor/local/share/groonga/images/logo/groonga-icon-foreground-white.png +0 -0
  297. data/vendor/local/share/groonga/images/logo/groonga-icon-foreground-white.svg +118 -0
  298. data/vendor/local/share/groonga/images/logo/groonga-icon-full-size.png +0 -0
  299. data/vendor/local/share/groonga/images/logo/groonga-icon-full-size.svg +97 -0
  300. data/vendor/local/share/groonga/images/logo/groonga-icon.png +0 -0
  301. data/vendor/local/share/groonga/images/logo/groonga-icon.svg +93 -0
  302. data/vendor/local/share/groonga/images/logo/groonga-logo-foreground-white.png +0 -0
  303. data/vendor/local/share/groonga/images/logo/groonga-logo-foreground-white.svg +108 -0
  304. data/vendor/local/share/groonga/images/logo/groonga-logo.png +0 -0
  305. data/vendor/local/share/groonga/images/logo/groonga-logo.svg +118 -0
  306. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-bar-foreground-white.png +0 -0
  307. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-bar-foreground-white.svg +170 -0
  308. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-bar.png +0 -0
  309. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-bar.svg +186 -0
  310. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-foreground-white.png +0 -0
  311. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-foreground-white.svg +183 -0
  312. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-large.png +0 -0
  313. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner-large.svg +179 -0
  314. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner.png +0 -0
  315. data/vendor/local/share/groonga/images/logo/groonga-powered-by-banner.svg +201 -0
  316. data/vendor/local/share/groonga/images/logo/mroonga-icon-foreground-white.png +0 -0
  317. data/vendor/local/share/groonga/images/logo/mroonga-icon-foreground-white.svg +106 -0
  318. data/vendor/local/share/groonga/images/logo/mroonga-icon-full-size.png +0 -0
  319. data/vendor/local/share/groonga/images/logo/mroonga-icon-full-size.svg +97 -0
  320. data/vendor/local/share/groonga/images/logo/mroonga-icon.png +0 -0
  321. data/vendor/local/share/groonga/images/logo/mroonga-icon.svg +93 -0
  322. data/vendor/local/share/groonga/images/logo/mroonga-logo-foreground-white.png +0 -0
  323. data/vendor/local/share/groonga/images/logo/mroonga-logo-foreground-white.svg +122 -0
  324. data/vendor/local/share/groonga/images/logo/mroonga-logo.png +0 -0
  325. data/vendor/local/share/groonga/images/logo/mroonga-logo.svg +106 -0
  326. data/vendor/local/share/groonga/images/logo/nroonga-icon-foreground-white.png +0 -0
  327. data/vendor/local/share/groonga/images/logo/nroonga-icon-foreground-white.svg +106 -0
  328. data/vendor/local/share/groonga/images/logo/nroonga-icon-full-size.png +0 -0
  329. data/vendor/local/share/groonga/images/logo/nroonga-icon-full-size.svg +107 -0
  330. data/vendor/local/share/groonga/images/logo/nroonga-icon.png +0 -0
  331. data/vendor/local/share/groonga/images/logo/nroonga-icon.svg +93 -0
  332. data/vendor/local/share/groonga/images/logo/nroonga-logo-foreground-white.png +0 -0
  333. data/vendor/local/share/groonga/images/logo/nroonga-logo-foreground-white.svg +122 -0
  334. data/vendor/local/share/groonga/images/logo/nroonga-logo.png +0 -0
  335. data/vendor/local/share/groonga/images/logo/nroonga-logo.svg +117 -0
  336. data/vendor/local/share/groonga/images/logo/rroonga-icon-foreground-white.png +0 -0
  337. data/vendor/local/share/groonga/images/logo/rroonga-icon-foreground-white.svg +106 -0
  338. data/vendor/local/share/groonga/images/logo/rroonga-icon-full-size.png +0 -0
  339. data/vendor/local/share/groonga/images/logo/rroonga-icon-full-size.svg +107 -0
  340. data/vendor/local/share/groonga/images/logo/rroonga-icon.png +0 -0
  341. data/vendor/local/share/groonga/images/logo/rroonga-icon.svg +93 -0
  342. data/vendor/local/share/groonga/images/logo/rroonga-logo-foreground-white.png +0 -0
  343. data/vendor/local/share/groonga/images/logo/rroonga-logo-foreground-white.svg +122 -0
  344. data/vendor/local/share/groonga/images/logo/rroonga-logo.png +0 -0
  345. data/vendor/local/share/groonga/images/logo/rroonga-logo.svg +117 -0
  346. data/vendor/local/share/man/ja/man1/groonga.1 +510 -214
  347. data/vendor/local/share/man/man1/groonga.1 +510 -211
  348. metadata +62 -15
  349. data/vendor/local/bin/groonga-query-log-analyzer +0 -1419
  350. data/vendor/local/share/doc/groonga/en/html/_static/default.css +0 -278
  351. data/vendor/local/share/doc/groonga/en/html/_static/footer-bar.png +0 -0
  352. data/vendor/local/share/doc/groonga/en/html/_static/menu-header.png +0 -0
  353. data/vendor/local/share/doc/groonga/en/html/_static/sidebar.js +0 -151
  354. data/vendor/local/share/doc/groonga/ja/html/_static/default.css +0 -278
  355. data/vendor/local/share/doc/groonga/ja/html/_static/footer-bar.png +0 -0
  356. data/vendor/local/share/doc/groonga/ja/html/_static/menu-header.png +0 -0
  357. data/vendor/local/share/doc/groonga/ja/html/_static/sidebar.js +0 -151
@@ -1,4 +1,4 @@
1
- .TH "GROONGA" "1" "February 28, 2012" "2.0.0" "groonga"
1
+ .TH "GROONGA" "1" "March 29, 2012" "2.0.0" "groonga"
2
2
  .SH NAME
3
3
  groonga \- groonga documentation
4
4
  .
@@ -106,6 +106,16 @@ Install:
106
106
  .ft P
107
107
  .fi
108
108
  .sp
109
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
110
+ .sp
111
+ Install groonga\-tokenizer\-mecab package:
112
+ .sp
113
+ .nf
114
+ .ft C
115
+ % sudo aptitude \-V \-D \-y install groonga\-tokenizer\-mecab
116
+ .ft P
117
+ .fi
118
+ .sp
109
119
  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
120
  .sp
111
121
  Install groonga\-munin\-plugins package:
@@ -136,6 +146,18 @@ Install:
136
146
  .ft P
137
147
  .fi
138
148
  .sp
149
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
150
+ .sp
151
+ Install groonga\-tokenizer\-mecab package:
152
+ .sp
153
+ .nf
154
+ .ft C
155
+ % sudo aptitude \-V \-D \-y install groonga\-tokenizer\-mecab
156
+ .ft P
157
+ .fi
158
+ .sp
159
+ 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.
160
+ .sp
139
161
  Install groonga\-munin\-plugins package:
140
162
  .sp
141
163
  .nf
@@ -164,6 +186,18 @@ Install:
164
186
  .ft P
165
187
  .fi
166
188
  .sp
189
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
190
+ .sp
191
+ Install groonga\-tokenizer\-mecab package:
192
+ .sp
193
+ .nf
194
+ .ft C
195
+ % sudo aptitude \-V \-D \-y install groonga\-tokenizer\-mecab
196
+ .ft P
197
+ .fi
198
+ .sp
199
+ 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.
200
+ .sp
167
201
  Install groonga\-munin\-plugins package:
168
202
  .sp
169
203
  .nf
@@ -196,6 +230,18 @@ Install:
196
230
  .ft P
197
231
  .fi
198
232
  .sp
233
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
234
+ .sp
235
+ Install groonga\-tokenizer\-mecab package:
236
+ .sp
237
+ .nf
238
+ .ft C
239
+ % sudo apt\-get \-y install groonga\-tokenizer\-mecab
240
+ .ft P
241
+ .fi
242
+ .sp
243
+ 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.
244
+ .sp
199
245
  Install groonga\-munin\-plugins package:
200
246
  .sp
201
247
  .nf
@@ -228,6 +274,18 @@ Install:
228
274
  .ft P
229
275
  .fi
230
276
  .sp
277
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
278
+ .sp
279
+ Install groonga\-tokenizer\-mecab package:
280
+ .sp
281
+ .nf
282
+ .ft C
283
+ % sudo apt\-get \-y install groonga\-tokenizer\-mecab
284
+ .ft P
285
+ .fi
286
+ .sp
287
+ 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.
288
+ .sp
231
289
  Install groonga\-munin\-plugins package:
232
290
  .sp
233
291
  .nf
@@ -260,6 +318,18 @@ Install:
260
318
  .ft P
261
319
  .fi
262
320
  .sp
321
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
322
+ .sp
323
+ Install groonga\-tokenizer\-mecab package:
324
+ .sp
325
+ .nf
326
+ .ft C
327
+ % sudo apt\-get \-y install groonga\-tokenizer\-mecab
328
+ .ft P
329
+ .fi
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
+ .sp
263
333
  Install groonga\-munin\-plugins package:
264
334
  .sp
265
335
  .nf
@@ -279,11 +349,21 @@ Install:
279
349
  .ft P
280
350
  .fi
281
351
  .sp
352
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
353
+ .sp
354
+ Install groonga\-tokenizer\-mecab package:
355
+ .sp
356
+ .nf
357
+ .ft C
358
+ % sudo yum install \-y groonga\-tokenizer\-mecab
359
+ .ft P
360
+ .fi
361
+ .sp
282
362
  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
363
  .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.
364
+ Groonga\-munin\-plugins package requires munin\-node package that isn\(aqt included in the official CentOS repository. You need to enable \fI\%Repoforge (RPMforge)\fP repository or \fI\%EPEL\fP repository to install it by yum.
285
365
  .sp
286
- Enable RPMforge repository on i386 environment:
366
+ Enable Repoforge (RPMforge) repository on i386 environment:
287
367
  .sp
288
368
  .nf
289
369
  .ft C
@@ -291,7 +371,7 @@ Enable RPMforge repository on i386 environment:
291
371
  .ft P
292
372
  .fi
293
373
  .sp
294
- Enable RPMforge repository on x86_64 environment:
374
+ Enable Repoforge (RPMforge) repository on x86_64 environment:
295
375
  .sp
296
376
  .nf
297
377
  .ft C
@@ -328,11 +408,21 @@ Install:
328
408
  .ft P
329
409
  .fi
330
410
  .sp
411
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
412
+ .sp
413
+ Install groonga\-tokenizer\-mecab package:
414
+ .sp
415
+ .nf
416
+ .ft C
417
+ % sudo yum install \-y groonga\-tokenizer\-mecab
418
+ .ft P
419
+ .fi
420
+ .sp
331
421
  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
422
  .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.
423
+ Groonga\-munin\-plugins package requires munin\-node package that isn\(aqt included in the official CentOS repository. You need to enable \fI\%Repoforge (RPMforge)\fP repository or \fI\%EPEL\fP repository to install it by yum.
334
424
  .sp
335
- Enable RPMforge repository on i686 environment:
425
+ Enable Repoforge (RPMforge) repository on i686 environment:
336
426
  .sp
337
427
  .nf
338
428
  .ft C
@@ -340,7 +430,7 @@ Enable RPMforge repository on i686 environment:
340
430
  .ft P
341
431
  .fi
342
432
  .sp
343
- Enable RPMforge repository on x86_64 environment:
433
+ Enable Repoforge (RPMforge) repository on x86_64 environment:
344
434
  .sp
345
435
  .nf
346
436
  .ft C
@@ -377,6 +467,16 @@ Install:
377
467
  .ft P
378
468
  .fi
379
469
  .sp
470
+ If you want to use \fI\%MeCab\fP as a tokenizer. please install groonga\-tokenizer\-mecab package.
471
+ .sp
472
+ Install groonga\-tokenizer\-mecab package:
473
+ .sp
474
+ .nf
475
+ .ft C
476
+ % sudo yum install \-y groonga\-tokenizer\-mecab
477
+ .ft P
478
+ .fi
479
+ .sp
380
480
  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
481
  .sp
382
482
  Install groonga\-munin\-plugins package:
@@ -428,9 +528,9 @@ Install:
428
528
  .ft P
429
529
  .fi
430
530
  .sp
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.
531
+ The \fI\-\-prefix\fP 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
532
  .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.
533
+ There are some \fI\%Munin\fP plugins in groonga package. You need to specify \fI\-\-with\-munin\-plugins\fP option if you want to install them.
434
534
  .SH COMMUNITY
435
535
  .sp
436
536
  There are some places for sharing groonga information.
@@ -440,68 +540,70 @@ We welcome you to join our community.
440
540
  There are mailing lists for discussion about groonga.
441
541
  .INDENT 0.0
442
542
  .TP
443
- .B For English speaker
543
+ .B For English speakers
444
544
  \fI\%groonga-talk@lists.sourceforge.net\fP
445
545
  .TP
446
- .B For Japanese speaker
546
+ .B For Japanese speakers
447
547
  \fI\%groonga-dev@lists.sourceforge.jp\fP
448
548
  .UNINDENT
449
549
  .SH TUTORIAL
450
550
  .SS Basic operations
451
551
  .sp
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.
552
+ A groonga package provides a C library (libgroonga) and a command line tool (groonga). This tutorial explains how to use the command line tool, with which you can create/operate databases, start a server, establish a connection with a server, etc.
453
553
  .SS Create a database
454
554
  .sp
455
- You can create a new database with the following command.
555
+ The first step to using groonga is to create a new database. The following shows how to do it.
456
556
  .sp
457
557
  Form:
458
558
  .sp
459
559
  .nf
460
560
  .ft C
461
- groonga \-n DB_PATH_NAME
561
+ groonga \-n DB_PATH
462
562
  .ft P
463
563
  .fi
464
564
  .sp
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.
565
+ The \fI\-n\fP option specifies to create a new database and DB_PATH specifies the path of the new database. Actually, a database consists of a series of files and DB_PATH specifies the file which will be the entrance to the new database. DB_PATH also specifies the path prefix for other files. Note that database creation fails if DB_PATH points to an existing file.
466
566
  .sp
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.
567
+ This command creates a new 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.
468
568
  .sp
469
569
  Execution example:
470
570
  .sp
471
571
  .nf
472
572
  .ft C
473
- % groonga \-n /tmp/tutorial.db
474
- > Ctrl\-d
475
- %
573
+ % groonga \-n /tmp/groonga\-databases/introduction.db
476
574
  .ft P
477
575
  .fi
576
+ .sp
577
+ After this database creation, you can find a series of files in /tmp/groonga\-databases.
478
578
  .SS Operate a database
479
579
  .sp
580
+ The following shows how to operate an existing database.
581
+ .sp
480
582
  Form:
481
583
  .sp
482
584
  .nf
483
585
  .ft C
484
- groonga DB_PATH_NAME [COMMAND]
586
+ groonga DB_PATH [COMMAND]
485
587
  .ft P
486
588
  .fi
487
589
  .sp
488
- DB_PATH_NAME specifies the path of a target database.
590
+ DB_PATH specifies the path of a target database. This command fails if the specified database does not exist.
489
591
  .sp
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.
592
+ 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 executes them one by one. This tutorial focuses on the interactive mode.
491
593
  .sp
492
- Let\(aqs try to see the status of a groonga process by using a \fB/commands/status\fP command.
594
+ Let\(aqs see the status of a groonga process by using a \fB/commands/status\fP command.
493
595
  .sp
494
596
  Execution example:
495
597
  .sp
496
598
  .nf
497
599
  .ft C
498
- % groonga \-n /tmp/groonga\-databases/introduction.db
600
+ % groonga /tmp/groonga\-databases/introduction.db
499
601
  > 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}]
602
+ [[0,1332484898.47079,0.000113010406494141],{"alloc_count":151,"starttime":1332484898,"uptime":0,"version":"2.0.0\-250\-g5a3cf19","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
501
603
  .ft P
502
604
  .fi
503
605
  .sp
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.
606
+ As shown in the above example, a command returns a JSON array. The first element contains an error code, execution time, etc. The second element is the result of an operation.
505
607
  .SS Command format
506
608
  .sp
507
609
  Commands for operating a database accept arguments as follows:
@@ -551,273 +653,304 @@ inserts records to a table.
551
653
  .UNINDENT
552
654
  .SS Create a table
553
655
  .sp
554
- A \fB/commands/table_create\fP command creates a table.
656
+ A \fB/commands/table_create\fP command creates a new table.
555
657
  .sp
556
- In most cases, a table of groonga has a primary key which must be specified with its data type and index type.
658
+ In most cases, a table has a primary key which must be specified with its data type and index type.
557
659
  .sp
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.
660
+ There are various data types such as integers, strings, etc. See also \fB/type\fP for more details. The index type determines the search performance and the availability of prefix searches. The details will be described later.
559
661
  .sp
560
- Let\(aqs create a \(aqSite\(aq table which has a primary key of ShortText. In this example, the index type is HASH.
662
+ Let\(aqs create a table. The following example creates a table with a primary key. The \fIname\fP parameter specifies the name of the table. The \fIflags\fP parameter specifies the index type for the primary key. The \fIkey_type\fP parameter specifies the data type of the primary key.
561
663
  .sp
562
664
  Execution example:
563
665
  .sp
564
666
  .nf
565
667
  .ft C
566
668
  > table_create \-\-name Site \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
567
- [[0,1322616280.60791,0.01234375],true]
669
+ [[0,1332484898.674,0.0103404521942139],true]
568
670
  .ft P
569
671
  .fi
672
+ .sp
673
+ The second element of the result indicates that the operation succeeded.
570
674
  .SS View a table
571
675
  .sp
572
- A \fB/commands/select\fP command shows contents of table.
676
+ A \fB/commands/select\fP command can enumerate records in a table.
573
677
  .sp
574
678
  Execution example:
575
679
  .sp
576
680
  .nf
577
681
  .ft C
578
682
  > select \-\-table Site
579
- [[0,1322616280.82196,0.000451873],[[[0],[["_id","UInt32"],["_key","ShortText"]]]]]
683
+ [[0,1332484898.88587,0.000526189804077148],[[[0],[["_id","UInt32"],["_key","ShortText"]]]]]
580
684
  .ft P
581
685
  .fi
582
686
  .sp
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".
687
+ When only a table name is specified with a \fItable\fP parameter, a \fB/commands/select\fP command returns the first (at most) 10 records in the table. [0] in the result shows the number of records in the 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.
584
688
  .sp
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.
689
+ The above two columns, _id and _key, are the necessary columns. The _id column stores IDs those are automatically allocated by groonga. The _key column is associated with the primary key. You are not allowed to rename these columns.
586
690
  .SS Create a column
587
691
  .sp
588
- A \fB/commands/column_create\fP command adds a column to a table.
692
+ A \fB/commands/column_create\fP command creates a new column.
589
693
  .sp
590
- Let\(aqs add a column of ShortText to store titles. You may give a descriptive name \(aqtitle\(aq to the column.
694
+ Let\(aqs add a column. The following example adds a column to the Site table. The \fItable\fP parameter specifies the target table. The \fIname\fP parameter specifies the name of the column. The \fItype\fP parameter specifies the data type of the column.
591
695
  .sp
592
696
  Execution example:
593
697
  .sp
594
698
  .nf
595
699
  .ft C
596
- > column_create \-\-table Site \-\-name title \-\-flags COLUMN_SCALAR \-\-type ShortText
597
- [[0,1317212712.91734,0.077833747],true]
700
+ > column_create \-\-table Site \-\-name title \-\-type ShortText
701
+ [[0,1332484899.08879,0.00948214530944824],true]
598
702
  > select \-\-table Site
599
- [[0,1317212713.19572,0.000121119],[[[0],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]]]]]
703
+ [[0,1332484899.29974,0.000299215316772461],[[[0],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]]]]]
600
704
  .ft P
601
705
  .fi
706
+ .SS Load records
602
707
  .sp
603
- The COLUMN_SCALAR flag specifies to add a regular column.
604
- .SS Create a lexicon table for full text searches
605
- .sp
606
- Let\(aqs go on to how to make a full text search.
607
- .sp
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.
708
+ A \fB/commands/load\fP command loads JSON\-formatted records into a table.
609
709
  .sp
610
- The following shows a command which creates a lexicon table named \(aqTerms\(aq. The data type of its primary key is ShortText.
710
+ The following example loads nine records into the Site table.
611
711
  .sp
612
712
  Execution example:
613
713
  .sp
614
714
  .nf
615
715
  .ft C
616
- > table_create \-\-name Terms \-\-flags TABLE_PAT_KEY|KEY_NORMALIZE \-\-key_type ShortText \-\-default_tokenizer TokenBigram
617
- [[0,1317212713.39679,0.092312046],true]
716
+ > load \-\-table Site
717
+ > [
718
+ > {"_key":"http://example.org/","title":"This is test record 1!"},
719
+ > {"_key":"http://example.net/","title":"test record 2."},
720
+ > {"_key":"http://example.com/","title":"test test record three."},
721
+ > {"_key":"http://example.net/afr","title":"test record four."},
722
+ > {"_key":"http://example.org/aba","title":"test test test record five."},
723
+ > {"_key":"http://example.com/rab","title":"test test test test record six."},
724
+ > {"_key":"http://example.net/atv","title":"test test test record seven."},
725
+ > {"_key":"http://example.org/gat","title":"test test record eight."},
726
+ > {"_key":"http://example.com/vdw","title":"test test record nine."},
727
+ > ]
728
+ [[0,1332484899.50234,2.20460820198059],9]
618
729
  .ft P
619
730
  .fi
620
731
  .sp
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
625
- .sp
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.
732
+ The second element of the result indicates how many records were successfully loaded. In this case, all the records are successfully loaded.
627
733
  .sp
628
- Let\(aqs create an index column for the \(aqtitle\(aq column in the \(aqSite\(aq table.
734
+ Let\(aqs make sure that these records are correctly stored.
629
735
  .sp
630
736
  Execution example:
631
737
  .sp
632
738
  .nf
633
739
  .ft C
634
- > column_create \-\-table Terms \-\-name blog_title \-\-flags COLUMN_INDEX|WITH_POSITION \-\-type Site \-\-source title
635
- [[0,1317212713.68994,0.19739078],true]
740
+ > select \-\-table Site
741
+ [[0,1332484901.90868,0.000381231307983398],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."],[4,"http://example.net/afr","test record four."],[5,"http://example.org/aba","test test test record five."],[6,"http://example.com/rab","test test test test record six."],[7,"http://example.net/atv","test test test record seven."],[8,"http://example.org/gat","test test record eight."],[9,"http://example.com/vdw","test test record nine."]]]]
636
742
  .ft P
637
743
  .fi
744
+ .SS Get a record
638
745
  .sp
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.
640
- .SS Load data
746
+ A \fB/commands/select\fP command can search records in a table.
641
747
  .sp
642
- A \fB/commands/load\fP command loads JSON\-formatted records into a table.
748
+ If a search condition is specified with a \fIquery\fP parameter, a \fB/commands/select\fP command searches records matching the search condition and returns the matched records.
643
749
  .sp
644
- The following adds nine records to the \(aqSite\(aq table.
750
+ Let\(aqs get a record having a specified record ID. The following example gets the first record in the Site table. More precisely, the \fIquery\fP parameter specifies a record whose _id column stores 1.
645
751
  .sp
646
752
  Execution example:
647
753
  .sp
648
754
  .nf
649
755
  .ft C
650
- > load \-\-table Site
651
- > [
652
- > {"_key":"http://example.org/","title":"This is test record 1!"},
653
- > {"_key":"http://example.net/","title":"test record 2."},
654
- > {"_key":"http://example.com/","title":"test test record three."},
655
- > {"_key":"http://example.net/afr","title":"test record four."},
656
- > {"_key":"http://example.org/aba","title":"test test test record five."},
657
- > {"_key":"http://example.com/rab","title":"test test test test record six."},
658
- > {"_key":"http://example.net/atv","title":"test test test record seven."},
659
- > {"_key":"http://example.org/gat","title":"test test record eight."},
660
- > {"_key":"http://example.com/vdw","title":"test test record nine."},
661
- > ]
662
- [[0,1317212714.08816,2.203527402],9]
756
+ > select \-\-table Site \-\-query _id:1
757
+ [[0,1332484902.11683,0.000809431076049805],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
663
758
  .ft P
664
759
  .fi
665
760
  .sp
666
- Let\(aqs make sure that these records are correctly stored.
761
+ Next, let\(aqs get a record having a specified key. The following example gets the record whose primary key is "\fI\%http://example.org/\fP". More precisely, the \fIquery\fP parameter specifies a record whose _key column stores "\fI\%http://example.org/\fP".
667
762
  .sp
668
763
  Execution example:
669
764
  .sp
670
765
  .nf
671
766
  .ft C
672
- > select \-\-table Site
673
- [[0,1317212716.49285,0.000270908],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."],[4,"http://example.net/afr","test record four."],[5,"http://example.org/aba","test test test record five."],[6,"http://example.com/rab","test test test test record six."],[7,"http://example.net/atv","test test test record seven."],[8,"http://example.org/gat","test test record eight."],[9,"http://example.com/vdw","test test record nine."]]]]
767
+ > select \-\-table Site \-\-query \(aq_key:"http://example.org/"\(aq
768
+ [[0,1332484902.32106,0.000850200653076172],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
674
769
  .ft P
675
770
  .fi
676
- .SS Search data
771
+ .SS Create a lexicon table for full text search
772
+ .sp
773
+ Let\(aqs go on to how to make full text search.
677
774
  .sp
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.
775
+ 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.
679
776
  .sp
680
- You can search records by using a \(aqselect\(aq command with a \(aqquery\(aq parameter.
777
+ The following shows a command which creates a lexicon table named Terms. The data type of its primary key is ShortText.
681
778
  .sp
682
779
  Execution example:
683
780
  .sp
684
781
  .nf
685
782
  .ft C
686
- > select \-\-table Site \-\-query _id:1
687
- [[0,1317212716.69871,0.000308514],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
783
+ > table_create \-\-name Terms \-\-flags TABLE_PAT_KEY|KEY_NORMALIZE \-\-key_type ShortText \-\-default_tokenizer TokenBigram
784
+ [[0,1332484902.52532,0.00777173042297363],true]
688
785
  .ft P
689
786
  .fi
690
787
  .sp
691
- \(aq_id:1\(aq specifies to search a record whose ID is 1.
788
+ The \fB/commands/table_create\fP 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.
789
+ .sp
790
+ The TABLE_PAT_KEY flag specifies to store index terms in a patricia trie. The KEY_NORMALIZE flag specifies to normalize index terms. In this example, both flags are validated by using a \(aq|\(aq. The \fIdefault_tokenizer\fP parameter specifies the method for tokenizing text. This example uses TokenBigram that is generally called N\-gram.
791
+ .SS Create an index column for full text search
792
+ .sp
793
+ 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.
692
794
  .sp
693
- Next, let\(aqs search a record by a primary key.
795
+ Let\(aqs create an index column. The following example creates an index column for a column in the Site table.
694
796
  .sp
695
797
  Execution example:
696
798
  .sp
697
799
  .nf
698
800
  .ft C
699
- > select \-\-table Site \-\-query "_key:\e"http://example.org/\e""
700
- [[0,1317212716.9005,0.000478343],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
801
+ > column_create \-\-table Terms \-\-name blog_title \-\-flags COLUMN_INDEX|WITH_POSITION \-\-type Site \-\-source title
802
+ [[0,1332484902.73511,0.0202178955078125],true]
701
803
  .ft P
702
804
  .fi
703
805
  .sp
704
- \(aq_key:"\fI\%http://example.org/\fP"\(aq specifies to search a record whose primary key is "\fI\%http://example.org/\fP".
806
+ The \fItable\fP parameter specifies the index table and the \fIname\fP parameter specifies the index column. The \fItype\fP parameter specifies the target table and the \fIsource\fP parameter specifies the target column. The COLUMN_INDEX flag specifies to create an index column and the WITH_POSITION flag specifies to create a full inverted index, which contains the positions of each index term. This combination, COLUMN_INDEX|WITH_POSITION, is recommended for the general purpose.
807
+ .IP Note
808
+ You can create a lexicon table and index columns before/during/after loading records. If a target column already has records, groonga creates an inverted index in a static manner. In contrast, if you load records into an already indexed column, groonga updates the inverted index in a dynamic manner.
809
+ .RE
705
810
  .SS Full text search
706
811
  .sp
707
- It\(aqs time to make a full text search. You can make a full text search query with the same \(aqquery\(aq parameter.
812
+ It\(aqs time. You can make full text search with a \fB/commands/select\fP command.
813
+ .sp
814
+ A query for full text search is specified with a \fIquery\fP parameter. The following example searches records whose "title" column contains "this". The \(aq@\(aq specifies to make full text search. Note that a lower case query matches upper case and capitalized terms in a record if KEY_NORMALIZE was specified when creating a lexcon table.
708
815
  .sp
709
816
  Execution example:
710
817
  .sp
711
818
  .nf
712
819
  .ft C
713
820
  > select \-\-table Site \-\-query title:@this
714
- [[0,1317212717.10303,0.000581287],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
821
+ [[0,1332484902.95678,0.000878334045410156],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
715
822
  .ft P
716
823
  .fi
717
824
  .sp
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.
825
+ In this example, the first record matches the query because its title contains "This", that is the capitalized form of the query.
719
826
  .sp
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]_
827
+ A \fB/commands/select\fP command accepts an optional parameter, named \fImatch_columns\fP, that specifies the default target columns. This parameter is used if target columns are not specified in a query. [1]
721
828
  .sp
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.
829
+ The combination of "\fI\-\-match_columns\fP title" and "\fI\-\-query\fP this" brings you the same result that "\fI\-\-query\fP title:@this" does.
723
830
  .sp
724
831
  Execution example:
725
832
  .sp
726
833
  .nf
727
834
  .ft C
728
835
  > select \-\-table Site \-\-match_columns title \-\-query this
729
- [[0,1317212717.30596,0.000716439],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
836
+ [[0,1332484903.16096,0.000757932662963867],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
730
837
  .ft P
731
838
  .fi
732
839
  .SS Specify output columns
733
840
  .sp
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 (,).
841
+ An \fIoutput_columns\fP parameter of a \fB/commands/select\fP command specifies columns to appear in the search result. If you want to specify more than one columns, please separate column names by commas (\(aq,\(aq).
735
842
  .sp
736
843
  Execution example:
737
844
  .sp
738
845
  .nf
739
846
  .ft C
740
847
  > select \-\-table Site \-\-output_columns _key,title,_score \-\-query title:@test
741
- [[0,1317212717.50916,0.00060758],[[[9],[["_key","ShortText"],["title","ShortText"],["_score","Int32"]],["http://example.org/","This is test record 1!",1],["http://example.net/","test record 2.",1],["http://example.com/","test test record three.",2],["http://example.net/afr","test record four.",1],["http://example.org/aba","test test test record five.",3],["http://example.com/rab","test test test test record six.",4],["http://example.net/atv","test test test record seven.",3],["http://example.org/gat","test test record eight.",2],["http://example.com/vdw","test test record nine.",2]]]]
848
+ [[0,1332484903.36506,0.000709056854248047],[[[9],[["_key","ShortText"],["title","ShortText"],["_score","Int32"]],["http://example.org/","This is test record 1!",1],["http://example.net/","test record 2.",1],["http://example.com/","test test record three.",2],["http://example.net/afr","test record four.",1],["http://example.org/aba","test test test record five.",3],["http://example.com/rab","test test test test record six.",4],["http://example.net/atv","test test test record seven.",3],["http://example.org/gat","test test record eight.",2],["http://example.com/vdw","test test record nine.",2]]]]
742
849
  .ft P
743
850
  .fi
744
851
  .sp
745
- This command specifies three output columns including the \(aq_score\(aq column, which stores the relevance score of each record.
852
+ This example specifies three output columns including the _score column, which stores the relevance score of each record.
746
853
  .SS Specify output ranges
747
854
  .sp
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.
855
+ A \fB/commands/select\fP command returns a part of its search result if \fIoffset\fP and/or \fIlimit\fP 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.
749
856
  .sp
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.
857
+ An \fIoffset\fP parameter specifies the starting point and a \fIlimit\fP 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.
751
858
  .sp
752
859
  Execution example:
753
860
  .sp
754
861
  .nf
755
862
  .ft C
756
863
  > select \-\-table Site \-\-offset 0 \-\-limit 3
757
- [[0,1317212717.71574,0.000238544],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."]]]]
864
+ [[0,1332484903.57505,0.000303268432617188],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."]]]]
758
865
  > select \-\-table Site \-\-offset 3 \-\-limit 3
759
- [[0,1317212717.91925,0.00023617],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[4,"http://example.net/afr","test record four."],[5,"http://example.org/aba","test test test record five."],[6,"http://example.com/rab","test test test test record six."]]]]
866
+ [[0,1332484903.77936,0.000320196151733398],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[4,"http://example.net/afr","test record four."],[5,"http://example.org/aba","test test test record five."],[6,"http://example.com/rab","test test test test record six."]]]]
760
867
  > select \-\-table Site \-\-offset 7 \-\-limit 3
761
- [[0,1317212718.12219,0.00019999],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[8,"http://example.org/gat","test test record eight."],[9,"http://example.com/vdw","test test record nine."]]]]
868
+ [[0,1332484903.98409,0.000294685363769531],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[8,"http://example.org/gat","test test record eight."],[9,"http://example.com/vdw","test test record nine."]]]]
762
869
  .ft P
763
870
  .fi
764
- .SS Sort
871
+ .SS Sort a search result
872
+ .sp
873
+ A \fB/commands/select\fP command sorts its result when used with a \fIsortby\fP parameter.
765
874
  .sp
766
- A \(aqselect\(aq command sorts its result when used with a \(aqsortby\(aq parameter.
875
+ A \fIsortby\fP 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 (\(aq\-\(aq) to the column name in a parameter.
767
876
  .sp
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.
877
+ The following example shows records in the Site table in reverse order.
769
878
  .sp
770
879
  Execution example:
771
880
  .sp
772
881
  .nf
773
882
  .ft C
774
883
  > select \-\-table Site \-\-sortby \-_id
775
- [[0,1317212718.32565,0.000385755],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[9,"http://example.com/vdw","test test record nine."],[8,"http://example.org/gat","test test record eight."],[7,"http://example.net/atv","test test test record seven."],[6,"http://example.com/rab","test test test test record six."],[5,"http://example.org/aba","test test test record five."],[4,"http://example.net/afr","test record four."],[3,"http://example.com/","test test record three."],[2,"http://example.net/","test record 2."],[1,"http://example.org/","This is test record 1!"]]]]
884
+ [[0,1332484904.18805,0.000293493270874023],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[9,"http://example.com/vdw","test test record nine."],[8,"http://example.org/gat","test test record eight."],[7,"http://example.net/atv","test test test record seven."],[6,"http://example.com/rab","test test test test record six."],[5,"http://example.org/aba","test test test record five."],[4,"http://example.net/afr","test record four."],[3,"http://example.com/","test test record three."],[2,"http://example.net/","test record 2."],[1,"http://example.org/","This is test record 1!"]]]]
776
885
  .ft P
777
886
  .fi
778
887
  .sp
779
- You can use the \(aq_score\(aq column as a sorting criteria for ranking a search result.
888
+ The next example uses the _score column as the sorting criteria for ranking the search result. The result is sorted in relevance order.
780
889
  .sp
781
890
  Execution example:
782
891
  .sp
783
892
  .nf
784
893
  .ft C
785
- > select \-\-table Site \-\-query title:@test \-\-output_columns _id,_score,title \-\-sortby _score
786
- [[0,1317212718.5331,0.000667311],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[1,1,"This is test record 1!"],[2,1,"test record 2."],[4,1,"test record four."],[3,2,"test test record three."],[9,2,"test test record nine."],[8,2,"test test record eight."],[7,3,"test test test record seven."],[5,3,"test test test record five."],[6,4,"test test test test record six."]]]]
894
+ > select \-\-table Site \-\-query title:@test \-\-output_columns _id,_score,title \-\-sortby \-_score
895
+ [[0,1332484904.39402,0.000802755355834961],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[6,4,"test test test test record six."],[5,3,"test test test record five."],[7,3,"test test test record seven."],[8,2,"test test record eight."],[3,2,"test test record three."],[9,2,"test test record nine."],[1,1,"This is test record 1!"],[4,1,"test record four."],[2,1,"test record 2."]]]]
787
896
  .ft P
788
897
  .fi
789
898
  .sp
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.
899
+ If you want to specify more than one columns, please separate column names by commas (\(aq,\(aq). In such a case, a search result is sorted in order of the 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.
791
900
  .sp
792
901
  Execution example:
793
902
  .sp
794
903
  .nf
795
904
  .ft C
796
- > select \-\-table Site \-\-query title:@test \-\-output_columns _id,_score,title \-\-sortby _score,_id
797
- [[0,1317212718.73819,0.00069225],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[1,1,"This is test record 1!"],[2,1,"test record 2."],[4,1,"test record four."],[3,2,"test test record three."],[8,2,"test test record eight."],[9,2,"test test record nine."],[5,3,"test test test record five."],[7,3,"test test test record seven."],[6,4,"test test test test record six."]]]]
905
+ > select \-\-table Site \-\-query title:@test \-\-output_columns _id,_score,title \-\-sortby \-_score,_id
906
+ [[0,1332484904.60132,0.000498056411743164],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[6,4,"test test test test record six."],[5,3,"test test test record five."],[7,3,"test test test record seven."],[3,2,"test test record three."],[8,2,"test test record eight."],[9,2,"test test record nine."],[1,1,"This is test record 1!"],[2,1,"test record 2."],[4,1,"test record four."]]]]
798
907
  .ft P
799
908
  .fi
800
909
  footnote
801
910
  .IP [1] 5
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.
803
- .SS How to use groonga with network
911
+ Currently, a \fImatch_columns\fP parameter is available iff there exists an inverted index for full text search. A \fImatch_columns\fP parameter for a regular column is not supported.
912
+ .SS Remote access
804
913
  .sp
805
- You can use groonga with network. When you run groonga by using the groonga original protocol or HTTP, groonga accepts connection for network.
806
- .SS Connect with groonga\(aqs original protocol
807
- .SS Run groonga daemon
914
+ You can use groonga as a server which allows remote access. Groonga supports the original protocol (gqtp), the memcached binary protocol and HTTP.
915
+ .SS Groonga query transfer protocol (gqtp)
916
+ .SS How to run a gqtp server
917
+ .sp
918
+ Groonga has a special protocol, named groonga query transfer ptorotocl (gqtp), for remote access to a database. The following form shows how to run groonga as a gqtp server.
808
919
  .sp
809
920
  Form:
810
921
  .sp
811
922
  .nf
812
923
  .ft C
813
- groonga [\-p PORT_NUMBER] \-d DB_PATH_NAME
924
+ groonga [\-p PORT_NUMBER] \-s DB_PATH
814
925
  .ft P
815
926
  .fi
816
927
  .sp
817
- The DB_PATH_NAME is set the full\-path of existing database.
818
- With this form, you can run groonga as a daemon and connect by
819
- with groonga original protocol on PORT_NUMBER.
820
- (The port number is 10041 when you don\(aqt specify PORT_NUMBER.)
928
+ The \fI\-s\fP option specifies to run groonga as a server. DB_PATH specifies the path of the existing database to be hosted. The \fI\-p\fP option and its argument, PORT_NUMBER, specify the port number of the server. The default port number is 10041, which is used when you don\(aqt specify PORT_NUMBER.
929
+ .sp
930
+ The following command runs a server that listens on the default port number. The server accepts operations to the specified database.
931
+ .sp
932
+ Execution example:
933
+ .sp
934
+ .nf
935
+ .ft C
936
+ % groonga \-s /tmp/groonga\-databases/introduction.db
937
+ Ctrl\-c
938
+ %
939
+ .ft P
940
+ .fi
941
+ .SS How to run a gqtp daemon
942
+ .sp
943
+ You can also run a gqtp server as a daemon by using the \fI\-d\fP option, instead of the \fI\-s\fP option.
944
+ .sp
945
+ Form:
946
+ .sp
947
+ .nf
948
+ .ft C
949
+ groonga [\-p PORT_NUMBER] \-d DB_PATH
950
+ .ft P
951
+ .fi
952
+ .sp
953
+ A groonga daemon prints its process ID as follows. In this example, the process ID is 12345. Then, the daemon opens a specified database and accepts operations to that database.
821
954
  .sp
822
955
  Execution example:
823
956
  .sp
@@ -828,9 +961,9 @@ Execution example:
828
961
  %
829
962
  .ft P
830
963
  .fi
964
+ .SS How to run a gqtp client
831
965
  .sp
832
- Groonga shows its process ID on daemon mode.
833
- .SS Connect to groonga server
966
+ You can run groonga as a gqtp client as follows:
834
967
  .sp
835
968
  Form:
836
969
  .sp
@@ -840,11 +973,7 @@ groonga [\-p PORT_NUMBER] \-c [HOST_NAME_OR_IP_ADDRESS]
840
973
  .ft P
841
974
  .fi
842
975
  .sp
843
- This command connects to groonga server running at specified HOST_NAME_OR_IP_ADDRESS.
844
- .sp
845
- When you don\(aqt specify HOST_NAME_OR_IP_ADDRESS, this command connects to groonga server running at localhost. When you don\(aqt specify PORT_NUMBER, 10041 is used.
846
- .sp
847
- Groonga runs in interactive mode after connect to groonga server successfully. Groonga reads command from standard input and evaluates it repeatedly.
976
+ This command establishes a connection with a gqtp server and then enters into interactive mode. HOST_NAME_OR_IP_ADDRESS specifies the hostname or the IP address of the server. If not specifed, groonga uses the default hostname "localhost". The \fI\-p\fP option and its argument, PORT_NUMBER, specify the port number of the server. If not specified, groonga uses the default port number 10041.
848
977
  .sp
849
978
  Execution example:
850
979
  .sp
@@ -852,14 +981,16 @@ Execution example:
852
981
  .ft C
853
982
  % groonga \-c
854
983
  > status
855
- [[0,1317212813.13814,0.000102148],{"alloc_count":184,"starttime":1317212806,"uptime":7,"version":"1.2.5\-84\-g5c190df","n_queries":14,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
984
+ [[0,1332486613.4953,9.918212890625e\-05],{"alloc_count":130,"starttime":1332486613,"uptime":0,"version":"2.0.0\-250\-g5a3cf19","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
856
985
  > ctrl\-d
857
986
  %
858
987
  .ft P
859
988
  .fi
860
- .SS Terminate groonga daemon
861
989
  .sp
862
- You can terminate groonga daemon with shutdown command.
990
+ In interactive mode, groonga reads commands from the standard input and executes them one by one.
991
+ .SS How to terminate a gqtp server
992
+ .sp
993
+ You can terminate a gqtp server with a \fB/commands/shutdown\fP command.
863
994
  .sp
864
995
  Execution example:
865
996
  .sp
@@ -870,128 +1001,260 @@ Execution example:
870
1001
  %
871
1002
  .ft P
872
1003
  .fi
873
- .SS Connect with HTTP
1004
+ .SS Memcached binary protocol
1005
+ .sp
1006
+ Groonga supports the memcached binary protocol. The following form shows how to run groonga as a memcached binary protocol server daemon.
1007
+ .sp
1008
+ Form:
1009
+ .sp
1010
+ .nf
1011
+ .ft C
1012
+ groonga [\-p PORT_NUMBER] \-d \-\-protocol memcached DB_PATH
1013
+ .ft P
1014
+ .fi
1015
+ .sp
1016
+ The \fI\-\-protocol\fP option and its argument specify the protocol of the server. "memcached" specifies to use the memcached binary protocol.
1017
+ .SS Hypertext transfer protocol (HTTP)
1018
+ .SS How to run an HTTP server
874
1019
  .sp
875
- You need to run groonga in HTTP protocol mode when you want to use groonga via HTTP.
1020
+ Groonga supports the hypertext transfer protocol (HTTP). The following form shows how to run groonga as an HTTP server daemon.
876
1021
  .sp
877
1022
  Form:
878
1023
  .sp
879
1024
  .nf
880
1025
  .ft C
881
- groonga [\-p PORT_NUMBER] \-d \-\-protocol http DB_PATH_NAME
1026
+ groonga [\-p PORT_NUMBER] \-d \-\-protocol http DB_PATH
882
1027
  .ft P
883
1028
  .fi
884
1029
  .sp
885
- \fI\-\-protocol\fP option specifies a protocol of groonga server. \fIhttp\fP means that groonga accepts connections via HTTP.
886
- .SS Administration tool based on HTML
1030
+ The \fI\-\-protocol\fP option and its argument specify the protocol of the server. "http" specifies to use HTTP.
1031
+ .sp
1032
+ The following command runs an HTTP server that listens on the port number 80.
1033
+ .sp
1034
+ Execution example:
887
1035
  .sp
888
- You can access administration tool based on HTML at \fIhttp://[HOST_NAME_OR_IP_ADDRESS]:[PORT_NUMBER]/\fP after the above command is ran. Your browser must enable JavaScript.
889
- .SS Run command with HTTP
1036
+ .nf
1037
+ .ft C
1038
+ % groonga \-p 80 \-d \-\-protocol http /tmp/groonga\-databases/introduction.db
1039
+ %
1040
+ .ft P
1041
+ .fi
1042
+ .SS How to send a command to an HTTP server
890
1043
  .sp
891
- You can run command at \fI/d/COMMAND_NAME\fP when groonga is ran in HTTP protocol mode.
1044
+ You can send a command to an HTTP server by sending a GET request to /d/COMMAND_NAME. Command parameters can be passed as parameters of the GET request. The format is "?NAME_1=VALUE_1&NAME_2=VALUE_2&...".
892
1045
  .sp
893
- Command options are passed as HTTP\(aqs GET parameters. They are in \fI?OPTION=VALUE&OPTION=VALUE&...\fP form.
1046
+ The following example shows how to send commands to an HTTP server.
894
1047
  .sp
895
1048
  Execution example:
896
1049
  .sp
897
1050
  .nf
898
1051
  .ft C
899
- http://[IPまたはホスト名]:[ポート番号]/d/status
900
- 実行される処理:
1052
+ http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/status
1053
+ Executed command:
901
1054
  > status
902
- [[0,1317212813.33982,0.000109691],{"alloc_count":184,"starttime":1317212806,"uptime":7,"version":"1.2.5\-84\-g5c190df","n_queries":14,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
1055
+ [[0,1332486613.69917,0.000123739242553711],{"alloc_count":131,"starttime":1332486613,"uptime":0,"version":"2.0.0\-250\-g5a3cf19","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
903
1056
 
904
- http://[IPまたはホスト名]:[ポート番号]/d/select?table=Site&query=title:@this
905
- 実行される処理:
1057
+ http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/select?table=Site&query=title:@this
1058
+ Executed command:
906
1059
  > select \-\-table Site \-\-query title:@this
907
- [[0,1317212813.54112,6.7993e\-05],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
1060
+ [[0,1332486613.90319,0.00245404243469238],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
908
1061
  .ft P
909
1062
  .fi
910
- .SS Security
1063
+ .SS Administration tool (HTTP)
911
1064
  .sp
912
- Network service of groonga doesn\(aqt support authentication. Everyone can view and modify the database. We recommend that you restrict client accesses by IP address. You can use iptables or any similar tool for it.
913
- .SS さまざまな種類をもったデータの保存
1065
+ An HTTP server of groonga provides a browser based administration tool that makes database management easy. After starting an HTTP server, you can use the administration tool by accessing \fI\%http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/\fP. Note that Javascript must be enabled for the tool to work properly.
1066
+ .SS Security issues
914
1067
  .sp
915
- groongaでは、さまざまなデータを格納させることが出来ます。
916
- .SS データ型
1068
+ Groonga servers don\(aqt support user authentication. Everyone can view and modify databases hosted by groonga servers. You are recommended to restrict IP addresses that can access groonga servers. You can use iptables or similar for this purpose.
1069
+ .SS Various data types
917
1070
  .sp
918
- groongaでは、数値(整数・小数)や文字列や時刻や経緯度などの情報を格納することができます。
1071
+ Groonga is a full text search engine but also serves as a column\-oriented data store. Groonga supports various data types, such as numeric types, string types, date and time type, longitude and latitude types, etc. This tutorial shows a list of data types and explains how to use them.
1072
+ .SS Overview
919
1073
  .sp
920
- ここでは、Int32型のカラムに整数を格納、Float型のカラムに浮動小数点の小数を、ShortText型のカラムに文字列を、Time型のカラムに時間を格納する例を示します。経緯度の格納については、のちのチュートリアルで触れます。
1074
+ The basic data types of groonga are roughly divided into 5 groups \-\-\- boolean type, numeric types, string types, date/time type and longitude/latitude types. The numeric types are further divided according to whether integer or floating point number, signed or unsigned and the number of bits allocated to each integer. The string types are further divided according to the maximum length. The longitude/latitude types are further divided according to the geographic coordinate system. For more details, see \fB/type\fP.
921
1075
  .sp
922
- その他のデータ型の一覧は、 \fB/type\fP を参照してください。
1076
+ In addition, groonga supports reference types and vector types. Reference types are designed for accessing other tables. Vector types are designed for storing a variable number of values in one element.
1077
+ .sp
1078
+ First, let\(aqs create a table for this tutorial.
923
1079
  .sp
924
1080
  Execution example:
925
1081
  .sp
926
1082
  .nf
927
1083
  .ft C
928
- > table_create \-\-name Type \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
929
- [[0,1322616293.7274,0.012551106],true]
930
- > column_create \-\-table Type \-\-name number \-\-type Int32
931
- [[0,1322616293.94115,0.008619605],true]
932
- > column_create \-\-table Type \-\-name float \-\-type Float
933
- [[0,1322616294.15095,0.004959989],true]
934
- > column_create \-\-table Type \-\-name string \-\-type ShortText
935
- [[0,1322616294.35693,0.005551818],true]
936
- > column_create \-\-table Type \-\-name time \-\-type Time
937
- [[0,1322616294.56333,0.006356953],true]
938
- > load \-\-table Type
939
- > [{"_key":"sample","number":12345,"float":42.195,"string":"GROONGA","time":1234567890.12}]
940
- [[0,1322616294.77086,0.202357708],1]
941
- > select \-\-table Type
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]]]]
1084
+ > table_create \-\-name ToyBox \-\-flags TABLE_HASH_KEY \-\-key_type ShortText
1085
+ [[0,1332498286.03578,0.00542259216308594],true]
943
1086
  .ft P
944
1087
  .fi
945
- .SS テーブル型
1088
+ .SS Boolean type
1089
+ .sp
1090
+ The boolean type is used to store true or false. To create a boolean type column, specify Bool to the \fItype\fP parameter of \fB/commands/column_create\fP command. The default value of the boolean type is false.
946
1091
  .sp
947
- table_createで作成したテーブルを、カラムの型として使うことが出来ます。
1092
+ The following example creates a boolean type column and adds three records. Note that the third record has the default value because no value is specified.
948
1093
  .sp
949
- また、output_columnsにおいて「.」を区切りとして、参照先のテーブルに存在するカラムを指定すると、指定したカラムの値を表示することができます。
1094
+ Execution example:
1095
+ .sp
1096
+ .nf
1097
+ .ft C
1098
+ > column_create \-\-table ToyBox \-\-name is_animal \-\-type Bool
1099
+ [[0,1332498286.2427,0.00578594207763672],true]
1100
+ > load \-\-table ToyBox
1101
+ > [
1102
+ > {"_key":"Monkey","is_animal":true}
1103
+ > {"_key":"Flower","is_animal":false}
1104
+ > {"_key":"Block"}
1105
+ > ]
1106
+ [[0,1332498286.44978,1.00197458267212],3]
1107
+ > select \-\-table ToyBox \-\-output_columns _key,is_animal
1108
+ [[0,1332498287.65257,0.000472545623779297],[[[3],[["_key","ShortText"],["is_animal","Bool"]],["Monkey",true],["Flower",false],["Block",false]]]]
1109
+ .ft P
1110
+ .fi
1111
+ .SS Numeric types
950
1112
  .sp
951
- ここでは、先のチュートリアルで作成したSiteテーブルに手を加え、どのサイトをリンクしているのかを保存してみましょう。
1113
+ The numeric types are divided into integer types and a floating point number type. The integer types are further divided into the signed integer types and unsigned integer types. In addition, you can choose the number of bits allocated to each integer. For more details, see \fB/type\fP. The default value of the numeric types is 0.
952
1114
  .sp
953
- 他のテーブルを参照するカラムにデータを入力する場合には、参照先のテーブルの_keyカラムの値を代入する必要があります。
1115
+ The following example creates an Int8 column and a Float column, and then updates existing records. The \fB/commands/load\fP command updates the weight column as expected. On the other hand, the price column values are different from the specified values because 15.9 is not an integer and 200 is too large. 15.9 is converted to 15 by removing the fractional part. 200 causes an overflow and the result becomes \-56. Note that the result of an overflow/underflow is undefined.
1116
+ .sp
1117
+ Execution example:
1118
+ .sp
1119
+ .nf
1120
+ .ft C
1121
+ > column_create \-\-table ToyBox \-\-name price \-\-type Int8
1122
+ [[0,1332498287.85609,0.00574946403503418],true]
1123
+ > column_create \-\-table ToyBox \-\-name weight \-\-type Float
1124
+ [[0,1332498288.06304,0.00493621826171875],true]
1125
+ > load \-\-table ToyBox
1126
+ > [
1127
+ > {"_key":"Monkey","price":15.9}
1128
+ > {"_key":"Flower","price":200,"weight":0.13}
1129
+ > {"_key":"Block","weight":25.7}
1130
+ > ]
1131
+ [[0,1332498288.26924,1.00213837623596],3]
1132
+ > select \-\-table ToyBox \-\-output_columns _key,price,weight
1133
+ [[0,1332498289.47254,0.000308036804199219],[[[3],[["_key","ShortText"],["price","Int8"],["weight","Float"]],["Monkey",15,0.0],["Flower",\-56,0.13],["Block",0,25.7]]]]
1134
+ .ft P
1135
+ .fi
1136
+ .SS String types
1137
+ .sp
1138
+ The string types are divided according to the maximum length. For more details, see \fB/type\fP. The default value is the zero\-length string.
1139
+ .sp
1140
+ The following example creates a ShortText column and updates existing records. The third record has the default value because not updated.
1141
+ .sp
1142
+ Execution example:
1143
+ .sp
1144
+ .nf
1145
+ .ft C
1146
+ > column_create \-\-table ToyBox \-\-name name \-\-type ShortText
1147
+ [[0,1332498289.67627,0.00676369667053223],true]
1148
+ > load \-\-table ToyBox
1149
+ > [
1150
+ > {"_key":"Monkey","name":"Grease"}
1151
+ > {"_key":"Flower","name":"Rose"}
1152
+ > ]
1153
+ [[0,1332498289.88434,0.801783800125122],2]
1154
+ > select \-\-table ToyBox \-\-output_columns _key,name
1155
+ [[0,1332498290.88724,0.000265598297119141],[[[3],[["_key","ShortText"],["name","ShortText"]],["Monkey","Grease"],["Flower","Rose"],["Block",""]]]]
1156
+ .ft P
1157
+ .fi
1158
+ .SS Date and time type
1159
+ .sp
1160
+ The date and time type of groonga is Time. Actually, a Time column stores a date and time as the number of microseconds since the Epoch, 1970\-01\-01 00:00:00. A Time value can represent a date and time before the Epoch because the actual data type is a signed integer. Note that \fB/commands/load\fP and :doc:
1161
+ .nf
1162
+ \(ga
1163
+ .fi
1164
+ /commands/select commands use a decimal number to represent a data and time in seconds. The default value is 0.0, which means the Epoch.
1165
+ .sp
1166
+ The following example creates a Time column and updates existing records. The first record has the default value because not updated.
1167
+ .sp
1168
+ Execution example:
1169
+ .sp
1170
+ .nf
1171
+ .ft C
1172
+ > column_create \-\-table ToyBox \-\-name time \-\-type Time
1173
+ [[0,1332498291.0906,0.00631809234619141],true]
1174
+ > load \-\-table ToyBox
1175
+ > [
1176
+ > {"_key":"Flower","time":1234567890.1234569999}
1177
+ > {"_key":"Block","time":\-1234567890}
1178
+ > ]
1179
+ [[0,1332498291.29814,0.801807641983032],2]
1180
+ > select \-\-table ToyBox \-\-output_columns _key,time
1181
+ [[0,1332498292.30117,0.000299692153930664],[[[3],[["_key","ShortText"],["time","Time"]],["Monkey",0.0],["Flower",1234567890.12346],["Block",\-1234567890.0]]]]
1182
+ .ft P
1183
+ .fi
1184
+ .SS Longitude and latitude types
1185
+ .sp
1186
+ The longitude and latitude types are divided according to the geographic coordinate system. For more details, see \fB/type\fP. To represent a longitude and latitude, groonga uses a string formatted as follows:
1187
+ .INDENT 0.0
1188
+ .IP \(bu 2
1189
+ "longitude x latitude" in milliseconds (e.g.: "128452975x503157902")
1190
+ .IP \(bu 2
1191
+ "longitude x latitude" in degrees (e.g.: "35.6813819x139.7660839")
1192
+ .UNINDENT
1193
+ .sp
1194
+ A number with/without a decimal point represents a longitude or latitude in milliseconds/degrees respectively. Note that a combination of a number with a decimal point and a number without a decimal point (e.g. 35.1x139) must not be used. A comma (\(aq,\(aq) is also available as a delimiter. The default value is "0x0".
1195
+ .sp
1196
+ The following example creates a WGS84GeoPoint column and updates existing records. The second record has the default value because not updated.
1197
+ .sp
1198
+ Execution example:
1199
+ .sp
1200
+ .nf
1201
+ .ft C
1202
+ > column_create \-\-table ToyBox \-\-name location \-\-type WGS84GeoPoint
1203
+ [[0,1332498292.50467,0.0079643726348877],true]
1204
+ > load \-\-table ToyBox
1205
+ > [
1206
+ > {"_key":"Monkey","location":"128452975x503157902"}
1207
+ > {"_key":"Block","location":"35.6813819x139.7660839"}
1208
+ > ]
1209
+ [[0,1332498292.71385,0.801813840866089],2]
1210
+ > select \-\-table ToyBox \-\-output_columns _key,location
1211
+ [[0,1332498293.71678,0.000298976898193359],[[[3],[["_key","ShortText"],["location","WGS84GeoPoint"]],["Monkey","128452975x503157902"],["Flower","0x0"],["Block","128452975x503157902"]]]]
1212
+ .ft P
1213
+ .fi
1214
+ .SS Reference types
1215
+ .sp
1216
+ Groonga supports a reference column, which stores references to records in its associated table. In practice, a reference column stores the IDs of the referred records in the associated table and enables access to those records.
1217
+ .sp
1218
+ You can specify a column in the associated table to the \fIoutput_columns\fP parameter of a \fB/commands/select\fP command. The format is "Src.Dest" where Src is the name of the reference column and Dest is the name of the target column. If only the reference column is specified, it is handled as "Src._key". Note that if a reference does not point to a valid record, a \fB/commands/select\fP command outputs the default value of the target column.
1219
+ .sp
1220
+ The following example adds a reference column to the Site table that was created in the previous tutorial. The new column, named link, is designed for storing links among records in the Site table.
954
1221
  .sp
955
1222
  Execution example:
956
1223
  .sp
957
1224
  .nf
958
1225
  .ft C
959
1226
  > column_create \-\-table Site \-\-name link \-\-type Site
960
- [[0,1322616295.37864,0.005674045],true]
1227
+ [[0,1332498293.92066,0.00589966773986816],true]
961
1228
  > load \-\-table Site
962
1229
  > [{"_key":"http://example.org/","link":"http://example.net/"}]
963
- [[0,1322616295.5854,0.200879317],1]
1230
+ [[0,1332498294.1274,0.201014280319214],1]
964
1231
  > select \-\-table Site \-\-output_columns _key,title,link._key,link.title \-\-query title:@this
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."]]]]
1232
+ [[0,1332498294.52959,0.00171041488647461],[[[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."]]]]
966
1233
  .ft P
967
1234
  .fi
968
1235
  .sp
969
- このように、linkカラムに他のサイトへの参照を保存することができました。また、参照先の_keytitleカラムの内容を表示することができました。
970
- .SS ベクターカラム
971
- .sp
972
- column_createコマンドでカラムを作成するとき、\-\-flagsオプションでCOLUMN_VECTORフラグを指定すると、複数の値を配列で格納できるカラムが作成されます。
1236
+ The \fItype\fP parameter of the \fB/commands/column_create\fP command specifies the table to be associated with the reference column. In this example, the reference column is associated with the own table. Then, the \fB/commands/load\fP command registers a link from "\fI\%http://example.org\fP" to "\fI\%http://example.net\fP". Note that a reference column requires the primary key, not the ID, of the record to be referred to. After that, the link is confirmed by the \fB/commands/select\fP command. In this case, the primary key and the title of the referred record are output because link._key and link.title are specified to the \fIoutput_columns\fP parameter.
1237
+ .SS Vector types
973
1238
  .sp
974
- テーブル型で配列を格納するカラムは、1対多の参照関係を表すのに有効です。
1239
+ Groonga supports a vector column, in which each element can store a variable number of values. To create a vector column, specify the COLUMN_VECTOR flag to the \fIflags\fP parameter of a \fB/commands/column_create\fP command. A vector column is useful to represent a many\-to\-many relationship.
975
1240
  .sp
976
- テーブル型のチュートリアルでは、Siteテーブルに手を加え、どのサイトをリンクしているのかを保存しました。しかし、通常は1つのサイトから多くのサイトにリンクが張られています。複数のリンク情報を格納するために、複数の参照関係を保存するカラムを作成してみましょう。
977
- .sp
978
- 他のテーブルを参照するベクターカラムにデータを入力する場合には、参照先のテーブルの_keyカラムの値の「配列」を代入する必要があります。
1241
+ The previous example used a regular column, so each record could have at most one link. Obviously, the specification is insufficient because a site usually has more than one links. To solve this problem, the following example uses a vector column.
979
1242
  .sp
980
1243
  Execution example:
981
1244
  .sp
982
1245
  .nf
983
1246
  .ft C
984
1247
  > column_create \-\-table Site \-\-name links \-\-flags COLUMN_VECTOR \-\-type Site
985
- [[0,1322616296.19238,0.007598942],true]
1248
+ [[0,1332498294.7353,0.00729537010192871],true]
986
1249
  > load \-\-table Site
987
1250
  > [{"_key":"http://example.org/","links":["http://example.net/","http://example.org/","http://example.com/"]}]
988
- [[0,1322616296.40092,0.201036234],1]
1251
+ [[0,1332498294.94353,0.200709581375122],1]
989
1252
  > select \-\-table Site \-\-output_columns _key,title,links._key,links.title \-\-query title:@this
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."]]]]]
1253
+ [[0,1332498295.34514,0.00077366828918457],[[[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."]]]]]
991
1254
  .ft P
992
1255
  .fi
993
1256
  .sp
994
- このように、複数の参照関係が保存できました。また、output_columnsによって、複数の参照先のカラム値も表示させることができました。
1257
+ The only difference at the first step is the \fIflags\fP parameter that specifies to create a vector column. The \fItype\fP parameter of the \fB/commands/column_create\fP command is the same as in the previous example. Then, the \fB/commands/load\fP command registers three links from "\fI\%http://example.org/\fP" to "\fI\%http://example.net/\fP", "\fI\%http://example.org/\fP" and "\fI\%http://example.com/\fP". After that, the links are confirmed by the \fB/commands/select\fP command. In this case, the primary keys and the titles are output as arrays because links._key and links.title are specified to the \fIoutput_columns\fP parameter.
995
1258
  .SS さまざまな検索条件の指定
996
1259
  .sp
997
1260
  groongaは、JavaScriptに似た文法での条件絞込や、計算した値を用いたソートを行うことができます。また、位置情報(緯度・経度)を用いた絞込・ソートを行うことができます。
@@ -5741,6 +6004,33 @@ find any records.
5741
6004
  .B Default:
5742
6005
  \fBauto\fP
5743
6006
  .UNINDENT
6007
+ .TP
6008
+ .B \fBsimilar_search\fP
6009
+ It specifies whether optional similar search is used or not
6010
+ in correction.
6011
+ .sp
6012
+ Here are available values:
6013
+ .INDENT 7.0
6014
+ .INDENT 3.5
6015
+ .INDENT 0.0
6016
+ .TP
6017
+ .B \fByes\fP
6018
+ Similar search is always used.
6019
+ .TP
6020
+ .B \fBno\fP
6021
+ Similar search is never used.
6022
+ .TP
6023
+ .B \fBauto\fP
6024
+ Similar search is used only when other search can\(aqt
6025
+ find any records.
6026
+ .UNINDENT
6027
+ .UNINDENT
6028
+ .UNINDENT
6029
+ .INDENT 7.0
6030
+ .TP
6031
+ .B Default:
6032
+ \fBauto\fP
6033
+ .UNINDENT
5744
6034
  .UNINDENT
5745
6035
  .SS RETURN VALUE
5746
6036
  .SS JSON format
@@ -6260,123 +6550,132 @@ groongaのデータベースでは、テーブルの主キーや、カラムの
6260
6550
  \fBObject\fP
6261
6551
  .INDENT 0.0
6262
6552
  .INDENT 3.5
6263
- 任意のテーブルに属する全てのレコード [1]
6553
+ 任意のテーブルに属する全てのレコードです。 [1]
6264
6554
  .UNINDENT
6265
6555
  .UNINDENT
6266
6556
  .sp
6267
6557
  \fBBool\fP
6268
6558
  .INDENT 0.0
6269
6559
  .INDENT 3.5
6270
- bool型。trueとfalse
6560
+ ブーリアン型やブール型などと呼ばれる型であり、真偽値を表します。取り得る値はtrueとfalseです。(デフォルト値: false)
6561
+ .sp
6562
+ \fB/commands/load\fP コマンドで値を格納するときは、false、0、空文字列のいずれかを指定するとfalseになり、それ以外を指定するとtrueになります。
6271
6563
  .UNINDENT
6272
6564
  .UNINDENT
6273
6565
  .sp
6274
6566
  \fBInt8\fP
6275
6567
  .INDENT 0.0
6276
6568
  .INDENT 3.5
6277
- 8bit符号付き整数。
6569
+ 8bit符号付き整数であり、\-128以上127以下の整数を表します。(デフォルト値: 0)
6278
6570
  .UNINDENT
6279
6571
  .UNINDENT
6280
6572
  .sp
6281
6573
  \fBUInt8\fP
6282
6574
  .INDENT 0.0
6283
6575
  .INDENT 3.5
6284
- 8bit符号なし整数。
6576
+ 8bit符号なし整数であり、0以上255以下の整数を表します。(デフォルト値: 0)
6285
6577
  .UNINDENT
6286
6578
  .UNINDENT
6287
6579
  .sp
6288
6580
  \fBInt16\fP
6289
6581
  .INDENT 0.0
6290
6582
  .INDENT 3.5
6291
- 16bit符号付き整数。
6583
+ 16bit符号付き整数であり、\-32,768以上32,767以下の整数を表します。(デフォルト値: 0)
6292
6584
  .UNINDENT
6293
6585
  .UNINDENT
6294
6586
  .sp
6295
6587
  \fBUInt16\fP
6296
6588
  .INDENT 0.0
6297
6589
  .INDENT 3.5
6298
- 16bit符号なし整数。
6590
+ 16bit符号なし整数であり、0以上65,535以下の整数を表します。(デフォルト値: 0)
6299
6591
  .UNINDENT
6300
6592
  .UNINDENT
6301
6593
  .sp
6302
6594
  \fBInt32\fP
6303
6595
  .INDENT 0.0
6304
6596
  .INDENT 3.5
6305
- 32bit符号付き整数。
6597
+ 32bit符号付き整数であり、\-2,147,483,648以上2,147,483,647以下の整数を表します。(デフォルト値: 0)
6306
6598
  .UNINDENT
6307
6599
  .UNINDENT
6308
6600
  .sp
6309
6601
  \fBUInt32\fP
6310
6602
  .INDENT 0.0
6311
6603
  .INDENT 3.5
6312
- 32bit符号なし整数。
6604
+ 32bit符号なし整数であり、0以上4,294,967,295以下の整数を表します。(デフォルト値: 0)
6313
6605
  .UNINDENT
6314
6606
  .UNINDENT
6315
6607
  .sp
6316
6608
  \fBInt64\fP
6317
6609
  .INDENT 0.0
6318
6610
  .INDENT 3.5
6319
- 64bit符号付き整数。
6611
+ 64bit符号付き整数であり、\-9,223,372,036,854,775,808以上9,223,372,036,854,775,807以下の整数を表します。(デフォルト値: 0)
6320
6612
  .UNINDENT
6321
6613
  .UNINDENT
6322
6614
  .sp
6323
6615
  \fBUInt64\fP
6324
6616
  .INDENT 0.0
6325
6617
  .INDENT 3.5
6326
- 64bit符号なし整数。
6618
+ 64bit符号なし整数であり、0以上18,446,744,073,709,551,615以下の整数を表します。(デフォルト値: 0)
6327
6619
  .UNINDENT
6328
6620
  .UNINDENT
6329
6621
  .sp
6330
6622
  \fBFloat\fP
6331
6623
  .INDENT 0.0
6332
6624
  .INDENT 3.5
6333
- ieee754形式の64bit浮動小数点数。
6625
+ IEEE 754形式の倍精度浮動小数点数であり、実数を表します。(デフォルト値: 0.0)
6626
+ .sp
6627
+ IEEE 754形式の詳細については、 \fI\%IEEE 754 - Wikipedia\fP や \fI\%IEEE 754: Standard for Binary Floating-Point\fP を参照してください。
6334
6628
  .UNINDENT
6335
6629
  .UNINDENT
6336
6630
  .sp
6337
6631
  \fBTime\fP
6338
6632
  .INDENT 0.0
6339
6633
  .INDENT 3.5
6340
- 1970年1月1日0時0分0秒からの経過マイクロ秒数を64bit符号付き整数で表現した値。
6634
+ 日時を表す型であり、1970年1月1日0時0分0秒からの経過時間を、マイクロ秒単位で64bit符号付き整数により表現します。(デフォルト値: 0)
6635
+ .sp
6636
+ \fB/commands/load\fP コマンドで値を格納するときは、1970年1月1日0時0分0秒からの経過秒数を指定します。秒単位より詳細な日時を指定するには、小数を使います。
6341
6637
  .UNINDENT
6342
6638
  .UNINDENT
6343
6639
  .sp
6344
6640
  \fBShortText\fP
6345
6641
  .INDENT 0.0
6346
6642
  .INDENT 3.5
6347
- 4Kbyte以下の文字列。
6643
+ 4,095バイト以下の文字列を表します。(デフォルト値: "")
6348
6644
  .UNINDENT
6349
6645
  .UNINDENT
6350
6646
  .sp
6351
6647
  \fBText\fP
6352
6648
  .INDENT 0.0
6353
6649
  .INDENT 3.5
6354
- 64Kbyte以下の文字列。
6650
+ 65,535バイト以下の文字列を表します。(デフォルト値: "")
6355
6651
  .UNINDENT
6356
6652
  .UNINDENT
6357
6653
  .sp
6358
6654
  \fBLongText\fP
6359
6655
  .INDENT 0.0
6360
6656
  .INDENT 3.5
6361
- 2Gbyte以下の文字列。
6657
+ 2,147,483,647バイト以下の文字列を表します。(デフォルト値: "")
6362
6658
  .UNINDENT
6363
6659
  .UNINDENT
6364
6660
  .sp
6365
6661
  \fBTokyoGeoPoint\fP
6366
6662
  .INDENT 0.0
6367
6663
  .INDENT 3.5
6368
- 日本測地系緯度経度座標。緯度と経度はミリ秒単位での整数。
6369
- "経度のミリ秒x緯度のミリ秒"という文字列表現を持つ。
6370
- 度分秒形式であれば、x度y分z秒は(((x * 60) + y) * 60 + z) * 1000という計算式で変換した値を代入します。
6664
+ 旧日本測地系による経緯度であり、経度と緯度をミリ秒単位で表現した整数の組により表現します。(デフォルト値: 0x0)
6665
+ .sp
6666
+ 度分秒形式でx度y分z秒となる経度・緯度は、(((x * 60) + y) * 60 + z) * 1000という計算式でミリ秒単位へと変換されます。
6667
+ \fB/commands/load\fP コマンドで値を格納するときは、"ミリ秒単位の経度xミリ秒単位の緯度" もしくは "経度の小数表記x緯度の小数表記" という文字列表現を使って指定します。経度と緯度の区切りとしては、\(aqx\(aq のほかに \(aq,\(aq を使うことができます。
6668
+ .sp
6669
+ 測地系の詳細については、 \fI\%測地系 - Wikipedia\fP を参照してください。
6371
6670
  .UNINDENT
6372
6671
  .UNINDENT
6373
6672
  .sp
6374
6673
  \fBWGS84GeoPoint\fP
6375
6674
  .INDENT 0.0
6376
6675
  .INDENT 3.5
6377
- 世界測地系緯度経度座標。緯度と経度はミリ秒単位での整数。
6378
- "経度のミリ秒x緯度のミリ秒"という文字列表現を持つ。
6379
- 度分秒形式であれば、x度y分z秒は(((x * 60) + y) * 60 + z) * 1000という計算式で変換した値を代入します。
6676
+ 世界測地系(World Geodetic System, WGS 84)による経緯度であり、経度と緯度をミリ秒単位で表現した整数の組により表現します。(デフォルト値: 0x0)
6677
+ .sp
6678
+ 度分秒形式からミリ秒形式への変換方法や \fB/commands/load\fP コマンドにおける指定方法はTokyoGeoPointと同じです。
6380
6679
  .UNINDENT
6381
6680
  .UNINDENT
6382
6681
  .SS 型に関する制限事項