rroonga 2.0.2-x86-mingw32 → 2.0.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (398) hide show
  1. data/AUTHORS +5 -0
  2. data/Gemfile +1 -12
  3. data/README.textile +73 -0
  4. data/Rakefile +4 -57
  5. data/bin/grndump +11 -1
  6. data/ext/groonga/extconf.rb +125 -54
  7. data/ext/groonga/rb-grn-context.c +25 -7
  8. data/ext/groonga/rb-grn-database.c +25 -0
  9. data/ext/groonga/rb-grn-object.c +19 -7
  10. data/ext/groonga/rb-grn-table.c +8 -10
  11. data/ext/groonga/rb-grn.h +9 -2
  12. data/lib/1.8/groonga.so +0 -0
  13. data/lib/1.9/groonga.so +0 -0
  14. data/lib/groonga/dumper.rb +2 -2
  15. data/lib/groonga/expression-builder.rb +33 -18
  16. data/rroonga-build.rb +1 -1
  17. data/vendor/local/bin/groonga-benchmark.exe +0 -0
  18. data/vendor/local/bin/groonga.exe +0 -0
  19. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  20. data/vendor/local/bin/libgroonga-0.dll +0 -0
  21. data/vendor/local/bin/libmecab-1.dll +0 -0
  22. data/vendor/local/bin/libmsgpack-3.dll +0 -0
  23. data/vendor/local/bin/libmsgpackc-2.dll +0 -0
  24. data/vendor/local/bin/libstdc++-6.dll +0 -0
  25. data/vendor/local/bin/mecab-config +0 -0
  26. data/vendor/local/bin/mecab.exe +0 -0
  27. data/vendor/local/include/groonga/groonga.h +5 -5
  28. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  29. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  30. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  31. data/vendor/local/lib/groonga/plugins/suggest/suggest.la +0 -0
  32. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  33. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  34. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  35. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +0 -0
  36. data/vendor/local/lib/libgroonga.a +0 -0
  37. data/vendor/local/lib/libgroonga.dll.a +0 -0
  38. data/vendor/local/lib/libgroonga.la +0 -0
  39. data/vendor/local/lib/libmecab.a +0 -0
  40. data/vendor/local/lib/libmecab.dll.a +0 -0
  41. data/vendor/local/lib/libmecab.la +0 -0
  42. data/vendor/local/lib/libmsgpack.a +0 -0
  43. data/vendor/local/lib/libmsgpack.dll.a +0 -0
  44. data/vendor/local/lib/libmsgpack.la +0 -0
  45. data/vendor/local/lib/libmsgpackc.a +0 -0
  46. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  47. data/vendor/local/lib/libmsgpackc.la +0 -0
  48. data/vendor/local/lib/pkgconfig/groonga.pc +4 -4
  49. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  50. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  51. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  52. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  53. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  54. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  55. data/vendor/local/share/doc/groonga/en/html/_sources/commands/select.txt +349 -109
  56. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +41 -10
  57. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +71 -0
  58. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +1 -1
  59. data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +154 -4
  60. data/vendor/local/share/doc/groonga/en/html/_static/underscore.js +21 -29
  61. data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
  62. data/vendor/local/share/doc/groonga/en/html/command_version.html +5 -5
  63. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +5 -5
  64. data/vendor/local/share/doc/groonga/en/html/commands/check.html +5 -5
  65. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +5 -5
  66. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +5 -5
  67. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +5 -5
  68. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +5 -5
  69. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +5 -5
  70. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +5 -5
  71. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +5 -5
  72. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +5 -5
  73. data/vendor/local/share/doc/groonga/en/html/commands/load.html +5 -5
  74. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +5 -5
  75. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +5 -5
  76. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +5 -5
  77. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +5 -5
  78. data/vendor/local/share/doc/groonga/en/html/commands/select.html +683 -162
  79. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +5 -5
  80. data/vendor/local/share/doc/groonga/en/html/commands/status.html +5 -5
  81. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +170 -12
  82. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +5 -5
  83. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +5 -5
  84. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +5 -5
  85. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +5 -5
  86. data/vendor/local/share/doc/groonga/en/html/commands.html +5 -5
  87. data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
  88. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
  89. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
  90. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
  91. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
  92. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
  93. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
  94. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
  95. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
  96. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
  97. data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
  98. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +5 -5
  99. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +5 -5
  100. data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +5 -5
  101. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +5 -5
  102. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +5 -5
  103. data/vendor/local/share/doc/groonga/en/html/executables.html +5 -5
  104. data/vendor/local/share/doc/groonga/en/html/expr.html +5 -5
  105. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +5 -5
  106. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +5 -5
  107. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +5 -5
  108. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +5 -5
  109. data/vendor/local/share/doc/groonga/en/html/functions/now.html +5 -5
  110. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +5 -5
  111. data/vendor/local/share/doc/groonga/en/html/functions.html +5 -5
  112. data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
  113. data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
  114. data/vendor/local/share/doc/groonga/en/html/index.html +23 -16
  115. data/vendor/local/share/doc/groonga/en/html/indexing.html +95 -14
  116. data/vendor/local/share/doc/groonga/en/html/install.html +67 -37
  117. data/vendor/local/share/doc/groonga/en/html/limitations.html +9 -9
  118. data/vendor/local/share/doc/groonga/en/html/log.html +5 -5
  119. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
  120. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
  121. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
  122. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
  123. data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
  124. data/vendor/local/share/doc/groonga/en/html/news.html +161 -25
  125. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  126. data/vendor/local/share/doc/groonga/en/html/output.html +5 -5
  127. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +5 -5
  128. data/vendor/local/share/doc/groonga/en/html/reference.html +5 -5
  129. data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
  130. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  131. data/vendor/local/share/doc/groonga/en/html/spec/search.html +22 -22
  132. data/vendor/local/share/doc/groonga/en/html/spec.html +13 -11
  133. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +33 -6
  134. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +33 -6
  135. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
  136. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +37 -6
  137. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
  138. data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
  139. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
  140. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
  141. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +293 -29
  142. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
  143. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +340 -27
  144. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
  145. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
  146. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +282 -24
  147. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +524 -15
  148. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +103 -8
  149. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +128 -13
  150. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +155 -17
  151. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
  152. data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
  153. data/vendor/local/share/doc/groonga/en/html/type.html +5 -5
  154. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  155. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/select.txt +349 -109
  156. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +41 -10
  157. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +71 -0
  158. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +1 -1
  159. data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +154 -4
  160. data/vendor/local/share/doc/groonga/ja/html/_static/underscore.js +21 -29
  161. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
  162. data/vendor/local/share/doc/groonga/ja/html/command_version.html +5 -5
  163. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +5 -5
  164. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +5 -5
  165. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +5 -5
  166. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +5 -5
  167. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +5 -5
  168. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +5 -5
  169. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +5 -5
  170. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +5 -5
  171. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +5 -5
  172. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +5 -5
  173. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +5 -5
  174. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +5 -5
  175. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +5 -5
  176. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +5 -5
  177. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +5 -5
  178. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +601 -162
  179. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +5 -5
  180. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +5 -5
  181. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +170 -12
  182. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +5 -5
  183. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +5 -5
  184. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +5 -5
  185. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +5 -5
  186. data/vendor/local/share/doc/groonga/ja/html/commands.html +5 -5
  187. data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
  188. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
  189. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
  190. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
  191. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
  192. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
  193. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
  194. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
  195. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
  196. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
  197. data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
  198. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +5 -5
  199. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +5 -5
  200. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +5 -5
  201. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +5 -5
  202. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +5 -5
  203. data/vendor/local/share/doc/groonga/ja/html/executables.html +5 -5
  204. data/vendor/local/share/doc/groonga/ja/html/expr.html +5 -5
  205. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +5 -5
  206. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +5 -5
  207. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +5 -5
  208. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +5 -5
  209. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +5 -5
  210. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +5 -5
  211. data/vendor/local/share/doc/groonga/ja/html/functions.html +5 -5
  212. data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
  213. data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
  214. data/vendor/local/share/doc/groonga/ja/html/index.html +23 -16
  215. data/vendor/local/share/doc/groonga/ja/html/indexing.html +95 -14
  216. data/vendor/local/share/doc/groonga/ja/html/install.html +66 -37
  217. data/vendor/local/share/doc/groonga/ja/html/limitations.html +9 -9
  218. data/vendor/local/share/doc/groonga/ja/html/log.html +5 -5
  219. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
  220. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
  221. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
  222. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
  223. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
  224. data/vendor/local/share/doc/groonga/ja/html/news.html +147 -25
  225. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  226. data/vendor/local/share/doc/groonga/ja/html/output.html +5 -5
  227. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +5 -5
  228. data/vendor/local/share/doc/groonga/ja/html/reference.html +5 -5
  229. data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
  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 +22 -22
  232. data/vendor/local/share/doc/groonga/ja/html/spec.html +13 -11
  233. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +33 -6
  234. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +33 -6
  235. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
  236. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +37 -6
  237. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
  238. data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
  239. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
  240. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
  241. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +292 -28
  242. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
  243. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +340 -27
  244. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
  245. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
  246. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +282 -24
  247. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +524 -15
  248. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +103 -8
  249. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +128 -13
  250. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +155 -17
  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 +5 -5
  253. data/vendor/local/share/doc/groonga/ja/html/type.html +5 -5
  254. data/vendor/local/share/doc/groonga/source/commands/select.txt +349 -109
  255. data/vendor/local/share/doc/groonga/source/commands/suggest-completion.log +28 -1
  256. data/vendor/local/share/doc/groonga/source/commands/suggest-correction.log +28 -1
  257. data/vendor/local/share/doc/groonga/source/commands/suggest-learn-completion.log +1 -1
  258. data/vendor/local/share/doc/groonga/source/commands/suggest-learn-correction.log +1 -1
  259. data/vendor/local/share/doc/groonga/source/commands/suggest-learn-suggestion.log +1 -1
  260. data/vendor/local/share/doc/groonga/source/commands/suggest-mixed.log +74 -1
  261. data/vendor/local/share/doc/groonga/source/commands/suggest-suggestion.log +32 -1
  262. data/vendor/local/share/doc/groonga/source/conf.py +3 -3
  263. data/vendor/local/share/doc/groonga/source/example/completion-1.log +28 -1
  264. data/vendor/local/share/doc/groonga/source/example/correction-1.log +28 -1
  265. data/vendor/local/share/doc/groonga/source/example/suggestion-1.log +32 -1
  266. data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +1 -1
  267. data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +38 -3
  268. data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +46 -4
  269. data/vendor/local/share/doc/groonga/source/example/tutorial/data-4.log +38 -3
  270. data/vendor/local/share/doc/groonga/source/example/tutorial/data-5.log +38 -3
  271. data/vendor/local/share/doc/groonga/source/example/tutorial/data-6.log +38 -3
  272. data/vendor/local/share/doc/groonga/source/example/tutorial/data-7.log +40 -3
  273. data/vendor/local/share/doc/groonga/source/example/tutorial/data-8.log +48 -3
  274. data/vendor/local/share/doc/groonga/source/example/tutorial/index-1.log +6 -6
  275. data/vendor/local/share/doc/groonga/source/example/tutorial/index-2.log +100 -3
  276. data/vendor/local/share/doc/groonga/source/example/tutorial/index-3.log +5 -5
  277. data/vendor/local/share/doc/groonga/source/example/tutorial/index-4.log +80 -2
  278. data/vendor/local/share/doc/groonga/source/example/tutorial/index-5.log +75 -1
  279. data/vendor/local/share/doc/groonga/source/example/tutorial/index-6.log +31 -4
  280. data/vendor/local/share/doc/groonga/source/example/tutorial/index-7.log +38 -1
  281. data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-1.log +7 -7
  282. data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-2.log +132 -3
  283. data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-3.log +6 -6
  284. data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-4.log +132 -3
  285. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-1.log +32 -1
  286. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-10.log +95 -1
  287. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-2.log +32 -1
  288. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-3.log +32 -1
  289. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-4.log +86 -1
  290. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-5.log +32 -1
  291. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-6.log +70 -1
  292. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-7.log +51 -1
  293. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-8.log +55 -1
  294. data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-9.log +34 -1
  295. data/vendor/local/share/doc/groonga/source/example/tutorial/network-1.log +18 -1
  296. data/vendor/local/share/doc/groonga/source/example/tutorial/network-3.log +80 -2
  297. data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-1.log +34 -3
  298. data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-2.log +89 -5
  299. data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-1.log +8 -8
  300. data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-2.log +66 -2
  301. data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-3.log +76 -2
  302. data/vendor/local/share/doc/groonga/source/install.txt +41 -10
  303. data/vendor/local/share/doc/groonga/source/news.txt +71 -0
  304. data/vendor/local/share/doc/groonga/source/tutorial/data.txt +1 -1
  305. data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +0 -0
  306. data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +1 -1
  307. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro-import.sh +0 -0
  308. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +1 -1
  309. data/vendor/local/share/groonga/examples/dictionary/gene95/gene-import.sh +0 -0
  310. data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +1 -1
  311. data/vendor/local/share/groonga/examples/dictionary/init-db.sh +0 -0
  312. data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +1 -1
  313. data/vendor/local/share/groonga/html/admin/css/{admin.css → groonga-admin.css} +5 -4
  314. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  315. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  316. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  317. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  318. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  319. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  320. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  321. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  322. data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ffd27a_256x240.png → redmond/images/ui-icons_217bc0_256x240.png} +0 -0
  323. data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_222222_256x240.png → redmond/images/ui-icons_2e83ff_256x240.png} +0 -0
  324. data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_228ef1_256x240.png → redmond/images/ui-icons_469bdd_256x240.png} +0 -0
  325. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
  326. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
  327. data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ef8c08_256x240.png → redmond/images/ui-icons_d8e7f3_256x240.png} +0 -0
  328. data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
  329. data/vendor/local/share/groonga/html/admin/css/{ui-lightness/jquery-ui-1.8.1.custom.css → redmond/jquery-ui-1.8.18.custom.css} +169 -90
  330. data/vendor/local/share/groonga/html/admin/images/groonga.svg +121 -0
  331. data/vendor/local/share/groonga/html/admin/index.html +44 -1145
  332. data/vendor/local/share/groonga/html/admin/js/groonga-admin.js +1354 -0
  333. data/vendor/local/share/groonga/html/admin/js/jquery-1.7.2.min.js +4 -0
  334. data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.18.custom.min.js +356 -0
  335. data/vendor/local/share/man/ja/man1/groonga.1 +2813 -331
  336. data/vendor/local/share/man/man1/groonga.1 +2898 -337
  337. data/vendor/local/share/mecab/dic/naist-jdic/sys.dic +0 -0
  338. data/vendor/local/share/mecab/dic/naist-jdic/unk.dic +0 -0
  339. metadata +988 -921
  340. data/test/groonga-test-utils.rb +0 -139
  341. data/test/run-test.rb +0 -60
  342. data/test/test-accessor.rb +0 -36
  343. data/test/test-array.rb +0 -123
  344. data/test/test-column.rb +0 -350
  345. data/test/test-command-select.rb +0 -147
  346. data/test/test-context.rb +0 -130
  347. data/test/test-database-dumper.rb +0 -259
  348. data/test/test-database.rb +0 -148
  349. data/test/test-double-array-trie.rb +0 -164
  350. data/test/test-encoding.rb +0 -33
  351. data/test/test-exception.rb +0 -96
  352. data/test/test-expression-builder.rb +0 -269
  353. data/test/test-expression.rb +0 -134
  354. data/test/test-fix-size-column.rb +0 -77
  355. data/test/test-gqtp.rb +0 -70
  356. data/test/test-hash.rb +0 -344
  357. data/test/test-index-column.rb +0 -180
  358. data/test/test-index-cursor.rb +0 -93
  359. data/test/test-logger.rb +0 -37
  360. data/test/test-pagination.rb +0 -249
  361. data/test/test-patricia-trie.rb +0 -415
  362. data/test/test-plugin.rb +0 -35
  363. data/test/test-procedure.rb +0 -37
  364. data/test/test-query-log.rb +0 -258
  365. data/test/test-record.rb +0 -569
  366. data/test/test-remote.rb +0 -63
  367. data/test/test-schema-create-table.rb +0 -267
  368. data/test/test-schema-dumper.rb +0 -235
  369. data/test/test-schema-type.rb +0 -208
  370. data/test/test-schema-view.rb +0 -90
  371. data/test/test-schema.rb +0 -886
  372. data/test/test-snippet.rb +0 -130
  373. data/test/test-table-cursor.rb +0 -187
  374. data/test/test-table-dumper.rb +0 -83
  375. data/test/test-table-offset-and-limit.rb +0 -100
  376. data/test/test-table-select-mecab.rb +0 -80
  377. data/test/test-table-select-normalize.rb +0 -57
  378. data/test/test-table-select-weight.rb +0 -123
  379. data/test/test-table-select.rb +0 -191
  380. data/test/test-table.rb +0 -675
  381. data/test/test-type.rb +0 -79
  382. data/test/test-variable-size-column.rb +0 -147
  383. data/test/test-variable.rb +0 -28
  384. data/test/test-vector-column.rb +0 -76
  385. data/test/test-version.rb +0 -61
  386. data/test/test-view.rb +0 -72
  387. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  388. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  389. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  390. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  391. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  392. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  393. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  394. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  395. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  396. data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  397. data/vendor/local/share/groonga/html/admin/js/jquery-1.4.2.min.js +0 -154
  398. data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.1.custom.min.js +0 -756
data/test/test-schema.rb DELETED
@@ -1,886 +0,0 @@
1
- # Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
2
- #
3
- # This library is free software; you can redistribute it and/or
4
- # modify it under the terms of the GNU Lesser General Public
5
- # License version 2.1 as published by the Free Software Foundation.
6
- #
7
- # This library is distributed in the hope that it will be useful,
8
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10
- # Lesser General Public License for more details.
11
- #
12
- # You should have received a copy of the GNU Lesser General Public
13
- # License along with this library; if not, write to the Free Software
14
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
-
16
- class SchemaTest < Test::Unit::TestCase
17
- include GroongaTestUtils
18
-
19
- setup :setup_database
20
-
21
- def test_remove_table
22
- Groonga::Array.create(:name => "Posts")
23
- assert_not_nil(context["Posts"])
24
- Groonga::Schema.remove_table("Posts")
25
- assert_nil(context["Posts"])
26
- end
27
-
28
- def test_remove_not_existing_table
29
- assert_raise(Groonga::Schema::TableNotExists) do
30
- Groonga::Schema.remove_table("NotExistingTable")
31
- end
32
- end
33
-
34
- def test_remove_not_existing_column
35
- create_table = Proc.new do |&block|
36
- Groonga::Schema.create_table("Posts", :type => :hash) do |table|
37
- block.call(table)
38
- end
39
- end
40
-
41
- create_table.call do |table|
42
- end
43
-
44
- assert_raise(Groonga::Schema::ColumnNotExists) do
45
- create_table.call do |table|
46
- table.remove_column("not_existing_column")
47
- end
48
- end
49
- end
50
-
51
- def test_path_canonicalization
52
- directory = @tmp_dir.to_s
53
- table_filename = "hash.groonga"
54
-
55
- canonical_path = directory + "/#{table_filename}"
56
- uncanonical_path = directory + "/./#{table_filename}"
57
-
58
- Groonga::Schema.create_table("Posts",
59
- :type => :hash,
60
- :key_type => "integer",
61
- :path => canonical_path) do |table|
62
- end
63
-
64
- assert_nothing_raised do
65
- Groonga::Schema.create_table("Posts",
66
- :type => :hash,
67
- :key_type => "integer",
68
- :path => uncanonical_path) do |table|
69
- end
70
- end
71
- end
72
-
73
- class DefineHashTest < self
74
- def test_default
75
- Groonga::Schema.create_table("Posts", :type => :hash) do |table|
76
- end
77
- posts = context["Posts"]
78
- assert_kind_of(Groonga::Hash, posts)
79
- assert_equal("#{@database_path}.0000100", posts.path)
80
- end
81
-
82
- def test_named_path
83
- Groonga::Schema.create_table("Posts",
84
- :type => :hash,
85
- :named_path => true) do |table|
86
- end
87
- posts = context["Posts"]
88
- assert_kind_of(Groonga::Hash, posts)
89
- assert_equal("#{@database_path}.tables/Posts", posts.path)
90
- end
91
-
92
- def test_full_option
93
- path = @tmp_dir + "hash.groonga"
94
- tokenizer = context["TokenTrigram"]
95
- Groonga::Schema.create_table("Posts",
96
- :type => :hash,
97
- :key_type => "integer",
98
- :path => path.to_s,
99
- :value_type => "UInt32",
100
- :default_tokenizer => tokenizer,
101
- :named_path => true) do |table|
102
- end
103
- table = context["Posts"]
104
- assert_equal("#<Groonga::Hash " +
105
- "id: <#{table.id}>, " +
106
- "name: <Posts>, " +
107
- "path: <#{path}>, " +
108
- "domain: <Int32>, " +
109
- "range: <UInt32>, " +
110
- "flags: <>, " +
111
- "encoding: <#{Groonga::Encoding.default.inspect}>, " +
112
- "size: <0>>",
113
- table.inspect)
114
- assert_equal(tokenizer, table.default_tokenizer)
115
- end
116
-
117
- def test_rename
118
- Groonga::Schema.create_table("Posts", :type => :hash) do |table|
119
- end
120
- posts = context["Posts"]
121
- assert_kind_of(Groonga::Hash, posts)
122
- Groonga::Schema.rename_table("Posts", "Entries") do |table|
123
- end
124
- entries = context["Entries"]
125
- assert_kind_of(Groonga::Hash, entries)
126
- assert_equal("Entries", posts.name)
127
- end
128
- end
129
-
130
- class DefinePatriciaTrieTest < self
131
- def test_default
132
- Groonga::Schema.create_table("Posts", :type => :patricia_trie) do |table|
133
- end
134
- posts = context["Posts"]
135
- assert_kind_of(Groonga::PatriciaTrie, posts)
136
- assert_equal("#{@database_path}.0000100", posts.path)
137
- end
138
-
139
- def test_named_path
140
- Groonga::Schema.create_table("Posts",
141
- :type => :patricia_trie,
142
- :named_path => true) do |table|
143
- end
144
- posts = context["Posts"]
145
- assert_kind_of(Groonga::PatriciaTrie, posts)
146
- assert_equal("#{@database_path}.tables/Posts", posts.path)
147
- end
148
-
149
- def test_full_option
150
- path = @tmp_dir + "patricia-trie.groonga"
151
- Groonga::Schema.create_table("Posts",
152
- :type => :patricia_trie,
153
- :key_type => "integer",
154
- :path => path.to_s,
155
- :value_type => "Float",
156
- :default_tokenizer => "TokenBigram",
157
- :key_normalize => true,
158
- :key_with_sis => true,
159
- :named_path => true) do |table|
160
- end
161
- table = context["Posts"]
162
- assert_equal("#<Groonga::PatriciaTrie " +
163
- "id: <#{table.id}>, " +
164
- "name: <Posts>, " +
165
- "path: <#{path}>, " +
166
- "domain: <Int32>, " +
167
- "range: <Float>, " +
168
- "flags: <KEY_WITH_SIS|KEY_NORMALIZE|WITH_SECTION>, " +
169
- "encoding: <#{Groonga::Encoding.default.inspect}>, " +
170
- "size: <0>>",
171
- table.inspect)
172
- assert_equal(context["TokenBigram"], table.default_tokenizer)
173
- end
174
-
175
- def test_rename
176
- Groonga::Schema.create_table("Posts", :type => :patricia_trie) do |table|
177
- end
178
- posts = context["Posts"]
179
- assert_kind_of(Groonga::PatriciaTrie, posts)
180
- Groonga::Schema.rename_table("Posts", "Entries") do |table|
181
- end
182
- entries = context["Entries"]
183
- assert_kind_of(Groonga::PatriciaTrie, entries)
184
- assert_equal("Entries", posts.name)
185
- end
186
- end
187
-
188
- class DefineDoubleArrayTrieTest < self
189
- def test_default
190
- Groonga::Schema.create_table("Posts",
191
- :type => :double_array_trie) do |table|
192
- end
193
- posts = context["Posts"]
194
- assert_kind_of(Groonga::DoubleArrayTrie, posts)
195
- assert_equal("#{@database_path}.0000100", posts.path)
196
- end
197
-
198
- def test_named_path
199
- Groonga::Schema.create_table("Posts",
200
- :type => :double_array_trie,
201
- :named_path => true) do |table|
202
- end
203
- posts = context["Posts"]
204
- assert_kind_of(Groonga::DoubleArrayTrie, posts)
205
- assert_equal("#{@database_path}.tables/Posts", posts.path)
206
- end
207
-
208
- def test_full_option
209
- path = @tmp_dir + "patricia-trie.groonga"
210
- Groonga::Schema.create_table("Posts",
211
- :type => :double_array_trie,
212
- :key_type => "integer",
213
- :path => path.to_s,
214
- :value_type => "Float",
215
- :default_tokenizer => "TokenBigram",
216
- :key_normalize => true,
217
- :named_path => true) do |table|
218
- end
219
- table = context["Posts"]
220
- assert_equal("#<Groonga::DoubleArrayTrie " +
221
- "id: <#{table.id}>, " +
222
- "name: <Posts>, " +
223
- "path: <#{path}>, " +
224
- "domain: <Int32>, " +
225
- "range: <Float>, " +
226
- "flags: <KEY_NORMALIZE|WITH_SECTION>, " +
227
- "encoding: <#{Groonga::Encoding.default.inspect}>, " +
228
- "size: <0>>",
229
- table.inspect)
230
- assert_equal(context["TokenBigram"], table.default_tokenizer)
231
- end
232
-
233
- def test_rename
234
- Groonga::Schema.create_table("Posts", :type => :double_array_trie) do |table|
235
- end
236
- posts = context["Posts"]
237
- assert_kind_of(Groonga::DoubleArrayTrie, posts)
238
- Groonga::Schema.rename_table("Posts", "Entries") do |table|
239
- end
240
- entries = context["Entries"]
241
- assert_kind_of(Groonga::DoubleArrayTrie, entries)
242
- assert_equal("Entries", posts.name)
243
- end
244
- end
245
-
246
- class DefineArrayTest < self
247
- def test_default
248
- Groonga::Schema.create_table("Posts", :type => :array) do |table|
249
- end
250
- posts = context["Posts"]
251
- assert_kind_of(Groonga::Array, posts)
252
- assert_equal("#{@database_path}.0000100", posts.path)
253
- end
254
-
255
- def test_named_path
256
- Groonga::Schema.create_table("Posts",
257
- :type => :array,
258
- :named_path => true) do |table|
259
- end
260
- posts = context["Posts"]
261
- assert_kind_of(Groonga::Array, posts)
262
- assert_equal("#{@database_path}.tables/Posts", posts.path)
263
- end
264
-
265
- def test_full_option
266
- path = @tmp_dir + "array.groonga"
267
- Groonga::Schema.create_table("Posts",
268
- :type => :array,
269
- :path => path.to_s,
270
- :value_type => "Int32",
271
- :named_path => true) do |table|
272
- end
273
- table = context["Posts"]
274
- assert_equal("#<Groonga::Array " +
275
- "id: <#{table.id}>, " +
276
- "name: <Posts>, " +
277
- "path: <#{path}>, " +
278
- "domain: <Int32>, " +
279
- "range: <Int32>, " +
280
- "flags: <>, " +
281
- "size: <0>>",
282
- table.inspect)
283
- end
284
-
285
- def test_rename
286
- Groonga::Schema.create_table("Posts", :type => :array) do |table|
287
- end
288
- posts = context["Posts"]
289
- assert_kind_of(Groonga::Array, posts)
290
- Groonga::Schema.rename_table("Posts", "Entries") do |table|
291
- end
292
- entries = context["Entries"]
293
- assert_kind_of(Groonga::Array, entries)
294
- assert_equal("Entries", posts.name)
295
- end
296
- end
297
-
298
- class DefineColumnTest < self
299
- def test_default
300
- Groonga::Schema.create_table("Posts") do |table|
301
- table.column("rate", :int)
302
- end
303
-
304
- column_name = "Posts.rate"
305
- column = context[column_name]
306
- assert_kind_of(Groonga::FixSizeColumn, column)
307
- assert_equal("#{@database_path}.0000101", column.path)
308
- end
309
-
310
- def test_named_path
311
- Groonga::Schema.create_table("Posts") do |table|
312
- table.column("rate", :int, :named_path => true)
313
- end
314
-
315
- column_name = "Posts.rate"
316
- column = context[column_name]
317
- assert_kind_of(Groonga::FixSizeColumn, column)
318
- assert_equal("#{@database_path}.0000100.columns/rate", column.path)
319
- end
320
-
321
- def test_full_option
322
- path = @tmp_dir + "column.groonga"
323
- type = Groonga::Type.new("Niku", :size => 29)
324
- Groonga::Schema.create_table("Posts") do |table|
325
- table.column("rate",
326
- type,
327
- :path => path.to_s,
328
- :persistent => true,
329
- :type => :vector,
330
- :compress => :lzo)
331
- end
332
-
333
- column_name = "Posts.rate"
334
- column = context[column_name]
335
- assert_equal("#<Groonga::VariableSizeColumn " +
336
- "id: <#{column.id}>, " +
337
- "name: <#{column_name}>, " +
338
- "path: <#{path}>, " +
339
- "domain: <Posts>, " +
340
- "range: <Niku>, " +
341
- "flags: <COMPRESS_LZO>>",
342
- column.inspect)
343
- end
344
- end
345
-
346
- def test_integer8_column
347
- assert_nil(context["Posts.rate"])
348
- Groonga::Schema.create_table("Posts") do |table|
349
- table.integer8 :rate
350
- end
351
- assert_equal(context["Int8"], context["Posts.rate"].range)
352
- end
353
-
354
- def test_integer16_column
355
- assert_nil(context["Posts.rate"])
356
- Groonga::Schema.create_table("Posts") do |table|
357
- table.integer16 :rate
358
- end
359
- assert_equal(context["Int16"], context["Posts.rate"].range)
360
- end
361
-
362
- def test_integer32_column
363
- assert_nil(context["Posts.rate"])
364
- Groonga::Schema.create_table("Posts") do |table|
365
- table.integer32 :rate
366
- end
367
- assert_equal(context["Int32"], context["Posts.rate"].range)
368
- end
369
-
370
- def test_integer64_column
371
- assert_nil(context["Posts.rate"])
372
- Groonga::Schema.create_table("Posts") do |table|
373
- table.integer64 :rate
374
- end
375
- assert_equal(context["Int64"], context["Posts.rate"].range)
376
- end
377
-
378
- def test_unsigned_integer8_column
379
- assert_nil(context["Posts.n_viewed"])
380
- Groonga::Schema.create_table("Posts") do |table|
381
- table.unsigned_integer8 :n_viewed
382
- end
383
- assert_equal(context["UInt8"], context["Posts.n_viewed"].range)
384
- end
385
-
386
- def test_unsigned_integer16_column
387
- assert_nil(context["Posts.n_viewed"])
388
- Groonga::Schema.create_table("Posts") do |table|
389
- table.unsigned_integer16 :n_viewed
390
- end
391
- assert_equal(context["UInt16"], context["Posts.n_viewed"].range)
392
- end
393
-
394
- def test_unsigned_integer32_column
395
- assert_nil(context["Posts.n_viewed"])
396
- Groonga::Schema.create_table("Posts") do |table|
397
- table.unsigned_integer32 :n_viewed
398
- end
399
- assert_equal(context["UInt32"], context["Posts.n_viewed"].range)
400
- end
401
-
402
- def test_unsigned_integer64_column
403
- assert_nil(context["Posts.n_viewed"])
404
- Groonga::Schema.create_table("Posts") do |table|
405
- table.unsigned_integer64 :n_viewed
406
- end
407
- assert_equal(context["UInt64"], context["Posts.n_viewed"].range)
408
- end
409
-
410
- def test_float_column
411
- assert_nil(context["Posts.rate"])
412
- Groonga::Schema.create_table("Posts") do |table|
413
- table.float :rate
414
- end
415
- assert_equal(context["Float"], context["Posts.rate"].range)
416
- end
417
-
418
- def test_time_column
419
- assert_nil(context["Posts.last_modified"])
420
- Groonga::Schema.create_table("Posts") do |table|
421
- table.time :last_modified
422
- end
423
- assert_equal(context["Time"], context["Posts.last_modified"].range)
424
- end
425
-
426
- def test_timestamps
427
- assert_nil(context["Posts.created_at"])
428
- assert_nil(context["Posts.updated_at"])
429
- Groonga::Schema.create_table("Posts") do |table|
430
- table.timestamps
431
- end
432
- assert_equal(context["Time"], context["Posts.created_at"].range)
433
- assert_equal(context["Time"], context["Posts.updated_at"].range)
434
- end
435
-
436
- def test_short_text_column
437
- assert_nil(context["Posts.title"])
438
- Groonga::Schema.create_table("Posts") do |table|
439
- table.short_text :title
440
- end
441
- assert_equal(context["ShortText"], context["Posts.title"].range)
442
- end
443
-
444
- def test_text_column
445
- assert_nil(context["Posts.comment"])
446
- Groonga::Schema.create_table("Posts") do |table|
447
- table.text :comment
448
- end
449
- assert_equal(context["Text"], context["Posts.comment"].range)
450
- end
451
-
452
- def test_long_text_column
453
- assert_nil(context["Posts.content"])
454
- Groonga::Schema.create_table("Posts") do |table|
455
- table.long_text :content
456
- end
457
- assert_equal(context["LongText"], context["Posts.content"].range)
458
- end
459
-
460
- def test_boolean_column
461
- assert_nil(context["Posts.public"])
462
- Groonga::Schema.create_table("Posts") do |table|
463
- table.boolean :public
464
- end
465
- assert_equal(context["Bool"], context["Posts.public"].range)
466
- end
467
-
468
- def test_tokyo_geo_point_column
469
- assert_nil(context["Posts.location"])
470
- Groonga::Schema.create_table("Posts") do |table|
471
- table.tokyo_geo_point :location
472
- end
473
- assert_equal(context["TokyoGeoPoint"], context["Posts.location"].range)
474
- end
475
-
476
- def test_wgs84_geo_point_column
477
- assert_nil(context["Posts.location"])
478
- Groonga::Schema.create_table("Posts") do |table|
479
- table.wgs84_geo_point :location
480
- end
481
- assert_equal(context["WGS84GeoPoint"], context["Posts.location"].range)
482
- end
483
-
484
- def test_geo_point_column
485
- assert_nil(context["Posts.location"])
486
- Groonga::Schema.create_table("Posts") do |table|
487
- table.geo_point :location
488
- end
489
- assert_equal(context["WGS84GeoPoint"], context["Posts.location"].range)
490
- end
491
-
492
- def test_remove_column
493
- Groonga::Schema.create_table("Posts") do |table|
494
- table.long_text :content
495
- end
496
- assert_not_nil(context["Posts.content"])
497
-
498
- Groonga::Schema.remove_column("Posts", "content")
499
- assert_nil(context["Posts.content"])
500
- end
501
-
502
- def test_rename_column
503
- Groonga::Schema.create_table("Posts") do |table|
504
- table.long_text :content
505
- end
506
- content = context["Posts.content"]
507
- assert_equal("Posts.content", content.name)
508
-
509
- Groonga::Schema.rename_column("Posts", "content", "body")
510
- body = context["Posts.body"]
511
- assert_equal("Posts.body", body.name)
512
- assert_equal("Posts.body", content.name)
513
- end
514
-
515
- class DefineColumnAgainTest < self
516
- def test_same_option
517
- Groonga::Schema.create_table("Posts") do |table|
518
- table.text :content
519
- end
520
-
521
- assert_nothing_raised do
522
- Groonga::Schema.create_table("Posts") do |table|
523
- table.text :content
524
- end
525
- end
526
- end
527
-
528
- def test_difference_type
529
- Groonga::Schema.create_table("Posts") do |table|
530
- table.text :content
531
- end
532
-
533
- assert_raise(Groonga::Schema::ColumnCreationWithDifferentOptions) do
534
- Groonga::Schema.create_table("Posts") do |table|
535
- table.integer :content
536
- end
537
- end
538
- end
539
-
540
- def test_same_option_by_groonga_object
541
- Groonga::Schema.create_table("Posts") do |table|
542
- table.text :content
543
- end
544
-
545
- assert_nothing_raised do
546
- Groonga::Schema.create_table("Posts") do |table|
547
- table.column(:content, Groonga["Text"])
548
- end
549
- end
550
- end
551
- end
552
-
553
- class DefineIndexColumnTest < self
554
- def test_default
555
- assert_nil(context["Terms.content"])
556
- Groonga::Schema.create_table("Posts") do |table|
557
- table.long_text :content
558
- end
559
- Groonga::Schema.create_table("Terms") do |table|
560
- table.index "Posts.content"
561
- end
562
- index_column = context["Terms.Posts_content"]
563
- assert_equal([context["Posts.content"]],
564
- index_column.sources)
565
- assert_equal("#{@database_path}.0000103", index_column.path)
566
- end
567
-
568
- def test_named_path
569
- assert_nil(context["Terms.content"])
570
- Groonga::Schema.create_table("Posts") do |table|
571
- table.long_text :content
572
- end
573
- Groonga::Schema.create_table("Terms") do |table|
574
- table.index "Posts.content", :named_path => true
575
- end
576
- index_column = context["Terms.Posts_content"]
577
- assert_equal([context["Posts.content"]],
578
- index_column.sources)
579
- assert_equal("#{@database_path}.0000102.columns/Posts_content",
580
- index_column.path)
581
- end
582
-
583
- def test_full_option
584
- path = @tmp_dir + "index-column.groonga"
585
- assert_nil(context["Terms.content"])
586
- index_column_name = "Posts_index"
587
-
588
- Groonga::Schema.create_table("Posts") do |table|
589
- table.long_text :content
590
- end
591
- Groonga::Schema.create_table("Terms") do |table|
592
- table.index("Posts.content",
593
- :name => index_column_name,
594
- :path => path.to_s,
595
- :persistent => true,
596
- :with_section => true,
597
- :with_weight => true,
598
- :with_position => true,
599
- :named_path => true)
600
- end
601
-
602
- full_index_column_name = "Terms.#{index_column_name}"
603
- index_column = context[full_index_column_name]
604
- assert_equal("#<Groonga::IndexColumn " +
605
- "id: <#{index_column.id}>, " +
606
- "name: <#{full_index_column_name}>, " +
607
- "path: <#{path}>, " +
608
- "domain: <Terms>, " +
609
- "range: <Posts>, " +
610
- "flags: <WITH_SECTION|WITH_WEIGHT|WITH_POSITION>>",
611
- index_column.inspect)
612
- end
613
-
614
- def test_again
615
- Groonga::Schema.create_table("Posts") do |table|
616
- table.long_text :content
617
- end
618
- Groonga::Schema.create_table("Terms") do |table|
619
- table.index "Posts.content"
620
- end
621
-
622
- assert_nothing_raised do
623
- Groonga::Schema.create_table("Terms") do |table|
624
- table.index "Posts.content"
625
- end
626
- end
627
- end
628
-
629
- def test_again_with_difference_source
630
- Groonga::Schema.create_table("Posts") do |table|
631
- table.long_text :content
632
- table.short_text :name
633
- end
634
- Groonga::Schema.create_table("Terms") do |table|
635
- table.index "Posts.content"
636
- end
637
-
638
- assert_raise(Groonga::Schema::ColumnCreationWithDifferentOptions) do
639
- Groonga::Schema.create_table("Terms") do |table|
640
- table.index "Posts.name", :name => "Posts_content"
641
- end
642
- end
643
- end
644
-
645
- def test_key
646
- Groonga::Schema.create_table("Posts",
647
- :type => :hash,
648
- :key_type => "ShortText") do |table|
649
- end
650
- Groonga::Schema.create_table("Terms") do |table|
651
- table.index "Posts._key", :with_position => true
652
- end
653
-
654
- full_index_column_name = "Terms.Posts__key"
655
- index_column = context[full_index_column_name]
656
- assert_equal("#<Groonga::IndexColumn " +
657
- "id: <#{index_column.id}>, " +
658
- "name: <#{full_index_column_name}>, " +
659
- "path: <#{index_column.path}>, " +
660
- "domain: <Terms>, " +
661
- "range: <Posts>, " +
662
- "flags: <WITH_POSITION>>",
663
- index_column.inspect)
664
- end
665
-
666
- def test_key_again
667
- Groonga::Schema.create_table("Posts",
668
- :type => :hash,
669
- :key_type => "ShortText") do |table|
670
- end
671
- Groonga::Schema.create_table("Terms") do |table|
672
- table.index "Posts._key", :with_position => true
673
- end
674
-
675
- assert_nothing_raised do
676
- Groonga::Schema.create_table("Terms") do |table|
677
- table.index "Posts._key"
678
- end
679
- end
680
- end
681
-
682
- def test_remove
683
- Groonga::Schema.create_table("Posts") do |table|
684
- table.long_text :content
685
- end
686
- Groonga::Schema.create_table("Terms") do |table|
687
- table.index "Posts.content"
688
- end
689
- assert_equal([context["Posts.content"]],
690
- context["Terms.Posts_content"].sources)
691
- Groonga::Schema.change_table("Terms") do |table|
692
- table.remove_index("Posts.content")
693
- end
694
- assert_nil(context["Terms.Posts_content"])
695
- end
696
-
697
- def test_rename
698
- Groonga::Schema.create_table("Posts") do |table|
699
- table.long_text :content
700
- end
701
- Groonga::Schema.create_table("Terms") do |table|
702
- table.index "Posts.content"
703
- end
704
- index = context["Terms.Posts_content"]
705
- assert_equal([context["Posts.content"]], index.sources)
706
- Groonga::Schema.change_table("Terms") do |table|
707
- table.rename_column("Posts_content", "posts_content_index")
708
- end
709
- renamed_index = context["Terms.posts_content_index"]
710
- assert_equal("Terms.posts_content_index", renamed_index.name)
711
- assert_equal("Terms.posts_content_index", index.name)
712
- assert_equal([context["Posts.content"]], renamed_index.sources)
713
- end
714
- end
715
-
716
- def test_reference_guess
717
- Groonga::Schema.define do |schema|
718
- schema.create_table("Items", :type => :hash) do |table|
719
- table.short_text("title")
720
- end
721
-
722
- schema.create_table("Users", :type => :hash) do |table|
723
- table.reference("item")
724
- end
725
- end
726
-
727
- assert_equal(context["Items"], context["Users.item"].range)
728
- end
729
-
730
- def test_reference_ungeussable
731
- candidates = ["item", "items", "Items"]
732
- exception =
733
- Groonga::Schema::UnguessableReferenceTable.new("item", candidates)
734
- assert_raise(exception) do
735
- Groonga::Schema.define do |schema|
736
- schema.create_table("Users", :type => :hash) do |table|
737
- table.reference("item")
738
- end
739
- end
740
- end
741
- end
742
-
743
- def test_explicit_context_create_table
744
- context = Groonga::Context.default
745
- Groonga::Context.default = nil
746
-
747
- Groonga::Schema.define(:context => context) do |schema|
748
- schema.create_table('Items', :type => :hash) do |table|
749
- table.text("text")
750
- end
751
- schema.create_table("TermsText",
752
- :type => :patricia_trie,
753
- :key_normalize => true,
754
- :default_tokenizer => "TokenBigram") do |table|
755
- table.index('Items.text')
756
- end
757
- end
758
-
759
- assert_not_nil(context["Items.text"])
760
- assert_not_nil(context["TermsText.Items_text"])
761
- assert_nil(Groonga::Context.default["Items.text"])
762
- assert_nil(Groonga::Context.default["TermsText.Items_text"])
763
- end
764
-
765
- def test_default_tokenizer_name_shortcut
766
- Groonga::Schema.define do |schema|
767
- schema.create_table("Terms",
768
- :type => :patricia_trie,
769
- :key_normalize => true,
770
- :default_tokenizer => :bigram) do |table|
771
- end
772
- end
773
-
774
- assert_equal(Groonga["TokenBigram"], Groonga["Terms"].default_tokenizer)
775
- end
776
-
777
- def test_duplicated_shortcut_name
778
- short_text = Groonga::Type.new("short_text", :size => 1024)
779
- Groonga::Schema.define do |schema|
780
- schema.create_table("Users",
781
- :type => :patricia_trie,
782
- :key_normalize => true,
783
- :key_type => :short_text) do |table|
784
- end
785
- end
786
-
787
- assert_equal(short_text, Groonga["Users"].domain)
788
- end
789
-
790
- class RemoveTest < self
791
- def test_tables_directory_removed_on_last_table_remove
792
- table_name = "Posts"
793
- Groonga::Schema.create_table(table_name, :named_path => true)
794
- table = Groonga[table_name]
795
- tables_directory = Pathname.new(table.path).dirname
796
-
797
- assert_directory_not_removed(tables_directory)
798
- Groonga::Schema.remove_table(table_name)
799
- assert_directory_removed(tables_directory)
800
- end
801
-
802
- def test_tables_directory_not_removed_on_not_last_table_remove
803
- table_name = "Posts"
804
- Groonga::Schema.define(:named_path => true) do |schema|
805
- schema.create_table(table_name)
806
- schema.create_table("Users")
807
- end
808
-
809
- table = Groonga[table_name]
810
- tables_directory = Pathname.new(table.path).dirname
811
-
812
- assert_directory_not_removed(tables_directory)
813
- Groonga::Schema.remove_table(table_name)
814
- assert_directory_not_removed(tables_directory)
815
- end
816
-
817
- def test_columns_directory_removed
818
- table = "Posts"
819
- dir = create_table_with_column(table, :named_path => true)
820
-
821
- Groonga::Schema.remove_table(table)
822
-
823
- assert_table_removed(table)
824
- assert_directory_removed(dir)
825
- end
826
- end
827
-
828
- class ColumnRemoveTest < self
829
- def test_columns_directory_removed_on_last_column_remove
830
- Groonga::Schema.define(:named_path => true) do |schema|
831
- schema.create_table("Posts") do |table|
832
- table.short_text("title")
833
- end
834
- end
835
-
836
- columns_directory = columns_directory_path(Groonga["Posts"])
837
- assert_directory_not_removed(columns_directory)
838
- Groonga::Schema.change_table("Posts") do |table|
839
- table.remove_column("title")
840
- end
841
- assert_directory_removed(columns_directory)
842
- end
843
-
844
- def test_columns_directory_not_removed_on_not_last_column_remove
845
- Groonga::Schema.define(:named_path => true) do |schema|
846
- schema.create_table("Posts") do |table|
847
- table.short_text("title")
848
- table.short_text("body")
849
- end
850
- end
851
-
852
- columns_directory = columns_directory_path(Groonga["Posts"])
853
- assert_directory_not_removed(columns_directory)
854
- Groonga::Schema.change_table("Posts") do |table|
855
- table.remove_column("title")
856
- end
857
- assert_directory_not_removed(columns_directory)
858
- end
859
- end
860
-
861
- private
862
- def columns_directory_path(table)
863
- "#{table.path}.columns"
864
- end
865
-
866
- def create_table_with_column(name, options={})
867
- Groonga::Schema.create_table(name, options) do |table|
868
- table.integer64 :rate
869
- end
870
- context = Groonga::Context.default
871
- columns_directory_path(context[name])
872
- end
873
-
874
- def assert_directory_removed(dir)
875
- assert_not_predicate(Pathname.new(dir), :exist?)
876
- end
877
-
878
- def assert_directory_not_removed(dir)
879
- assert_predicate(Pathname.new(dir), :exist?)
880
- end
881
-
882
- def assert_table_removed(name)
883
- context = Groonga::Context.default
884
- assert_nil(context[name])
885
- end
886
- end