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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. data/Rakefile +33 -2
  2. data/benchmark/common.rb +2 -2
  3. data/benchmark/read-write-many-small-items.rb +71 -62
  4. data/benchmark/write-many-small-items.rb +61 -53
  5. data/ext/groonga/rb-grn-context.c +23 -5
  6. data/ext/groonga/rb-grn-index-column.c +2 -6
  7. data/ext/groonga/rb-grn-operator.c +31 -1
  8. data/ext/groonga/rb-grn-variable-size-column.c +77 -1
  9. data/ext/groonga/rb-grn.h +2 -11
  10. data/ext/groonga/rb-groonga.c +1 -2
  11. data/lib/1.8/groonga.so +0 -0
  12. data/lib/1.9/groonga.so +0 -0
  13. data/lib/groonga/command.rb +169 -0
  14. data/lib/groonga/context.rb +4 -124
  15. data/lib/groonga/dumper.rb +10 -8
  16. data/lib/groonga/record.rb +7 -0
  17. data/lib/groonga/schema.rb +98 -7
  18. data/rroonga-build.rb +3 -3
  19. data/test/{test-context-select.rb → test-command-select.rb} +3 -3
  20. data/test/test-record.rb +18 -1
  21. data/test/test-schema-dumper.rb +48 -0
  22. data/test/test-schema-type.rb +35 -0
  23. data/test/test-schema.rb +81 -11
  24. data/test/test-table-select.rb +49 -38
  25. data/test/test-variable-size-column.rb +30 -0
  26. data/vendor/local/bin/grntest.exe +0 -0
  27. data/vendor/local/bin/groonga.exe +0 -0
  28. data/vendor/local/bin/libgroonga-0.dll +0 -0
  29. data/vendor/local/bin/libmecab-1.dll +0 -0
  30. data/vendor/local/bin/mecab.exe +0 -0
  31. data/vendor/local/include/groonga/groonga/plugin.h +3 -2
  32. data/vendor/local/include/groonga/groonga.h +106 -78
  33. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  34. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  35. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  36. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  37. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  38. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  39. data/vendor/local/lib/libgroonga.a +0 -0
  40. data/vendor/local/lib/libgroonga.dll.a +0 -0
  41. data/vendor/local/lib/libmecab.a +0 -0
  42. data/vendor/local/lib/libmecab.dll.a +0 -0
  43. data/vendor/local/lib/pkgconfig/groonga.pc +5 -2
  44. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  45. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  46. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  47. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  48. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  49. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  50. data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +42 -32
  51. data/vendor/local/share/doc/groonga/en/html/_sources/commands/delete.txt +5 -1
  52. data/vendor/local/share/doc/groonga/en/html/_sources/commands/table_create.txt +5 -2
  53. data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +4 -3
  54. data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +8 -6
  55. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt +42 -3
  56. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_in_circle.txt +26 -1
  57. data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +2 -2
  58. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +102 -27
  59. data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +10 -10
  60. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +130 -21
  61. data/vendor/local/share/doc/groonga/en/html/_sources/output.txt +164 -0
  62. data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
  63. data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +0 -5
  64. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -4
  65. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +1 -3
  66. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +2 -1
  67. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +95 -116
  68. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +1 -4
  69. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +1 -4
  70. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -0
  71. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -2
  72. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -0
  73. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +3 -0
  74. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial.txt +2 -2
  75. data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +3 -3
  76. data/vendor/local/share/doc/groonga/en/html/_static/basic.css +13 -1
  77. data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +5 -5
  78. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +11 -7
  79. data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
  80. data/vendor/local/share/doc/groonga/en/html/characteristic.html +60 -52
  81. data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
  82. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
  83. data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
  84. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
  85. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
  86. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
  87. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
  88. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
  89. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
  90. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +38 -35
  91. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
  92. data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
  93. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
  94. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
  95. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
  96. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
  97. data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
  98. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
  99. data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
  100. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +36 -36
  101. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +38 -36
  102. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
  103. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
  104. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
  105. data/vendor/local/share/doc/groonga/en/html/commands.html +41 -41
  106. data/vendor/local/share/doc/groonga/en/html/community.html +14 -12
  107. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
  108. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
  109. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
  110. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
  111. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
  112. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
  113. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
  114. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
  115. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
  116. data/vendor/local/share/doc/groonga/en/html/contribution.html +15 -13
  117. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +7 -7
  118. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +7 -7
  119. data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +7 -7
  120. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +12 -12
  121. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +7 -7
  122. data/vendor/local/share/doc/groonga/en/html/executables.html +7 -7
  123. data/vendor/local/share/doc/groonga/en/html/expr.html +25 -25
  124. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
  125. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +71 -36
  126. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +53 -33
  127. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
  128. data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
  129. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
  130. data/vendor/local/share/doc/groonga/en/html/functions.html +22 -22
  131. data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
  132. data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +7 -7
  133. data/vendor/local/share/doc/groonga/en/html/index.html +92 -87
  134. data/vendor/local/share/doc/groonga/en/html/install.html +109 -40
  135. data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -19
  136. data/vendor/local/share/doc/groonga/en/html/log.html +21 -21
  137. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
  138. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
  139. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
  140. data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
  141. data/vendor/local/share/doc/groonga/en/html/news.html +233 -112
  142. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  143. data/vendor/local/share/doc/groonga/en/html/output.html +302 -0
  144. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +21 -21
  145. data/vendor/local/share/doc/groonga/en/html/reference.html +59 -55
  146. data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
  147. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  148. data/vendor/local/share/doc/groonga/en/html/spec/search.html +11 -11
  149. data/vendor/local/share/doc/groonga/en/html/spec.html +11 -11
  150. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +7 -7
  151. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +7 -7
  152. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +7 -7
  153. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +7 -7
  154. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +7 -7
  155. data/vendor/local/share/doc/groonga/en/html/suggest.html +7 -12
  156. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  157. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +11 -11
  158. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +23 -23
  159. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +10 -10
  160. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +10 -10
  161. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +124 -164
  162. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +10 -10
  163. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +10 -10
  164. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +10 -10
  165. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +14 -14
  166. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +10 -10
  167. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +11 -10
  168. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +10 -10
  169. data/vendor/local/share/doc/groonga/en/html/tutorial.html +26 -26
  170. data/vendor/local/share/doc/groonga/en/html/type.html +31 -31
  171. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  172. data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +42 -32
  173. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/delete.txt +5 -1
  174. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/table_create.txt +5 -2
  175. data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +4 -3
  176. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +8 -6
  177. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt +42 -3
  178. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_in_circle.txt +26 -1
  179. data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +2 -2
  180. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +102 -27
  181. data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +10 -10
  182. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +130 -21
  183. data/vendor/local/share/doc/groonga/ja/html/_sources/output.txt +164 -0
  184. data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
  185. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +0 -5
  186. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -4
  187. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +1 -3
  188. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +2 -1
  189. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +95 -116
  190. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +1 -4
  191. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +1 -4
  192. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -0
  193. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -2
  194. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -0
  195. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +3 -0
  196. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial.txt +2 -2
  197. data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +3 -3
  198. data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +13 -1
  199. data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +5 -5
  200. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +11 -7
  201. data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
  202. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +55 -47
  203. data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
  204. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
  205. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
  206. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
  207. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
  208. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
  209. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
  210. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
  211. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
  212. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +38 -35
  213. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
  214. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
  215. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
  216. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
  217. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
  218. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
  219. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
  220. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
  221. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
  222. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +36 -36
  223. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +38 -36
  224. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
  225. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
  226. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
  227. data/vendor/local/share/doc/groonga/ja/html/commands.html +41 -41
  228. data/vendor/local/share/doc/groonga/ja/html/community.html +10 -8
  229. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
  230. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
  231. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
  232. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
  233. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
  234. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
  235. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
  236. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
  237. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
  238. data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
  239. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +7 -7
  240. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +7 -7
  241. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +7 -7
  242. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +12 -12
  243. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +7 -7
  244. data/vendor/local/share/doc/groonga/ja/html/executables.html +7 -7
  245. data/vendor/local/share/doc/groonga/ja/html/expr.html +25 -25
  246. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
  247. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +71 -36
  248. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +53 -33
  249. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
  250. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
  251. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
  252. data/vendor/local/share/doc/groonga/ja/html/functions.html +22 -22
  253. data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
  254. data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +7 -7
  255. data/vendor/local/share/doc/groonga/ja/html/index.html +84 -79
  256. data/vendor/local/share/doc/groonga/ja/html/install.html +92 -16
  257. data/vendor/local/share/doc/groonga/ja/html/limitations.html +13 -13
  258. data/vendor/local/share/doc/groonga/ja/html/log.html +21 -21
  259. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
  260. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
  261. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
  262. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
  263. data/vendor/local/share/doc/groonga/ja/html/news.html +202 -99
  264. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  265. data/vendor/local/share/doc/groonga/ja/html/output.html +287 -0
  266. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +21 -21
  267. data/vendor/local/share/doc/groonga/ja/html/reference.html +59 -55
  268. data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
  269. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  270. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
  271. data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
  272. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +7 -7
  273. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +7 -7
  274. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +7 -7
  275. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +7 -7
  276. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +7 -7
  277. data/vendor/local/share/doc/groonga/ja/html/suggest.html +7 -11
  278. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  279. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
  280. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +20 -20
  281. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
  282. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
  283. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +93 -115
  284. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
  285. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
  286. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
  287. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +8 -8
  288. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
  289. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -7
  290. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
  291. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -21
  292. data/vendor/local/share/doc/groonga/ja/html/type.html +31 -31
  293. data/vendor/local/share/doc/groonga/source/characteristic.txt +42 -32
  294. data/vendor/local/share/doc/groonga/source/commands/delete.txt +5 -1
  295. data/vendor/local/share/doc/groonga/source/commands/table_create.txt +5 -2
  296. data/vendor/local/share/doc/groonga/source/community.txt +4 -3
  297. data/vendor/local/share/doc/groonga/source/contribution.txt +8 -6
  298. data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +8 -8
  299. data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +4 -4
  300. data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +4 -4
  301. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +3 -15
  302. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +2 -7
  303. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -7
  304. data/vendor/local/share/doc/groonga/source/functions/geo_distance.txt +42 -3
  305. data/vendor/local/share/doc/groonga/source/functions/geo_in_circle.txt +26 -1
  306. data/vendor/local/share/doc/groonga/source/index.txt +2 -2
  307. data/vendor/local/share/doc/groonga/source/install.txt +102 -27
  308. data/vendor/local/share/doc/groonga/source/limitations.txt +10 -10
  309. data/vendor/local/share/doc/groonga/source/news.txt +130 -21
  310. data/vendor/local/share/doc/groonga/source/output.txt +164 -0
  311. data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
  312. data/vendor/local/share/doc/groonga/source/suggest.txt +0 -5
  313. data/vendor/local/share/doc/groonga/source/tutorial/data.txt +6 -4
  314. data/vendor/local/share/doc/groonga/source/tutorial/drilldown.txt +1 -3
  315. data/vendor/local/share/doc/groonga/source/tutorial/index.txt +2 -1
  316. data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +95 -116
  317. data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +1 -4
  318. data/vendor/local/share/doc/groonga/source/tutorial/micro_blog.txt +1 -4
  319. data/vendor/local/share/doc/groonga/source/tutorial/network.txt +3 -0
  320. data/vendor/local/share/doc/groonga/source/tutorial/patricia_trie.txt +1 -2
  321. data/vendor/local/share/doc/groonga/source/tutorial/query_expansion.txt +5 -0
  322. data/vendor/local/share/doc/groonga/source/tutorial/search.txt +3 -0
  323. data/vendor/local/share/doc/groonga/source/tutorial.txt +2 -2
  324. data/vendor/local/share/doc/groonga/source/type.txt +3 -3
  325. data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +1 -0
  326. data/vendor/local/share/groonga/html/admin/index.html +40 -0
  327. data/vendor/local/share/groonga/html/admin/js/jquery.flot-0.7.min.js +6 -0
  328. data/vendor/local/share/groonga/html/admin/js/jquery.flot.license.txt +22 -0
  329. data/vendor/local/share/man/ja/man1/groonga.1 +560 -138
  330. data/vendor/local/share/man/man1/groonga.1 +637 -223
  331. metadata +887 -898
  332. data/ext/groonga/Makefile +0 -184
  333. data/ext/groonga/rb-grn-query.c +0 -260
  334. data/test/test-query.rb +0 -22
@@ -0,0 +1,164 @@
1
+ .. -*- rst -*-
2
+
3
+ .. highlightlang:: none
4
+
5
+ Output
6
+ ======
7
+
8
+ Groonga supports the following output format types:
9
+
10
+ * `JSON <http://www.json.org/>`_
11
+ * `XML <http://www.w3.org/XML/>`_
12
+ * TSV (Tab Separated Values)
13
+ * `MessagePack <http://msgpack.org/>`_
14
+
15
+ JSON is the default output format.
16
+
17
+ Usage
18
+ -----
19
+
20
+ Groonga has the following query interfaces:
21
+
22
+ * command line
23
+ * HTTP
24
+
25
+ They provides different ways to change output format type.
26
+
27
+ Command line
28
+ ^^^^^^^^^^^^
29
+
30
+ You can use command line query interface by ``groonga
31
+ DB_PATH`` or ``groonga -c``. Those groonga commands shows
32
+ ``> `` prompt. In this query interface, you can specify
33
+ output format type by ``output_type`` option.
34
+
35
+ If you don't specify ``output_type`` option, you will get
36
+ a result in JSON format::
37
+
38
+ > status
39
+ [[0,1327721628.10738,0.000131845474243164],{"alloc_count":142,"starttime":1327721626,"uptime":2,"version":"1.2.9-92-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
40
+
41
+ You can specify ``json`` as ``output_type`` value to get a
42
+ result in JSON format explicitly::
43
+
44
+ > status --output_type json
45
+ [[0,1327721639.08321,7.93933868408203e-05],{"alloc_count":144,"starttime":1327721626,"uptime":13,"version":"1.2.9-92-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
46
+
47
+ You need to specify ``xml`` as ``output_type`` value to
48
+ get a result in XML format::
49
+
50
+ > status --output_type xml
51
+ <?xml version="1.0" encoding="utf-8"?>
52
+ <RESULT CODE="0" UP="1327721649.61095" ELAPSED="0.000126361846923828">
53
+ <RESULT>
54
+ <TEXT>alloc_count</TEXT>
55
+ <INT>146</INT>
56
+ <TEXT>starttime</TEXT>
57
+ <INT>1327721626</INT>
58
+ <TEXT>uptime</TEXT>
59
+ <INT>23</INT>
60
+ <TEXT>version</TEXT>
61
+ <TEXT>1.2.9-92-gb87d9f8</TEXT>
62
+ <TEXT>n_queries</TEXT>
63
+ <INT>0</INT>
64
+ <TEXT>cache_hit_rate</TEXT>
65
+ <FLOAT>0.0</FLOAT>
66
+ <TEXT>command_version</TEXT>
67
+ <INT>1</INT>
68
+ <TEXT>default_command_version</TEXT>
69
+ <INT>1</INT>
70
+ <TEXT>max_command_version</TEXT>
71
+ <INT>2</INT></RESULT>
72
+ </RESULT>
73
+
74
+ You need to specify ``tsv`` as ``output_type`` value to
75
+ get a result in TSV format::
76
+
77
+ > status --output_type tsv
78
+ 0 1327721664.82675 0.000113964080810547
79
+ "alloc_count" 146
80
+ "starttime" 1327721626
81
+ "uptime" 38
82
+ "version" "1.2.9-92-gb87d9f8"
83
+ "n_queries" 0
84
+ "cache_hit_rate" 0.0
85
+ "command_version" 1
86
+ "default_command_version" 1
87
+ "max_command_version" 2
88
+ END
89
+
90
+
91
+ You need to specify ``msgpack`` as ``output_type`` value to
92
+ get a result in MessagePack format::
93
+
94
+ > status --output_type msgpack
95
+ (... omitted because MessagePack is binary data format. ...)
96
+
97
+ HTTP
98
+ ^^^^
99
+
100
+ You can use HTTP query interface by ``groonga --protocol
101
+ http -s DB_PATH``. Groonga HTTP server starts on port 10041
102
+ by default. In this query interface, you can specify
103
+ output format type by extension.
104
+
105
+ If you don't specify extension, you will get a result in
106
+ JSON format::
107
+
108
+ % curl http://localhost:10041/d/status
109
+ [[0,1327809294.54311,0.00082087516784668],{"alloc_count":155,"starttime":1327809282,"uptime":12,"version":"1.2.9-92-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
110
+
111
+ You can specify ``json`` as extension to get a result in
112
+ JSON format explicitly::
113
+
114
+ % curl http://localhost:10041/d/status.json
115
+ [[0,1327809319.01929,9.5367431640625e-05],{"alloc_count":157,"starttime":1327809282,"uptime":37,"version":"1.2.9-92-gb87d9f8","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
116
+
117
+ You need to specify ``xml`` as extension to get a result in
118
+ XML format::
119
+
120
+ % curl http://localhost:10041/d/status.xml
121
+ <?xml version="1.0" encoding="utf-8"?>
122
+ <RESULT CODE="0" UP="1327809339.5782" ELAPSED="9.56058502197266e-05">
123
+ <RESULT>
124
+ <TEXT>alloc_count</TEXT>
125
+ <INT>159</INT>
126
+ <TEXT>starttime</TEXT>
127
+ <INT>1327809282</INT>
128
+ <TEXT>uptime</TEXT>
129
+ <INT>57</INT>
130
+ <TEXT>version</TEXT>
131
+ <TEXT>1.2.9-92-gb87d9f8</TEXT>
132
+ <TEXT>n_queries</TEXT>
133
+ <INT>0</INT>
134
+ <TEXT>cache_hit_rate</TEXT>
135
+ <FLOAT>0.0</FLOAT>
136
+ <TEXT>command_version</TEXT>
137
+ <INT>1</INT>
138
+ <TEXT>default_command_version</TEXT>
139
+ <INT>1</INT>
140
+ <TEXT>max_command_version</TEXT>
141
+ <INT>2</INT></RESULT>
142
+ </RESULT>
143
+
144
+ You need to specify ``tsv`` as extension to get a result in
145
+ TSV format::
146
+
147
+ % curl http://localhost:10041/d/status.tsv
148
+ 0 1327809366.84187 8.44001770019531e-05
149
+ "alloc_count" 159
150
+ "starttime" 1327809282
151
+ "uptime" 84
152
+ "version" "1.2.9-92-gb87d9f8"
153
+ "n_queries" 0
154
+ "cache_hit_rate" 0.0
155
+ "command_version" 1
156
+ "default_command_version" 1
157
+ "max_command_version" 2
158
+ END
159
+
160
+ You need to specify ``msgpack`` as extension to get a result
161
+ in MessagePack format::
162
+
163
+ % curl http://localhost:10041/d/status.msgpack
164
+ (... omitted because MessagePack is binary data format. ...)
@@ -9,6 +9,7 @@
9
9
  :maxdepth: 2
10
10
 
11
11
  executables
12
+ output
12
13
  commands
13
14
  type
14
15
  pseudo_column
@@ -5,11 +5,6 @@
5
5
  Suggest
6
6
  =======
7
7
 
8
- .. note::
9
-
10
- The suggest feature specification isn't stable. The
11
- specification may be changed.
12
-
13
8
  Groonga has the suggest feature. This section describes how to use it and how it works.
14
9
 
15
10
  .. toctree::
@@ -4,6 +4,9 @@
4
4
 
5
5
  .. groonga-include : introduction.txt
6
6
 
7
+ .. groonga-command
8
+ .. database: tutorial
9
+
7
10
  さまざまな種類をもったデータの保存
8
11
  ==================================
9
12
 
@@ -19,8 +22,7 @@ groongaでは、数値(整数・小数)や文字列や時刻や経緯度な
19
22
  その他のデータ型の一覧は、 :doc:`/type` を参照してください。
20
23
 
21
24
  .. groonga-command
22
- .. table_remove Type
23
- .. include:: ../example/tutorial/introduction-1.log
25
+ .. include:: ../example/tutorial/data-1.log
24
26
  .. table_create --name Type --flags TABLE_HASH_KEY --key_type ShortText
25
27
  .. column_create --table Type --name number --type Int32
26
28
  .. column_create --table Type --name float --type Float
@@ -43,7 +45,7 @@ table_createで作成したテーブルを、カラムの型として使うこ
43
45
  他のテーブルを参照するカラムにデータを入力する場合には、参照先のテーブルの_keyカラムの値を代入する必要があります。
44
46
 
45
47
  .. groonga-command
46
- .. include:: ../example/tutorial/introduction-2.log
48
+ .. include:: ../example/tutorial/data-2.log
47
49
  .. column_create --table Site --name link --type Site
48
50
  .. load --table Site
49
51
  .. [{"_key":"http://example.org/","link":"http://example.net/"}]
@@ -65,7 +67,7 @@ column_createコマンドでカラムを作成するとき、--flagsオプショ
65
67
  .. FIXME: _idの配列ではダメなのかどうか。検証する。
66
68
 
67
69
  .. groonga-command
68
- .. include:: ../example/tutorial/introduction-3.log
70
+ .. include:: ../example/tutorial/data-3.log
69
71
  .. column_create --table Site --name links --flags COLUMN_VECTOR --type Site
70
72
  .. load --table Site
71
73
  .. [{"_key":"http://example.org/","links":["http://example.net/","http://example.org/","http://example.com/"]}]
@@ -5,9 +5,7 @@
5
5
  .. groonga-include : search.txt
6
6
 
7
7
  .. groonga-command
8
- .. table_remove SiteDomain
9
- .. table_remove SiteCountry
10
-
8
+ .. database: tutorial
11
9
 
12
10
  ドリルダウン
13
11
  ============
@@ -3,8 +3,9 @@
3
3
  .. highlightlang:: none
4
4
 
5
5
  .. groonga-include : drilldown.txt
6
+
6
7
  .. groonga-command
7
- .. table_remove GeoIndex
8
+ .. database: tutorial
8
9
 
9
10
  タグ検索・参照関係の逆引き
10
11
  ==========================
@@ -4,176 +4,164 @@
4
4
 
5
5
  .. groonga-command
6
6
  .. database: tutorial
7
- .. table_remove Site
8
- .. table_remove Terms
9
7
 
10
- Fundamental operation
11
- =====================
8
+ Basic operations
9
+ ================
12
10
 
13
- You can use groonga as a library of programming language C or an executable file.
14
- This tutorial explains how to use groonga as an executable file.
15
- Using its file, you can create and operate databases, start and connect to server, and so on.
11
+ 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.
16
12
 
17
- Create database
18
- ---------------
13
+ Create a database
14
+ -----------------
19
15
 
20
- You can create a new database in the following command.
16
+ You can create a new database with the following command.
21
17
 
22
- Form ::
18
+ Form::
23
19
 
24
20
  groonga -n DB_PATH_NAME
25
21
 
26
- '-n' option specifies to create a database. DB_PATH_NAME specifies full-path of new database.
22
+ The '-n' 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.
27
23
 
28
- Groonga starts as interactive mode after you create a database with this command, and so groonga accepts commands from standard input. This mode is terminated with Ctrl-d.
24
+ 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.
29
25
 
30
26
  Execution example::
31
27
 
32
28
  % groonga -n /tmp/tutorial.db
33
- > ctrl-d
29
+ > Ctrl-d
34
30
  %
35
31
 
36
- Operate database
37
- ----------------
32
+ Operate a database
33
+ ------------------
38
34
 
39
- Form ::
35
+ Form::
40
36
 
41
37
  groonga DB_PATH_NAME [COMMAND]
42
38
 
43
- DB_PATH_NAME specifies full-path of existing database.
44
- If COMMAND is specified, result of COMMAND is returned.
39
+ DB_PATH_NAME specifies the path of a target database.
45
40
 
46
- With no COMMAND, this command starts groonga as interactive-mode.
47
- Groonga of this mode reads a command from standard input evaluates it repeatedly.
48
- This tutorial uses interactive-mode mainly.
41
+ 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.
49
42
 
50
- For example, we will run the `status` command.
51
- This command returns status of groonga's execution.
43
+ Let's try to see the status of a groonga process by using a :doc:`/commands/status` command.
52
44
 
53
45
  .. groonga-command
54
46
  .. include:: ../example/tutorial/introduction-1.log
55
47
  .. .. % groonga -n /tmp/groonga-databases/introduction.db
56
48
  .. status
57
49
 
58
- The mentioned above, results of executed commands are generally JSON style.
59
- The first element in a array of JSON has information of error-code, execution time, and so on.
60
- The second element has a result of exectuted command.
50
+ 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.
61
51
 
62
- Commands
63
- --------
52
+ Command format
53
+ --------------
64
54
 
65
- You can operate database with various commands via execution file of groonga or groonga server.
66
- There are forms of commands in the following::
55
+ Commands for operating a database accept arguments as follows::
67
56
 
68
- Form1: COMMAND ARGUMENT1 ARGUMENT2 ..
57
+ Form_1: COMMAND VALUE_1 VALUE_2 ..
69
58
 
70
- Form2: COMMAND --ARAGUMENT1 VALUE1 --ARGUMENT2 VALUE2 ..
59
+ Form_2: COMMAND --NAME_1 VALUE_1 --NAME_2 VALUE_2 ..
71
60
 
72
- You can mix these forms in commands running.
61
+ In the first form, arguments must be passed in order. This kind of arguments are called positional arguments because the position of each argument determines its meaning.
73
62
 
74
- In Form2, if you want to specify a value including some spaces or symbols("'()/), you should enclose its value with single-quote or double-quote.
63
+ In the second form, you can specify a parameter name with its value. So, the order of arguments is not defined. This kind of arguments are known as named parameters or keyword arguments.
75
64
 
76
- For detail, you can see paragraph of "command" in :doc:`/executables/groonga`.
65
+ If you want to specify a value which contains white-spaces or special characters, such as quotes and parentheses, please enclose the value with single-quotes or double-quotes.
77
66
 
78
- Basicaly commands
79
- -----------------
67
+ For details, see also the paragraph of "command" in :doc:`/executables/groonga`.
68
+
69
+ Basic commands
70
+ --------------
80
71
 
81
72
  :doc:`/commands/status`
82
- Show status of groonga process.
73
+ shows status of a groonga process.
83
74
  :doc:`/commands/table_list`
84
- Show lists of tables defined in a database.
75
+ shows a list of tables in a database.
85
76
  :doc:`/commands/column_list`
86
- Show lists of columns defined in a table.
77
+ shows a list of columns in a table.
87
78
  :doc:`/commands/table_create`
88
- Add table to a database.
79
+ adds a table to a database.
89
80
  :doc:`/commands/column_create`
90
- Add column to a table.
81
+ adds a column to a table.
91
82
  :doc:`/commands/select`
92
- Search and show records included a table.
83
+ searches records from a table and shows the result.
93
84
  :doc:`/commands/load`
94
- Insert record to a table.
85
+ inserts records to a table.
95
86
 
96
- Create table
97
- ------------
87
+ Create a table
88
+ --------------
98
89
 
99
- :doc:`/commands/table_create` creates table.
90
+ A :doc:`/commands/table_create` command creates a table.
100
91
 
101
- In using groonga, to creating tables generally needed master key.
102
- Master key should be specified the types and the way to store.
92
+ In most cases, a table of groonga has a primary key which must be specified with its data type and index type.
103
93
 
104
- We're going to explain the types in tutorial after.
105
- Please imagine it as expressing sort of data.
106
- How to store master key defines speed of search with master key and advisability of begins-with-match search. This is also explained in this tutorial later.
94
+ 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.
107
95
 
108
- For example, we create 'Site' table. This table has master key of ShortText type, and the way to store its key is HASH.
96
+ Let's create a 'Site' table which has a primary key of ShortText. In this example, the index type is HASH.
109
97
 
110
98
  .. groonga-command
111
99
  .. include:: ../example/tutorial/introduction-2.log
112
100
  .. table_create --name Site --flags TABLE_HASH_KEY --key_type ShortText
113
101
 
114
- Search
115
- ------
102
+ View a table
103
+ ------------
116
104
 
117
- :doc:`/commands/select` shows contents of table.
105
+ A :doc:`/commands/select` command shows contents of table.
118
106
 
119
107
  .. groonga-command
120
108
  .. include:: ../example/tutorial/introduction-3.log
121
109
  .. select --table Site
122
110
 
123
- With name of a table, 'select' command shows 10 contents of its table. [0] shows the number of searched records. ["_id","Uint32"] is column named "_id" and type of this column's value is UInt32. ["_key","ShortText"] is "_key" column, type of this column's value is ShortText.
111
+ When only a table is specified, the 'select' command returns the first (at most) 10 records of that table. "[0]" in the result shows the number of records in the 'Site' 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".
124
112
 
125
- 'table_create' command creates table including two columns, '_id' and '_key' first. '_id' has ID-number given automatically by groonga. '_key' column is stored master key. You cannot modify this column's name.
113
+ 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.
126
114
 
127
- Create columns
128
- --------------
115
+ Create a column
116
+ ---------------
129
117
 
130
- :doc:`/commands/column_create` command create columns.
118
+ A :doc:`/commands/column_create` command adds a column to a table.
131
119
 
132
- We add a column named 'comment' that lets us store value whose type is ShortText.
120
+ Let's add a column of ShortText to store titles. You may give a descriptive name 'title' to the column.
133
121
 
134
122
  .. groonga-command
135
123
  .. include:: ../example/tutorial/introduction-4.log
136
124
  .. column_create --table Site --name title --flags COLUMN_SCALAR --type ShortText
137
125
  .. select --table Site
138
126
 
139
- COLUMN_SCALAR means this is normal column.
127
+ The COLUMN_SCALAR flag specifies to add a regular column.
140
128
 
141
- Create terminology table with fulltext-searching
142
- ------------------------------------------------
129
+ Create a lexicon table for full text searches
130
+ ---------------------------------------------
143
131
 
144
- This tutorial explains fulltext searching with entried data in groonga table.
132
+ Let's go on to how to make a full text search.
145
133
 
146
- We need terminology table in fulltext-searching.
147
- Terminology table is a table whose master key's values are words in text.
148
- We create 'Terms' table, it has type of master key value is ShortText.
134
+ 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.
135
+
136
+ The following shows a command which creates a lexicon table named 'Terms'. The data type of its primary key is ShortText.
149
137
 
150
138
  .. groonga-command
151
139
  .. include:: ../example/tutorial/introduction-5.log
152
140
  .. table_create --name Terms --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
153
141
 
154
- Many parameters is specified in this execution example.
155
- You don't hove to understand all parameters.
156
- There are the simple explaination, but you can skipped.
142
+ The table_create command takes many parameters but you don't need to understand all of them. Please skip the next paragraph if you are not interested in how it works.
143
+
144
+ 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 '|'. The 'default_tokenizer' parameter specifies a method for tokenizing text. This example specifies 'TokenBigram' that is generally called 'N-gram'.
157
145
 
158
- In this examples, 'TABLE_PAT_KEY|KEY_NORMALIZE' stores master key in patricia-trie and entries each teminology after nomalized.
159
- The 'default_tokenizer' parametar specifies the way to tokenize target texts. In this examples, we specifies 'TokenBigram' as this parameter, and so we choose 'N-gram' generally called.
146
+ Create an index column for full text search
147
+ -------------------------------------------
160
148
 
161
- Create index-column with fulltext search
162
- ----------------------------------------
149
+ 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.
163
150
 
164
- We will fulltext search 'title' column in 'Site' table. In this case, we create column whose type index in terminology table.
151
+ Let's create an index column for the 'title' column in the 'Site' table.
165
152
 
166
153
  .. groonga-command
167
154
  .. include:: ../example/tutorial/introduction-6.log
168
155
  .. column_create --table Terms --name blog_title --flags COLUMN_INDEX|WITH_POSITION --type Site --source title
169
156
 
170
- This command creates index column 'blog_title' in 'Term' table. '--type' option specifies target indexed table, and '--source' option does target index column.
171
- In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifies that this column is index column for storing information of terminology existing position. This option should be specified 'COLUMN_INDEX|WITH_POSITION' in generally fulltext searching. This tutorial does not deal with the reason why store information of terminology existing position.
157
+ This command creates an index column 'blog_title' in the 'Terms' table. The '--type' option specifies a target table and the '--source' option specifies a target column. Then, 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.
172
158
 
173
159
  Load data
174
160
  ---------
175
161
 
176
- :doc:`/commands/load` is used to load data for groonga database. This command stores json-formatted data in a table.
162
+ A :doc:`/commands/load` command loads JSON-formatted records into a table.
163
+
164
+ The following adds nine records to the 'Site' table.
177
165
 
178
166
  .. groonga-command
179
167
  .. include:: ../example/tutorial/introduction-7.log
@@ -190,7 +178,7 @@ Load data
190
178
  .. {"_key":"http://example.com/vdw","title":"test test record nine."},
191
179
  .. ]
192
180
 
193
- Let's make sure that its table has data with 'select' command.
181
+ Let's make sure that these records are correctly stored.
194
182
 
195
183
  .. groonga-command
196
184
  .. include:: ../example/tutorial/introduction-8.log
@@ -199,69 +187,60 @@ Let's make sure that its table has data with 'select' command.
199
187
  Search data
200
188
  -----------
201
189
 
202
- '_id' and '_key' columns are unique in groonga's table, so let's search data in table using these columns.
190
+ Before a full text search, let's try to search data by '_id' and '_key'. These columns work as unique keys.
203
191
 
204
- You can search data using 'select' command with 'query' parameter.
192
+ You can search records by using a 'select' command with a 'query' parameter.
205
193
 
206
194
  .. groonga-command
207
195
  .. include:: ../example/tutorial/introduction-9.log
208
196
  .. select --table Site --query _id:1
209
197
 
210
- '_id:1' specified 'query' parameter means to search records whose '_id' column has '1'.
198
+ '_id:1' specifies to search a record whose ID is 1.
211
199
 
212
- Let's search records with '_key' column.
200
+ Next, let's search a record by a primary key.
213
201
 
214
202
  .. groonga-command
215
203
  .. include:: ../example/tutorial/introduction-10.log
216
204
  .. select --table Site --query "_key:\"http://example.org/\""
217
205
 
218
- '_key:\"http://example.org/\"' specified 'query' parameter means to search records whose '_key' column has '"http://example.org/"'.
219
-
206
+ '_key:\"http://example.org/\"' specifies to search a record whose primary key is "http://example.org/".
220
207
 
221
- Fulltext searching
222
- ------------------
208
+ Full text search
209
+ ----------------
223
210
 
224
- Using 'query' parameter, you can fulltext search with index.
211
+ It's time to make a full text search. You can make a full text search query with the same 'query' parameter.
225
212
 
226
213
  .. groonga-command
227
214
  .. include:: ../example/tutorial/introduction-11.log
228
215
  .. select --table Site --query title:@this
229
216
 
230
- This command shows result of fulltext searching by string 'this' for 'title' column.
231
-
232
- "title:@this" specified 'query' parameter means to search records whose 'title' column including 'this' string.
217
+ This command searches records whose 'title' column contains a string 'this'. In this case, only one record matches this query. Note that the lower case query 'this' matches a capitalized 'This' in the 1st record because 'KEY_NORMALIZE' was specified in lexicon column creation.
233
218
 
234
- 'select' command has parameter 'match_columns'.
219
+ The 'select' command has an optional parameter 'match_columns'. This parameter specifies default target columns and it is used when target columns are not specified in a query.[1]_
235
220
 
236
- If this parameter is specified, it means to search in columns specified 'match_columns' when 'query' parameter doesn't specify column-name condition.[1]_
237
-
238
- If you specify 'match_columns' is 'title' and 'query' is 'this', you can take same result as above query.
221
+ A combination of '--match_columns title' and '--query this' brings you the same result that '--query title:@this' does.
239
222
 
240
223
  .. groonga-command
241
224
  .. include:: ../example/tutorial/introduction-12.log
242
225
  .. select --table Site --match_columns title --query this
243
226
 
244
- Specify output column
245
- ---------------------
246
-
247
- 'output_columns' parameter in 'select' command specifies columns shown in result of search.
227
+ Specify output columns
228
+ ----------------------
248
229
 
249
- If you want to specify some columns, you should separate column names by comma(,).
230
+ An 'output_columns' parameter in a 'select' 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 (,).
250
231
 
251
232
  .. groonga-command
252
233
  .. include:: ../example/tutorial/introduction-13.log
253
234
  .. select --table Site --output_columns _key,title,_score --query title:@test
254
235
 
255
- "_score" column is added to The groonga's result. This column has the higher number, the more condition of fulltext seaching matches text.
236
+ This command specifies three output columns including the '_score' column, which stores the relevance score of each record.
256
237
 
257
- Ranges to display
258
- -----------------
259
-
260
- 'select' command can display result in only specified ranges using 'offset' and 'limit' parameter. This parameters is useful when you want to show only a page in much result of searching.
238
+ Specify output ranges
239
+ ---------------------
261
240
 
262
- 'offset' parameter specifies starting point of result. If you want 'select' command to return from first records, this parameter specifies '0'.
241
+ A 'select' command returns a part of its search result if 'offset' and/or 'limit' 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.
263
242
 
264
- 'limit' parameter specifies how many records of searching result.
243
+ An 'offset' parameter specifies the starting point and a 'limit' 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.
265
244
 
266
245
  .. groonga-command
267
246
  .. include:: ../example/tutorial/introduction-14.log
@@ -270,23 +249,23 @@ Ranges to display
270
249
  .. select --table Site --offset 7 --limit 3
271
250
 
272
251
  Sort
273
- -----
252
+ ----
274
253
 
275
- If you use 'sortby' parameter in 'select' command, this command sorts result of searching.
254
+ A 'select' command sorts its result when used with a 'sortby' parameter.
276
255
 
277
- When 'sortby' parameter specifies column name, result is sorted in ascending-order to its column's value. This 'select' command also sort in descending-order when you add hyphen(-) before column name.
256
+ A 'sortby' 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.
278
257
 
279
258
  .. groonga-command
280
259
  .. include:: ../example/tutorial/introduction-15.log
281
260
  .. select --table Site --sortby -_id
282
261
 
283
- For condition of sort, you can use '_score' column introduced in the paragraph of "Specify output column".
262
+ You can use the '_score' column as a sorting criteria for ranking a search result.
284
263
 
285
264
  .. groonga-command
286
265
  .. include:: ../example/tutorial/introduction-16.log
287
266
  .. select --table Site --query title:@test --output_columns _id,_score,title --sortby _score
288
267
 
289
- If you want to specify some column names, you should use comma(,) between these names. In this case, when same value of records is existed in first column, this command sorts result of searching to value of second column.
268
+ 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.
290
269
 
291
270
  .. groonga-command
292
271
  .. include:: ../example/tutorial/introduction-17.log
@@ -294,4 +273,4 @@ If you want to specify some column names, you should use comma(,) between these
294
273
 
295
274
  .. rubric:: footnote
296
275
 
297
- .. [1] In now groonga's version, you can only use 'match_columns' parameter in the case of existing index of fulltext searching. This parameter cannot be use in searching for ordinary columns.
276
+ .. [1] Currently, a 'match_columns' parameter is available iff there exists an inverted index for full text search. A 'match_columns' parameter for a regular column is not supported.