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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (334) hide show
  1. data/Rakefile +33 -2
  2. data/benchmark/common.rb +2 -2
  3. data/benchmark/read-write-many-small-items.rb +71 -62
  4. data/benchmark/write-many-small-items.rb +61 -53
  5. data/ext/groonga/rb-grn-context.c +23 -5
  6. data/ext/groonga/rb-grn-index-column.c +2 -6
  7. data/ext/groonga/rb-grn-operator.c +31 -1
  8. data/ext/groonga/rb-grn-variable-size-column.c +77 -1
  9. data/ext/groonga/rb-grn.h +2 -11
  10. data/ext/groonga/rb-groonga.c +1 -2
  11. data/lib/1.8/groonga.so +0 -0
  12. data/lib/1.9/groonga.so +0 -0
  13. data/lib/groonga/command.rb +169 -0
  14. data/lib/groonga/context.rb +4 -124
  15. data/lib/groonga/dumper.rb +10 -8
  16. data/lib/groonga/record.rb +7 -0
  17. data/lib/groonga/schema.rb +98 -7
  18. data/rroonga-build.rb +3 -3
  19. data/test/{test-context-select.rb → test-command-select.rb} +3 -3
  20. data/test/test-record.rb +18 -1
  21. data/test/test-schema-dumper.rb +48 -0
  22. data/test/test-schema-type.rb +35 -0
  23. data/test/test-schema.rb +81 -11
  24. data/test/test-table-select.rb +49 -38
  25. data/test/test-variable-size-column.rb +30 -0
  26. data/vendor/local/bin/grntest.exe +0 -0
  27. data/vendor/local/bin/groonga.exe +0 -0
  28. data/vendor/local/bin/libgroonga-0.dll +0 -0
  29. data/vendor/local/bin/libmecab-1.dll +0 -0
  30. data/vendor/local/bin/mecab.exe +0 -0
  31. data/vendor/local/include/groonga/groonga/plugin.h +3 -2
  32. data/vendor/local/include/groonga/groonga.h +106 -78
  33. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  34. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  35. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  36. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  37. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  38. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  39. data/vendor/local/lib/libgroonga.a +0 -0
  40. data/vendor/local/lib/libgroonga.dll.a +0 -0
  41. data/vendor/local/lib/libmecab.a +0 -0
  42. data/vendor/local/lib/libmecab.dll.a +0 -0
  43. data/vendor/local/lib/pkgconfig/groonga.pc +5 -2
  44. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  45. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  46. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  47. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  48. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  49. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  50. data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +42 -32
  51. data/vendor/local/share/doc/groonga/en/html/_sources/commands/delete.txt +5 -1
  52. data/vendor/local/share/doc/groonga/en/html/_sources/commands/table_create.txt +5 -2
  53. data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +4 -3
  54. data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +8 -6
  55. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt +42 -3
  56. data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_in_circle.txt +26 -1
  57. data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +2 -2
  58. data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +102 -27
  59. data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +10 -10
  60. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +130 -21
  61. data/vendor/local/share/doc/groonga/en/html/_sources/output.txt +164 -0
  62. data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
  63. data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +0 -5
  64. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -4
  65. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +1 -3
  66. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +2 -1
  67. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +95 -116
  68. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +1 -4
  69. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +1 -4
  70. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -0
  71. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -2
  72. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -0
  73. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +3 -0
  74. data/vendor/local/share/doc/groonga/en/html/_sources/tutorial.txt +2 -2
  75. data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +3 -3
  76. data/vendor/local/share/doc/groonga/en/html/_static/basic.css +13 -1
  77. data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +5 -5
  78. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +11 -7
  79. data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
  80. data/vendor/local/share/doc/groonga/en/html/characteristic.html +60 -52
  81. data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
  82. data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
  83. data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
  84. data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
  85. data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
  86. data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
  87. data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
  88. data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
  89. data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
  90. data/vendor/local/share/doc/groonga/en/html/commands/delete.html +38 -35
  91. data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
  92. data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
  93. data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
  94. data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
  95. data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
  96. data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
  97. data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
  98. data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
  99. data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
  100. data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +36 -36
  101. data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +38 -36
  102. data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
  103. data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
  104. data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
  105. data/vendor/local/share/doc/groonga/en/html/commands.html +41 -41
  106. data/vendor/local/share/doc/groonga/en/html/community.html +14 -12
  107. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
  108. data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
  109. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
  110. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
  111. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
  112. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
  113. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
  114. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
  115. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
  116. data/vendor/local/share/doc/groonga/en/html/contribution.html +15 -13
  117. data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +7 -7
  118. data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +7 -7
  119. data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +7 -7
  120. data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +12 -12
  121. data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +7 -7
  122. data/vendor/local/share/doc/groonga/en/html/executables.html +7 -7
  123. data/vendor/local/share/doc/groonga/en/html/expr.html +25 -25
  124. data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
  125. data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +71 -36
  126. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +53 -33
  127. data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
  128. data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
  129. data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
  130. data/vendor/local/share/doc/groonga/en/html/functions.html +22 -22
  131. data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
  132. data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +7 -7
  133. data/vendor/local/share/doc/groonga/en/html/index.html +92 -87
  134. data/vendor/local/share/doc/groonga/en/html/install.html +109 -40
  135. data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -19
  136. data/vendor/local/share/doc/groonga/en/html/log.html +21 -21
  137. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
  138. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
  139. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
  140. data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
  141. data/vendor/local/share/doc/groonga/en/html/news.html +233 -112
  142. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  143. data/vendor/local/share/doc/groonga/en/html/output.html +302 -0
  144. data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +21 -21
  145. data/vendor/local/share/doc/groonga/en/html/reference.html +59 -55
  146. data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
  147. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  148. data/vendor/local/share/doc/groonga/en/html/spec/search.html +11 -11
  149. data/vendor/local/share/doc/groonga/en/html/spec.html +11 -11
  150. data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +7 -7
  151. data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +7 -7
  152. data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +7 -7
  153. data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +7 -7
  154. data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +7 -7
  155. data/vendor/local/share/doc/groonga/en/html/suggest.html +7 -12
  156. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  157. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +11 -11
  158. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +23 -23
  159. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +10 -10
  160. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +10 -10
  161. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +124 -164
  162. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +10 -10
  163. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +10 -10
  164. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +10 -10
  165. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +14 -14
  166. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +10 -10
  167. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +11 -10
  168. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +10 -10
  169. data/vendor/local/share/doc/groonga/en/html/tutorial.html +26 -26
  170. data/vendor/local/share/doc/groonga/en/html/type.html +31 -31
  171. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  172. data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +42 -32
  173. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/delete.txt +5 -1
  174. data/vendor/local/share/doc/groonga/ja/html/_sources/commands/table_create.txt +5 -2
  175. data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +4 -3
  176. data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +8 -6
  177. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt +42 -3
  178. data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_in_circle.txt +26 -1
  179. data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +2 -2
  180. data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +102 -27
  181. data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +10 -10
  182. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +130 -21
  183. data/vendor/local/share/doc/groonga/ja/html/_sources/output.txt +164 -0
  184. data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
  185. data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +0 -5
  186. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -4
  187. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +1 -3
  188. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +2 -1
  189. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +95 -116
  190. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +1 -4
  191. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +1 -4
  192. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -0
  193. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -2
  194. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -0
  195. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +3 -0
  196. data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial.txt +2 -2
  197. data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +3 -3
  198. data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +13 -1
  199. data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +5 -5
  200. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +11 -7
  201. data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
  202. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +55 -47
  203. data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
  204. data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
  205. data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
  206. data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
  207. data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
  208. data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
  209. data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
  210. data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
  211. data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
  212. data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +38 -35
  213. data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
  214. data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
  215. data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
  216. data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
  217. data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
  218. data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
  219. data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
  220. data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
  221. data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
  222. data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +36 -36
  223. data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +38 -36
  224. data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
  225. data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
  226. data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
  227. data/vendor/local/share/doc/groonga/ja/html/commands.html +41 -41
  228. data/vendor/local/share/doc/groonga/ja/html/community.html +10 -8
  229. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
  230. data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
  231. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
  232. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
  233. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
  234. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
  235. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
  236. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
  237. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
  238. data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
  239. data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +7 -7
  240. data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +7 -7
  241. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +7 -7
  242. data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +12 -12
  243. data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +7 -7
  244. data/vendor/local/share/doc/groonga/ja/html/executables.html +7 -7
  245. data/vendor/local/share/doc/groonga/ja/html/expr.html +25 -25
  246. data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
  247. data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +71 -36
  248. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +53 -33
  249. data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
  250. data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
  251. data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
  252. data/vendor/local/share/doc/groonga/ja/html/functions.html +22 -22
  253. data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
  254. data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +7 -7
  255. data/vendor/local/share/doc/groonga/ja/html/index.html +84 -79
  256. data/vendor/local/share/doc/groonga/ja/html/install.html +92 -16
  257. data/vendor/local/share/doc/groonga/ja/html/limitations.html +13 -13
  258. data/vendor/local/share/doc/groonga/ja/html/log.html +21 -21
  259. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
  260. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
  261. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
  262. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
  263. data/vendor/local/share/doc/groonga/ja/html/news.html +202 -99
  264. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  265. data/vendor/local/share/doc/groonga/ja/html/output.html +287 -0
  266. data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +21 -21
  267. data/vendor/local/share/doc/groonga/ja/html/reference.html +59 -55
  268. data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
  269. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  270. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
  271. data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
  272. data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +7 -7
  273. data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +7 -7
  274. data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +7 -7
  275. data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +7 -7
  276. data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +7 -7
  277. data/vendor/local/share/doc/groonga/ja/html/suggest.html +7 -11
  278. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
  279. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
  280. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +20 -20
  281. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
  282. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
  283. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +93 -115
  284. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
  285. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
  286. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
  287. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +8 -8
  288. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
  289. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -7
  290. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
  291. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -21
  292. data/vendor/local/share/doc/groonga/ja/html/type.html +31 -31
  293. data/vendor/local/share/doc/groonga/source/characteristic.txt +42 -32
  294. data/vendor/local/share/doc/groonga/source/commands/delete.txt +5 -1
  295. data/vendor/local/share/doc/groonga/source/commands/table_create.txt +5 -2
  296. data/vendor/local/share/doc/groonga/source/community.txt +4 -3
  297. data/vendor/local/share/doc/groonga/source/contribution.txt +8 -6
  298. data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +8 -8
  299. data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +4 -4
  300. data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +4 -4
  301. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +3 -15
  302. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +2 -7
  303. data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -7
  304. data/vendor/local/share/doc/groonga/source/functions/geo_distance.txt +42 -3
  305. data/vendor/local/share/doc/groonga/source/functions/geo_in_circle.txt +26 -1
  306. data/vendor/local/share/doc/groonga/source/index.txt +2 -2
  307. data/vendor/local/share/doc/groonga/source/install.txt +102 -27
  308. data/vendor/local/share/doc/groonga/source/limitations.txt +10 -10
  309. data/vendor/local/share/doc/groonga/source/news.txt +130 -21
  310. data/vendor/local/share/doc/groonga/source/output.txt +164 -0
  311. data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
  312. data/vendor/local/share/doc/groonga/source/suggest.txt +0 -5
  313. data/vendor/local/share/doc/groonga/source/tutorial/data.txt +6 -4
  314. data/vendor/local/share/doc/groonga/source/tutorial/drilldown.txt +1 -3
  315. data/vendor/local/share/doc/groonga/source/tutorial/index.txt +2 -1
  316. data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +95 -116
  317. data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +1 -4
  318. data/vendor/local/share/doc/groonga/source/tutorial/micro_blog.txt +1 -4
  319. data/vendor/local/share/doc/groonga/source/tutorial/network.txt +3 -0
  320. data/vendor/local/share/doc/groonga/source/tutorial/patricia_trie.txt +1 -2
  321. data/vendor/local/share/doc/groonga/source/tutorial/query_expansion.txt +5 -0
  322. data/vendor/local/share/doc/groonga/source/tutorial/search.txt +3 -0
  323. data/vendor/local/share/doc/groonga/source/tutorial.txt +2 -2
  324. data/vendor/local/share/doc/groonga/source/type.txt +3 -3
  325. data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +1 -0
  326. data/vendor/local/share/groonga/html/admin/index.html +40 -0
  327. data/vendor/local/share/groonga/html/admin/js/jquery.flot-0.7.min.js +6 -0
  328. data/vendor/local/share/groonga/html/admin/js/jquery.flot.license.txt +22 -0
  329. data/vendor/local/share/man/ja/man1/groonga.1 +560 -138
  330. data/vendor/local/share/man/man1/groonga.1 +637 -223
  331. metadata +887 -898
  332. data/ext/groonga/Makefile +0 -184
  333. data/ext/groonga/rb-grn-query.c +0 -260
  334. data/test/test-query.rb +0 -22
@@ -1,4 +1,5 @@
1
- /* Copyright(C) 2009-2011 Brazil
1
+ /*
2
+ Copyright(C) 2009-2012 Brazil
2
3
 
3
4
  This library is free software; you can redistribute it and/or
4
5
  modify it under the terms of the GNU Lesser General Public
@@ -29,7 +30,7 @@ extern "C" {
29
30
  #endif /* defined(_WIN32) || defined(_WIN64) */
30
31
  #endif /* GRN_API */
31
32
 
32
- typedef unsigned grn_id;
33
+ typedef unsigned int grn_id;
33
34
  typedef unsigned char grn_bool;
34
35
 
35
36
  #define GRN_ID_NIL (0x00)
@@ -549,7 +550,7 @@ GRN_API grn_obj *grn_ctx_db(grn_ctx *ctx);
549
550
  * ctxが使用するdbからnameに対応するオブジェクトを検索して返す。
550
551
  * nameに一致するオブジェクトが存在しなければNULLを返す。
551
552
  **/
552
- GRN_API grn_obj *grn_ctx_get(grn_ctx *ctx, const char *name, unsigned name_size);
553
+ GRN_API grn_obj *grn_ctx_get(grn_ctx *ctx, const char *name, unsigned int name_size);
553
554
 
554
555
  /**
555
556
  * grn_ctx_at:
@@ -602,7 +603,7 @@ GRN_API grn_obj *grn_ctx_at(grn_ctx *ctx, grn_id id);
602
603
  * nameに対応する新たなtype(型)をdbに定義する。
603
604
  **/
604
605
 
605
- GRN_API grn_obj *grn_type_create(grn_ctx *ctx, const char *name, unsigned name_size,
606
+ GRN_API grn_obj *grn_type_create(grn_ctx *ctx, const char *name, unsigned int name_size,
606
607
  grn_obj_flags flags, unsigned int size);
607
608
 
608
609
  GRN_API grn_rc grn_plugin_register(grn_ctx *ctx, const char *name);
@@ -624,8 +625,8 @@ GRN_API const char *grn_plugin_get_suffix(void);
624
625
  **/
625
626
 
626
627
  typedef struct {
627
- char *name;
628
- unsigned name_size;
628
+ const char *name;
629
+ unsigned int name_size;
629
630
  grn_obj value;
630
631
  } grn_expr_var;
631
632
 
@@ -639,9 +640,9 @@ typedef enum {
639
640
  } grn_proc_type;
640
641
 
641
642
  GRN_API grn_obj *grn_proc_create(grn_ctx *ctx,
642
- const char *name, unsigned name_size, grn_proc_type type,
643
+ const char *name, unsigned int name_size, grn_proc_type type,
643
644
  grn_proc_func *init, grn_proc_func *next, grn_proc_func *fin,
644
- unsigned nvars, grn_expr_var *vars);
645
+ unsigned int nvars, grn_expr_var *vars);
645
646
  /**
646
647
  * grn_proc_vars:
647
648
  * @user_data: grn_proc_funcに渡されたuser_data
@@ -652,7 +653,7 @@ GRN_API grn_obj *grn_proc_create(grn_ctx *ctx,
652
653
  **/
653
654
 
654
655
  GRN_API grn_obj *grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
655
- grn_expr_var **vars, unsigned *nvars, grn_obj **caller);
656
+ grn_expr_var **vars, unsigned int *nvars, grn_obj **caller);
656
657
 
657
658
  /*-------------------------------------------------------------
658
659
  * table操作のための関数
@@ -682,7 +683,7 @@ GRN_API grn_obj *grn_proc_get_info(grn_ctx *ctx, grn_user_data *user_data,
682
683
  * nameに対応する新たなtableをctxが使用するdbに定義する。
683
684
  **/
684
685
  GRN_API grn_obj *grn_table_create(grn_ctx *ctx,
685
- const char *name, unsigned name_size,
686
+ const char *name, unsigned int name_size,
686
687
  const char *path, grn_obj_flags flags,
687
688
  grn_obj *key_type, grn_obj *value_type);
688
689
 
@@ -703,17 +704,20 @@ GRN_API grn_obj *grn_table_create(grn_ctx *ctx,
703
704
  **/
704
705
  /* TODO: int *added -> grn_bool *added */
705
706
  GRN_API grn_id grn_table_add(grn_ctx *ctx, grn_obj *table,
706
- const void *key, unsigned key_size, int *added);
707
+ const void *key, unsigned int key_size, int *added);
707
708
 
708
709
  /**
709
710
  * grn_table_get:
710
- * @table: 対象table
711
- * @key: 検索key
711
+ * @table: The table or database
712
+ * @key: The record or object key to be found
712
713
  *
713
- * tableからkeyに対応するrecordを検索し、対応するIDを返す。
714
+ * It finds a record that has @key and returns ID of the
715
+ * found record. If @table is a database, it finds an object
716
+ * (table, column and so on) that has @key and returns ID of
717
+ * the found object.
714
718
  **/
715
719
  GRN_API grn_id grn_table_get(grn_ctx *ctx, grn_obj *table,
716
- const void *key, unsigned key_size);
720
+ const void *key, unsigned int key_size);
717
721
 
718
722
 
719
723
  /**
@@ -737,7 +741,7 @@ GRN_API grn_id grn_table_at(grn_ctx *ctx, grn_obj *table, grn_id id);
737
741
  * longest common prefix searchを行い、対応するIDを返す。
738
742
  **/
739
743
  GRN_API grn_id grn_table_lcp_search(grn_ctx *ctx, grn_obj *table,
740
- const void *key, unsigned key_size);
744
+ const void *key, unsigned int key_size);
741
745
 
742
746
  /**
743
747
  * grn_table_get_key:
@@ -765,7 +769,7 @@ GRN_API int grn_table_get_key(grn_ctx *ctx, grn_obj *table,
765
769
  * 対応するレコードが存在しない場合はGRN_INVALID_ARGUMENTを返す。
766
770
  **/
767
771
  GRN_API grn_rc grn_table_delete(grn_ctx *ctx, grn_obj *table,
768
- const void *key, unsigned key_size);
772
+ const void *key, unsigned int key_size);
769
773
 
770
774
  /**
771
775
  * grn_table_delete_by_id:
@@ -909,8 +913,8 @@ typedef grn_obj grn_table_cursor;
909
913
  * tableに登録されているレコードを順番に取り出すためのカーソルを生成して返す。
910
914
  **/
911
915
  GRN_API grn_table_cursor *grn_table_cursor_open(grn_ctx *ctx, grn_obj *table,
912
- const void *min, unsigned min_size,
913
- const void *max, unsigned max_size,
916
+ const void *min, unsigned int min_size,
917
+ const void *max, unsigned int max_size,
914
918
  int offset, int limit, int flags);
915
919
 
916
920
  /**
@@ -956,7 +960,7 @@ GRN_API int grn_table_cursor_get_value(grn_ctx *ctx, grn_table_cursor *tc, void
956
960
  * cursorのカレントレコードが存在しない場合はGRN_INVALID_ARGUMENTを返す。
957
961
  **/
958
962
  GRN_API grn_rc grn_table_cursor_set_value(grn_ctx *ctx, grn_table_cursor *tc,
959
- void *value, int flags);
963
+ const void *value, int flags);
960
964
 
961
965
  /**
962
966
  * grn_table_cursor_delete:
@@ -1222,7 +1226,7 @@ GRN_API grn_rc grn_table_difference(grn_ctx *ctx, grn_obj *table1, grn_obj *tabl
1222
1226
  * カラムIDの数を返す。
1223
1227
  **/
1224
1228
  GRN_API int grn_table_columns(grn_ctx *ctx, grn_obj *table,
1225
- const char *name, unsigned name_size,
1229
+ const char *name, unsigned int name_size,
1226
1230
  grn_obj *res);
1227
1231
 
1228
1232
  /**
@@ -1238,7 +1242,7 @@ GRN_API int grn_table_columns(grn_ctx *ctx, grn_obj *table,
1238
1242
  * 例) 'col1' / 'col2.col3' / 'col2._id'
1239
1243
  **/
1240
1244
  GRN_API grn_obj *grn_obj_column(grn_ctx *ctx, grn_obj *table,
1241
- const char *name, unsigned name_size);
1245
+ const char *name, unsigned int name_size);
1242
1246
 
1243
1247
 
1244
1248
  /**
@@ -1279,7 +1283,7 @@ GRN_API unsigned int grn_table_size(grn_ctx *ctx, grn_obj *table);
1279
1283
  * 一つのtableに同一のnameのcolumnを複数定義することはできない。
1280
1284
  **/
1281
1285
  GRN_API grn_obj *grn_column_create(grn_ctx *ctx, grn_obj *table,
1282
- const char *name, unsigned name_size,
1286
+ const char *name, unsigned int name_size,
1283
1287
  const char *path, grn_obj_flags flags, grn_obj *type);
1284
1288
 
1285
1289
  #define GRN_COLUMN_OPEN_OR_CREATE(ctx,table,name,name_size,path,flags,type,column) \
@@ -1415,6 +1419,32 @@ GRN_API grn_bool grn_obj_is_builtin(grn_ctx *ctx, grn_obj *obj);
1415
1419
  **/
1416
1420
  GRN_API grn_obj *grn_obj_get_value(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value);
1417
1421
 
1422
+ /**
1423
+ * grn_obj_get_values:
1424
+ * @obj: 対象object
1425
+ * @offset: 値を取得する範囲の開始位置となるレコードID
1426
+ * @values: 値の配列がセットされる
1427
+ *
1428
+ * objに指定されたカラムについて、offsetに指定されたレコードIDを開始位置として、IDが連続
1429
+ * するレコードに対応するカラム値が昇順に格納された配列へのポインタをvaluesにセットします。
1430
+ * 取得できた件数が戻り値として返される。エラーが発生した場合は -1 が返されます。
1431
+ * 注意: 値が固定長であるカラムのみがobjに指定できます。
1432
+ * 範囲内のIDに対応するレコードが有効であるとは限りません。
1433
+ * delete操作を実行したことのあるテーブルに対しては、
1434
+ * grn_table_at()などによって各レコードの存否を別途確認しなければなりません。
1435
+ **/
1436
+ GRN_API int grn_obj_get_values(grn_ctx *ctx, grn_obj *obj, grn_id offset, void **values);
1437
+
1438
+ #define GRN_COLUMN_EACH(ctx,column,id,value,block) do {\
1439
+ int _n;\
1440
+ grn_id id = 1;\
1441
+ while ((_n = grn_obj_get_values(ctx, column, id, (void **)&value)) > 0) {\
1442
+ for (; _n; _n--, id++, value++) {\
1443
+ block\
1444
+ }\
1445
+ }\
1446
+ } while (0)
1447
+
1418
1448
  /**
1419
1449
  * grn_obj_set_value:
1420
1450
  * @obj: 対象object
@@ -1467,7 +1497,8 @@ GRN_API grn_rc grn_obj_remove(grn_ctx *ctx, grn_obj *obj);
1467
1497
  * ctxが使用するdbにおいてobjに対応する名前をnameに更新する。
1468
1498
  * objは永続オブジェクトでなければならない。
1469
1499
  **/
1470
- GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size);
1500
+ GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj,
1501
+ const char *name, unsigned int name_size);
1471
1502
 
1472
1503
  /**
1473
1504
  * grn_table_rename:
@@ -1480,7 +1511,7 @@ GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsi
1480
1511
  * tableは永続オブジェクトでなければならない。
1481
1512
  **/
1482
1513
  GRN_API grn_rc grn_table_rename(grn_ctx *ctx, grn_obj *table,
1483
- const char *name, unsigned name_size);
1514
+ const char *name, unsigned int name_size);
1484
1515
 
1485
1516
  /**
1486
1517
  * grn_column_rename:
@@ -1492,7 +1523,7 @@ GRN_API grn_rc grn_table_rename(grn_ctx *ctx, grn_obj *table,
1492
1523
  * columnは永続オブジェクトでなければならない。
1493
1524
  **/
1494
1525
  GRN_API grn_rc grn_column_rename(grn_ctx *ctx, grn_obj *column,
1495
- const char *name, unsigned name_size);
1526
+ const char *name, unsigned int name_size);
1496
1527
 
1497
1528
  /**
1498
1529
  * grn_obj_close:
@@ -1783,6 +1814,28 @@ GRN_API grn_obj *grn_obj_open(grn_ctx *ctx, unsigned char type, grn_obj_flags fl
1783
1814
  GRN_API int grn_column_index(grn_ctx *ctx, grn_obj *column, grn_operator op,
1784
1815
  grn_obj **indexbuf, int buf_size, int *section);
1785
1816
 
1817
+
1818
+ /**
1819
+ * grn_obj_delete_by_id:
1820
+ * @db: The target database.
1821
+ * @id: The object (table, column and so on) ID to be deleted.
1822
+ * @removep: If GRN_TRUE, clear object cache and remove relation
1823
+ * between ID and key in database. Otherwise, just clear object cache.
1824
+ *
1825
+ * dbからidに対応するテーブルやカラムなどを削除します。mroonga向けに用意した内部APIです。
1826
+ **/
1827
+ GRN_API grn_rc grn_obj_delete_by_id(grn_ctx *ctx, grn_obj *db, grn_id id, grn_bool removep);
1828
+
1829
+ /**
1830
+ * grn_obj_path_by_id:
1831
+ * @db: The target database.
1832
+ * @id: The object (table, column and so on) ID to be deleted.
1833
+ * @buffer: path string corresponding to the id will be set in this buffer.
1834
+ *
1835
+ * dbのidに対応するpathを返します。mroonga向けに用意した内部APIです。
1836
+ **/
1837
+ GRN_API grn_rc grn_obj_path_by_id(grn_ctx *ctx, grn_obj *db, grn_id id, char *buffer);
1838
+
1786
1839
  /* geo */
1787
1840
 
1788
1841
  typedef struct {
@@ -1791,31 +1844,6 @@ typedef struct {
1791
1844
  } grn_geo_point;
1792
1845
 
1793
1846
 
1794
- /**
1795
- * grn_geo_select_in_circle:
1796
- * @index: the index column for TokyoGeoPoint or WGS84GeoPpoint type.
1797
- * @center_point: the center point of the target circle. (ShortText, Text,
1798
- * LongText, TokyoGeoPoint or WGS84GeoPoint)
1799
- * @distance: the radius of the target circle (Int32,
1800
- * UInt32, Int64, UInt64 or Float) or the point
1801
- * on the circumference of the target circle. (ShortText, Text, LongText,
1802
- * TokyoGeoPoint or WGS84GeoPoint)
1803
- * @res: the table to store found record IDs. It must be
1804
- * GRN_TABLE_HASH_KEY type table.
1805
- * @op: the operator for matched records.
1806
- *
1807
- * It selects records that are in the circle specified by
1808
- * @center_point and @distance from @center_point. Records
1809
- * are searched by @index. Found records are added to @res
1810
- * table with @op operation.
1811
- **/
1812
- GRN_API grn_rc grn_geo_select_in_circle(grn_ctx *ctx,
1813
- grn_obj *index,
1814
- grn_obj *center_point,
1815
- grn_obj *distance,
1816
- grn_obj *res,
1817
- grn_operator op);
1818
-
1819
1847
  /**
1820
1848
  * grn_geo_select_in_rectangle:
1821
1849
  * @index: the index column for TokyoGeoPoint or WGS84GeoPpoint type.
@@ -2089,8 +2117,8 @@ struct _grn_obj_format {
2089
2117
  grn_obj columns;
2090
2118
  const void *min;
2091
2119
  const void *max;
2092
- unsigned min_size;
2093
- unsigned max_size;
2120
+ unsigned int min_size;
2121
+ unsigned int max_size;
2094
2122
  int nhits;
2095
2123
  int offset;
2096
2124
  int limit;
@@ -2385,7 +2413,7 @@ GRN_API void grn_time_now(grn_ctx *ctx, grn_obj *obj);
2385
2413
  int _val = (int)(val); grn_bulk_write((ctx), (obj), (char *)&_val, sizeof(int));\
2386
2414
  } while (0)
2387
2415
  #define GRN_UINT32_PUT(ctx,obj,val) do {\
2388
- unsigned int _val = (unsigned int)(val);\
2416
+ unsigned int _val = (unsigned int)(val);\
2389
2417
  grn_bulk_write((ctx), (obj), (char *)&_val, sizeof(unsigned int));\
2390
2418
  } while (0)
2391
2419
  #define GRN_INT64_PUT(ctx,obj,val) do {\
@@ -2435,12 +2463,12 @@ GRN_API int grn_charlen(grn_ctx *ctx, const char *str, const char *end);
2435
2463
 
2436
2464
  /* expr */
2437
2465
 
2438
- GRN_API grn_obj *grn_expr_create(grn_ctx *ctx, const char *name, unsigned name_size);
2466
+ GRN_API grn_obj *grn_expr_create(grn_ctx *ctx, const char *name, unsigned int name_size);
2439
2467
  GRN_API grn_rc grn_expr_close(grn_ctx *ctx, grn_obj *expr);
2440
2468
  GRN_API grn_obj *grn_expr_add_var(grn_ctx *ctx, grn_obj *expr,
2441
- const char *name, unsigned name_size);
2469
+ const char *name, unsigned int name_size);
2442
2470
  GRN_API grn_obj *grn_expr_get_var(grn_ctx *ctx, grn_obj *expr,
2443
- const char *name, unsigned name_size);
2471
+ const char *name, unsigned int name_size);
2444
2472
  GRN_API grn_obj *grn_expr_get_var_by_offset(grn_ctx *ctx, grn_obj *expr, unsigned int offset);
2445
2473
 
2446
2474
  GRN_API grn_obj *grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
@@ -2448,7 +2476,7 @@ GRN_API grn_obj *grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
2448
2476
  GRN_API grn_obj *grn_expr_append_const(grn_ctx *ctx, grn_obj *expr, grn_obj *obj,
2449
2477
  grn_operator op, int nargs);
2450
2478
  GRN_API grn_obj *grn_expr_append_const_str(grn_ctx *ctx, grn_obj *expr,
2451
- const char *str, unsigned str_size,
2479
+ const char *str, unsigned int str_size,
2452
2480
  grn_operator op, int nargs);
2453
2481
  GRN_API grn_obj *grn_expr_append_const_int(grn_ctx *ctx, grn_obj *expr, int i,
2454
2482
  grn_operator op, int nargs);
@@ -2466,7 +2494,7 @@ GRN_API grn_obj *grn_table_select(grn_ctx *ctx, grn_obj *table, grn_obj *expr,
2466
2494
  grn_obj *res, grn_operator op);
2467
2495
 
2468
2496
  GRN_API int grn_obj_columns(grn_ctx *ctx, grn_obj *table,
2469
- const char *str, unsigned str_size, grn_obj *res);
2497
+ const char *str, unsigned int str_size, grn_obj *res);
2470
2498
 
2471
2499
  #define GRN_EXPR_CREATE_FOR_QUERY(ctx,table,expr,var) \
2472
2500
  if (((expr) = grn_expr_create((ctx), NULL, 0)) &&\
@@ -2485,7 +2513,7 @@ typedef unsigned int grn_expr_flags;
2485
2513
  #define GRN_EXPR_ALLOW_UPDATE (0x08)
2486
2514
 
2487
2515
  GRN_API grn_rc grn_expr_parse(grn_ctx *ctx, grn_obj *expr,
2488
- const char *str, unsigned str_size,
2516
+ const char *str, unsigned int str_size,
2489
2517
  grn_obj *default_column, grn_operator default_mode,
2490
2518
  grn_operator default_op, grn_expr_flags flags);
2491
2519
 
@@ -2497,17 +2525,17 @@ GRN_API grn_snip *grn_expr_snip(grn_ctx *ctx, grn_obj *expr, int flags,
2497
2525
  grn_snip_mapping *mapping);
2498
2526
 
2499
2527
  GRN_API grn_table_sort_key *grn_table_sort_key_from_str(grn_ctx *ctx,
2500
- const char *str, unsigned str_size,
2501
- grn_obj *table, unsigned *nkeys);
2528
+ const char *str, unsigned int str_size,
2529
+ grn_obj *table, unsigned int *nkeys);
2502
2530
  GRN_API grn_rc grn_table_sort_key_close(grn_ctx *ctx,
2503
- grn_table_sort_key *keys, unsigned nkeys);
2531
+ grn_table_sort_key *keys, unsigned int nkeys);
2504
2532
 
2505
2533
  GRN_API grn_rc grn_load(grn_ctx *ctx, grn_content_type input_type,
2506
- const char *table, unsigned table_len,
2507
- const char *columns, unsigned columns_len,
2508
- const char *values, unsigned values_len,
2509
- const char *ifexists, unsigned ifexists_len,
2510
- const char *each, unsigned each_len);
2534
+ const char *table, unsigned int table_len,
2535
+ const char *columns, unsigned int columns_len,
2536
+ const char *values, unsigned int values_len,
2537
+ const char *ifexists, unsigned int ifexists_len,
2538
+ const char *each, unsigned int each_len);
2511
2539
 
2512
2540
  #define GRN_CTX_MORE (0x01<<0)
2513
2541
  #define GRN_CTX_TAIL (0x01<<1)
@@ -2516,8 +2544,8 @@ GRN_API grn_rc grn_load(grn_ctx *ctx, grn_content_type input_type,
2516
2544
  #define GRN_CTX_QUIT (0x01<<4)
2517
2545
 
2518
2546
  GRN_API grn_rc grn_ctx_connect(grn_ctx *ctx, const char *host, int port, int flags);
2519
- GRN_API unsigned grn_ctx_send(grn_ctx *ctx, const char *str, unsigned int str_len, int flags);
2520
- GRN_API unsigned grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags);
2547
+ GRN_API unsigned int grn_ctx_send(grn_ctx *ctx, const char *str, unsigned int str_len, int flags);
2548
+ GRN_API unsigned int grn_ctx_recv(grn_ctx *ctx, char **str, unsigned int *str_len, int *flags);
2521
2549
 
2522
2550
  typedef struct _grn_ctx_info grn_ctx_info;
2523
2551
 
@@ -2554,8 +2582,8 @@ GRN_API grn_id grn_hash_get(grn_ctx *ctx, grn_hash *hash, const void *key,
2554
2582
  GRN_API int grn_hash_get_key(grn_ctx *ctx, grn_hash *hash, grn_id id, void *keybuf, int bufsize);
2555
2583
  GRN_API int grn_hash_get_key2(grn_ctx *ctx, grn_hash *hash, grn_id id, grn_obj *bulk);
2556
2584
  GRN_API int grn_hash_get_value(grn_ctx *ctx, grn_hash *hash, grn_id id, void *valuebuf);
2557
- GRN_API grn_rc grn_hash_set_value(grn_ctx *ctx, grn_hash *hash, grn_id id, void *value,
2558
- int flags);
2585
+ GRN_API grn_rc grn_hash_set_value(grn_ctx *ctx, grn_hash *hash, grn_id id,
2586
+ const void *value, int flags);
2559
2587
 
2560
2588
  typedef struct _grn_table_delete_optarg grn_table_delete_optarg;
2561
2589
 
@@ -2581,7 +2609,7 @@ GRN_API void grn_hash_cursor_close(grn_ctx *ctx, grn_hash_cursor *c);
2581
2609
  GRN_API int grn_hash_cursor_get_key(grn_ctx *ctx, grn_hash_cursor *c, void **key);
2582
2610
  GRN_API int grn_hash_cursor_get_value(grn_ctx *ctx, grn_hash_cursor *c, void **value);
2583
2611
  GRN_API grn_rc grn_hash_cursor_set_value(grn_ctx *ctx, grn_hash_cursor *c,
2584
- void *value, int flags);
2612
+ const void *value, int flags);
2585
2613
 
2586
2614
  GRN_API int grn_hash_cursor_get_key_value(grn_ctx *ctx, grn_hash_cursor *c,
2587
2615
  void **key, unsigned int *key_size, void **value);
@@ -2608,20 +2636,20 @@ typedef struct _grn_array grn_array;
2608
2636
  typedef struct _grn_array_cursor grn_array_cursor;
2609
2637
 
2610
2638
  GRN_API grn_array *grn_array_create(grn_ctx *ctx, const char *path,
2611
- unsigned value_size, unsigned flags);
2639
+ unsigned int value_size, unsigned int flags);
2612
2640
  GRN_API grn_array *grn_array_open(grn_ctx *ctx, const char *path);
2613
2641
  GRN_API grn_rc grn_array_close(grn_ctx *ctx, grn_array *array);
2614
2642
  GRN_API grn_id grn_array_add(grn_ctx *ctx, grn_array *array, void **value);
2615
2643
  GRN_API int grn_array_get_value(grn_ctx *ctx, grn_array *array, grn_id id, void *valuebuf);
2616
2644
  GRN_API grn_rc grn_array_set_value(grn_ctx *ctx, grn_array *array, grn_id id,
2617
- void *value, int flags);
2645
+ const void *value, int flags);
2618
2646
  GRN_API grn_array_cursor *grn_array_cursor_open(grn_ctx *ctx, grn_array *array,
2619
2647
  grn_id min, grn_id max,
2620
2648
  int offset, int limit, int flags);
2621
2649
  GRN_API grn_id grn_array_cursor_next(grn_ctx *ctx, grn_array_cursor *c);
2622
2650
  GRN_API int grn_array_cursor_get_value(grn_ctx *ctx, grn_array_cursor *c, void **value);
2623
2651
  GRN_API grn_rc grn_array_cursor_set_value(grn_ctx *ctx, grn_array_cursor *c,
2624
- void *value, int flags);
2652
+ const void *value, int flags);
2625
2653
  GRN_API grn_rc grn_array_cursor_delete(grn_ctx *ctx, grn_array_cursor *c,
2626
2654
  grn_table_delete_optarg *optarg);
2627
2655
  GRN_API void grn_array_cursor_close(grn_ctx *ctx, grn_array_cursor *c);
@@ -2667,7 +2695,7 @@ GRN_API int grn_pat_get_key(grn_ctx *ctx, grn_pat *pat, grn_id id, void *keybuf,
2667
2695
  GRN_API int grn_pat_get_key2(grn_ctx *ctx, grn_pat *pat, grn_id id, grn_obj *bulk);
2668
2696
  GRN_API int grn_pat_get_value(grn_ctx *ctx, grn_pat *pat, grn_id id, void *valuebuf);
2669
2697
  GRN_API grn_rc grn_pat_set_value(grn_ctx *ctx, grn_pat *pat, grn_id id,
2670
- void *value, int flags);
2698
+ const void *value, int flags);
2671
2699
 
2672
2700
  GRN_API grn_rc grn_pat_delete_by_id(grn_ctx *ctx, grn_pat *pat, grn_id id,
2673
2701
  grn_table_delete_optarg *optarg);
@@ -2709,7 +2737,7 @@ GRN_API int grn_pat_cursor_get_value(grn_ctx *ctx, grn_pat_cursor *c, void **val
2709
2737
  GRN_API int grn_pat_cursor_get_key_value(grn_ctx *ctx, grn_pat_cursor *c,
2710
2738
  void **key, unsigned int *key_size, void **value);
2711
2739
  GRN_API grn_rc grn_pat_cursor_set_value(grn_ctx *ctx, grn_pat_cursor *c,
2712
- void *value, int flags);
2740
+ const void *value, int flags);
2713
2741
  GRN_API grn_rc grn_pat_cursor_delete(grn_ctx *ctx, grn_pat_cursor *c,
2714
2742
  grn_table_delete_optarg *optarg);
2715
2743
 
Binary file
Binary file
Binary file
Binary file
@@ -3,12 +3,15 @@ exec_prefix=${prefix}
3
3
  bindir=${exec_prefix}/bin
4
4
  libdir=${exec_prefix}/lib
5
5
  includedir=${prefix}/include
6
+ datarootdir=${prefix}/share
7
+ datadir=${datarootdir}
8
+ document_root=${datadir}/groonga/html/admin
6
9
  groonga=${bindir}/groonga.exe
7
10
  groonga_suggest_create_dataset=${bindir}/groonga-suggest-create-dataset.exe
8
- groonga_version=1.2.8
11
+ groonga_version=1.3.0
9
12
 
10
13
  Name: Groonga
11
14
  Description: An Embeddable Fulltext Search Engine
12
- Version: 1.2.8
15
+ Version: 1.3.0
13
16
  Libs: -L${libdir} -lgroonga
14
17
  Cflags: -I${includedir}/groonga
@@ -1,4 +1,4 @@
1
1
  # Sphinx build info version 1
2
2
  # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: fd5b7ec27c959d53caabd9fc92f292cd
3
+ config: 2328c05e37425554abd0b8a6ebbec308
4
4
  tags: fbb0d17656682115ca4d033fb2f83ba1
@@ -2,58 +2,68 @@
2
2
 
3
3
  .. highlightlang:: none
4
4
 
5
- The characteristics of groonga
6
- ==============================
5
+ Characteristics of groonga
6
+ ==========================
7
7
 
8
- The successor to the Senna that is an embeddable full text search engine
9
- ------------------------------------------------------------------------
8
+ Groonga overview
9
+ ----------------
10
10
 
11
- Groonga is developed as the successor project to Senna. Senna is an embeddable full text search engine and it is used widely. Groonga takes over from Senna's characteristics that are fast, high precision and high flexibility. We started to develop groonga to improve those Senna' characteristics.
11
+ Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of groonga is that a newly registered document instantly appears in search results. Also, groonga allows updates without read locks. These characteristics result in superior performance on real-time applications.
12
12
 
13
- Groonga server supports multi-protocols such as HTTP
14
- ----------------------------------------------------
13
+ Groonga is also a column-oriented database management system (DBMS). Compared with well-known row-oriented systems, such as MySQL and PostgreSQL, column-oriented systems are more suited for aggregate queries. Due to this advantage, groonga can cover weakness of row-oriented systems.
15
14
 
16
- Senna is an component for an application that supports full text search. Groonga can be a server that provides search service. The groonga server supports HTTP, memcached binary protocol and gqtp (groonga query transfer protocol). Clients can search by those protocols via TCP/IP connection. It makes easy to use on a rental server that can install a library.
15
+ The basic functions of groonga are provided in a C library. Also, libraries for using groonga in other languages, such as Ruby, are provided by related projects. In addition, groonga-based storage engines are provided for MySQL and PostgreSQL. These libraries and storage engines allow any application to use groonga. See `usage examples <http://groonga.org/users/>`_.
17
16
 
18
- Groonga also can be used as a C library like Senna.
17
+ Full text search and Instant update
18
+ -----------------------------------
19
19
 
20
- Fast data update
21
- ----------------
20
+ In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query. In contrast, some full text search engines do not support instant updates, because it is difficult to dynamically update inverted indexes, the underlying data structure.
21
+
22
+ Groonga also uses inverted indexes but supports instant updates. In addition, groonga allows you to search documents even when updating the document collection. Due to these superior characteristics, groonga is very flexible as a full text search engine. Also, groonga always shows good performance because it divides a large task, inverted index merging, into smaller tasks.
23
+
24
+ Column store and aggregate query
25
+ --------------------------------
26
+
27
+ People can collect more than enough data in the Internet era. However, it is difficult to extract informative knowledge from a large database, and such a task requires a many-sided analysis through trial and error. For example, search refinement by date, time and location may reveal hidden patterns. Aggregate queries are useful to perform this kind of tasks.
28
+
29
+ An aggregate query groups search results by specified column values and then counts the number of records in each group. For example, an aggregate query in which a location column is specified counts the number of records per location. Making a graph from the result of an aggregate query against a date column is an easy way to visualize changes over time. Also, a combination of refinement by location and an aggregate query against a date column allows visualization of changes over time in specific location. Thus refinement and aggregation are important to perform data mining.
22
30
 
23
- Senna that is predecessor of groonga is a full text search engine without storage. Senna was commonly used with MySQL or PostgreSQL. Tritonn is a custom MyISAM storage engine that uses Senna as full text search engine. Ludia is a extension module for a PostgreSQL to use Senna as full text search engine. But those approaches can't fully utilize the performance characteristics of Senna. Senna can update index without read lock.
31
+ A column-oriented architecture allows groonga to efficiently process aggregate queries because a column-oriented database, which stores records by column, allows an aggregate query to access only a specified column. On the other hand, an aggregate query on a row-oriented database, which stores records by row, has to access neighbor columns, even though those columns are not required.
24
32
 
25
- For example, MyISAM acquires table lock while updating records in many cases. In those cases, data update by MyISAM is a bottleneck however Senna updates an index full text search fast.
33
+ Inverted index and tokenizer
34
+ ----------------------------
26
35
 
27
- Groonga implements a storage that doesn't acquires read lock to realize search service that has immediacy.
36
+ An inverted index is a traditional data structure used for large-scale full text search. A search engine based on inverted index extracts index terms from a document when it is added. Then in retrieval, a query is divided into index terms to find documents containing those index terms. In this way, index terms play an important role in full text search and thus the way of extracting index terms is a key to a better search engine.
28
37
 
38
+ A tokenizer is a module to extract index terms. A Japanese full text search engine commonly uses a word-based tokenizer (hereafter referred to as a word tokenizer) and/or a character-based n-gram tokenizer (hereafter referred to as an n-gram tokenizer). A word tokenizer-based search engine is superior in time, space and precision, which is the fraction of relevant documents in a search result. On the other hand, an n-gram tokenizer-based search engine is superior in recall, which is the fraction of retrieved documents in the perfect search result. The best choice depends on the application in practice.
29
39
 
30
- Storage that can be shared with multi-processes and multi-threads
31
- -----------------------------------------------------------------
40
+ Groonga supports both word and n-gram tokenizers. The simplest built-in tokenizer uses spaces as word delimiters. Built-in n-gram tokenizers (n = 1, 2, 3) are also available by default. In addition, a yet another built-in word tokenizer is available if MeCab, a part-of-speech and morphological analyzer, is embedded. Note that a tokenizer is pluggable and you can develop your own tokenizer, such as a tokenizer based on another part-of-speech tagger or a named-entity recognizer.
32
41
 
33
- Groonga's storage file can be shared with multi-processes and multi-threads. It doesn't require explicit lock.
42
+ Sharable storage and read lock-free
43
+ -----------------------------------
34
44
 
35
- `Mroonga <http://mroonga.github.com/>`_ that is the successor to the Tritonn is implemented as a MySQL pruggable storage engine. Groonga's storage files that are opened by mroonga can also be shared with groonga server. For example, you can update your data via SQL and search your data via HTTP.
45
+ Multi-core processors are mainstream today and the number of cores per processor is increasing. In order to exploit multiple cores, executing multiple queries in parallel or dividing a query into sub-queries for parallel processing is becoming more important.
36
46
 
37
- Fast aggregate query processing such as drilldown
38
- -------------------------------------------------
47
+ A database of groonga can be shared with multiple threads/processes. Also, multiple threads/processes can execute read queries in parallel even when another thread/process is executing an update query because groonga uses read lock-free data structures. This feature is suited to a real-time application that needs to update a database while executing read queries. In addition, groonga allows you to build flexible systems. For example, a database can receive read queries through the built-in HTTP server of groonga while accepting update queries through MySQL.
39
48
 
40
- Groonga's storage uses column oriented database model that stores data for each column. Column oriented database is suitable for fast aggregate query processing such as OLAP.
49
+ Geo-location (latitude and longitude) search
50
+ --------------------------------------------
41
51
 
42
- "Drilldown" is a processing that groups full text search result by each specified column values and counts number of records in each group. Groonga does the processing fast because groonga uses column oriented database.
52
+ Location services are getting more convenient because of mobile devices with GPS. For example, if you are going to have lunch or dinner at a nearby restaurant, a local search service for restaurants may be very useful, and for such services, fast geo-location search is becoming more important.
43
53
 
44
- Improved Senna's inverted index implementation
45
- ----------------------------------------------
54
+ Groonga provides inverted index-based fast geo-location search, which supports a query to find points in a rectangle or circle. Groonga gives high priority to points near the center of an area. Also, groonga supports distance measurement and you can sort points by distance from any point.
46
55
 
47
- Groonga's inverted index is the improved Senna's inverted index. It is more faster and more versatile.
56
+ Groonga library
57
+ ---------------
48
58
 
49
- Groonga can also process some complex queries fast by utilizing inverted index. Those queries are difficult to process with SQL and RDB. For example, tag search and drilldown can be processed fast by utilizing inverted index.
59
+ The basic functions of groonga are provided in a C library and any application can use groonga as a full text search engine or a column-oriented database. Also, libraries for languages other than C/C++, such as Ruby, are provided in related projects. See `related projects <http://groonga.org/related-projects.html>`_ for details.
50
60
 
51
- Geolocation (latitude and longitude) search
52
- -------------------------------------------
61
+ Groonga server
62
+ --------------
53
63
 
54
- Groonga supports geolocation search. Supported geodetic systems are Japan geodetic system and world geodetic system (WGS 84). Supported geolocation refinement region types are circle and rectangle. Groonga also supports distance between two coordinates.
64
+ Groonga provides a built-in server command which supports HTTP, the memcached binary protocol and the groonga query transfer protocol (gqtp). Also, a groonga server supports query caching, which significantly reduces response time for repeated read queries. Using this command, groonga is available even on a server that does not allow you to install new libraries.
55
65
 
56
- Auto query cache mechanism
57
- --------------------------
66
+ Groonga storage engine
67
+ ----------------------
58
68
 
59
- Groonga caches reference queries automatically.
69
+ Groonga works not only as an independent column-oriented DBMS but also as storage engines of well-known DBMSs. For example, `mroonga <http://mroonga.github.com/>`_ is a MySQL pluggable storage engine using groonga. By using mroonga, you can use groonga for column-oriented storage and full text search. A combination of a built-in storage engine, MyISAM or InnoDB, and a groonga-based full text search engine is also available. All the combinations have good and bad points and the best one depends on the application. See `related projects <http://groonga.org/related-projects.html>`_ for details.
@@ -14,7 +14,7 @@ delete - 一件のレコードの削除
14
14
  ----
15
15
  ::
16
16
 
17
- delete table [key [id]]
17
+ delete table [key [id [filter]]]
18
18
 
19
19
  説明
20
20
  ----
@@ -38,6 +38,10 @@ deleteは、使用しているデータベースのテーブルに1件のレコ
38
38
 
39
39
  レコードIDによってレコードを指定します。idパラメータを指定する場合は、keyパラメータを指定してはいけません。
40
40
 
41
+ ``filter``
42
+
43
+ script形式のgrn_expr文字列によってレコードを指定します。filterパラメータを指定する場合は、id及びkeyパラメータを指定してはいけません。
44
+
41
45
  返値
42
46
  ---
43
47