rroonga 0.9.5-x86-mingw32 → 1.0.1-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. data/NEWS.ja.rdoc +24 -0
  2. data/NEWS.rdoc +24 -0
  3. data/README.ja.rdoc +3 -2
  4. data/README.rdoc +3 -2
  5. data/Rakefile +15 -6
  6. data/ext/groonga/extconf.rb +25 -25
  7. data/ext/groonga/groonga.def +2 -0
  8. data/ext/groonga/rb-grn-array.c +1 -1
  9. data/ext/groonga/rb-grn-exception.c +14 -0
  10. data/ext/groonga/rb-grn-hash.c +1 -1
  11. data/ext/groonga/rb-grn-index-column.c +13 -1
  12. data/ext/groonga/rb-grn-object.c +2 -2
  13. data/ext/groonga/rb-grn-patricia-trie.c +394 -1
  14. data/ext/groonga/rb-grn-table.c +33 -2
  15. data/ext/groonga/rb-grn.h +3 -3
  16. data/html/index.html +1 -1
  17. data/lib/1.8/groonga.so +0 -0
  18. data/lib/1.9/groonga.so +0 -0
  19. data/lib/groonga/record.rb +32 -2
  20. data/lib/groonga/schema.rb +1 -1
  21. data/rroonga-build.rb +3 -3
  22. data/test/test-patricia-trie.rb +172 -1
  23. data/test/test-record.rb +7 -0
  24. data/test/test-remote.rb +2 -1
  25. data/test/test-table-cursor.rb +35 -1
  26. data/test/test-table-select-normalize.rb +7 -3
  27. data/vendor/local/bin/grntest.exe +0 -0
  28. data/vendor/local/bin/groonga.exe +0 -0
  29. data/vendor/local/bin/libgroonga-0.dll +0 -0
  30. data/vendor/local/etc/groonga/groonga.conf +11 -0
  31. data/vendor/local/etc/groonga/init.d/redhat/groonga +168 -0
  32. data/vendor/local/etc/groonga/init.d/redhat/sysconfig/groonga +8 -0
  33. data/vendor/local/include/groonga/groonga.h +38 -12
  34. data/vendor/local/lib/groonga/modules/suggest/suggest.a +0 -0
  35. data/vendor/local/lib/groonga/modules/suggest/suggest.dll +0 -0
  36. data/vendor/local/lib/groonga/modules/suggest/suggest.dll.a +0 -0
  37. data/vendor/local/lib/groonga/modules/{functions/cast.la → suggest/suggest.la} +6 -6
  38. data/vendor/local/lib/libgroonga.a +0 -0
  39. data/vendor/local/lib/libgroonga.dll.a +0 -0
  40. data/vendor/local/lib/pkgconfig/groonga.pc +1 -1
  41. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  42. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  43. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  44. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  45. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  46. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  47. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  48. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  49. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  50. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  51. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  52. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  53. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  54. data/vendor/local/share/groonga/admin_html/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  55. data/vendor/local/share/groonga/admin_html/images/groonga.png +0 -0
  56. data/vendor/local/share/groonga/admin_html/images/loading.gif +0 -0
  57. data/vendor/local/share/groonga/admin_html/js/jquery.json-2.2.min.js +31 -0
  58. data/vendor/local/share/groonga/doc/ja/html/.buildinfo +4 -0
  59. data/vendor/local/share/groonga/doc/ja/html/_sources/characteristic.txt +56 -0
  60. data/vendor/local/share/groonga/doc/ja/html/_sources/commands.txt +10 -0
  61. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/cache_limit.txt +52 -0
  62. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/check.txt +164 -0
  63. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/clearlock.txt +61 -0
  64. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_create.txt +93 -0
  65. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_list.txt +97 -0
  66. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/column_remove.txt +58 -0
  67. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/define_selector.txt +114 -0
  68. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/defrag.txt +57 -0
  69. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/delete.txt +68 -0
  70. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/dump.txt +62 -0
  71. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/load.txt +98 -0
  72. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_level.txt +65 -0
  73. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_put.txt +69 -0
  74. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/log_reopen.txt +66 -0
  75. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/quit.txt +38 -0
  76. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/select.txt +247 -0
  77. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/shutdown.txt +38 -0
  78. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/status.txt +59 -0
  79. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/suggest.txt +79 -0
  80. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_create.txt +111 -0
  81. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_list.txt +87 -0
  82. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/table_remove.txt +50 -0
  83. data/vendor/local/share/groonga/doc/ja/html/_sources/commands/view_add.txt +53 -0
  84. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/add.txt +102 -0
  85. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/get.txt +78 -0
  86. data/vendor/local/share/groonga/doc/ja/html/_sources/commands_not_implemented/set.txt +103 -0
  87. data/vendor/local/share/groonga/doc/ja/html/_sources/developer.txt +10 -0
  88. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/com.txt +18 -0
  89. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/document.txt +38 -0
  90. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/query.txt +212 -0
  91. data/vendor/local/share/groonga/doc/ja/html/_sources/developer/test.txt +114 -0
  92. data/vendor/local/share/groonga/doc/ja/html/_sources/execfile.txt +226 -0
  93. data/vendor/local/share/groonga/doc/ja/html/_sources/expr.txt +43 -0
  94. data/vendor/local/share/groonga/doc/ja/html/_sources/functions.txt +10 -0
  95. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/edit_distance.txt +48 -0
  96. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_distance.txt +51 -0
  97. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_in_circle.txt +54 -0
  98. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/geo_in_rectangle.txt +55 -0
  99. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/now.txt +34 -0
  100. data/vendor/local/share/groonga/doc/ja/html/_sources/functions/rand.txt +41 -0
  101. data/vendor/local/share/groonga/doc/ja/html/_sources/grnslap.txt +64 -0
  102. data/vendor/local/share/groonga/doc/ja/html/_sources/grntest.txt +259 -0
  103. data/vendor/local/share/groonga/doc/ja/html/_sources/http.txt +52 -0
  104. data/vendor/local/share/groonga/doc/ja/html/_sources/index.txt +21 -0
  105. data/vendor/local/share/groonga/doc/ja/html/_sources/install.txt +114 -0
  106. data/vendor/local/share/groonga/doc/ja/html/_sources/news.txt +199 -0
  107. data/vendor/local/share/groonga/doc/ja/html/_sources/process.txt +12 -0
  108. data/vendor/local/share/groonga/doc/ja/html/_sources/pseudo_column.txt +38 -0
  109. data/vendor/local/share/groonga/doc/ja/html/_sources/reference.txt +14 -0
  110. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial.txt +10 -0
  111. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial01.txt +293 -0
  112. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial02.txt +100 -0
  113. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial03.txt +72 -0
  114. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial04.txt +111 -0
  115. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial05.txt +65 -0
  116. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial06.txt +91 -0
  117. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial07.txt +92 -0
  118. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial08.txt +53 -0
  119. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial09.txt +9 -0
  120. data/vendor/local/share/groonga/doc/ja/html/_sources/tutorial/tutorial10.txt +486 -0
  121. data/vendor/local/share/groonga/doc/ja/html/_sources/type.txt +118 -0
  122. data/vendor/local/share/groonga/doc/ja/html/_static/basic.css +509 -0
  123. data/vendor/local/share/groonga/doc/ja/html/_static/default.css +277 -0
  124. data/vendor/local/share/groonga/doc/ja/html/_static/doctools.js +247 -0
  125. data/vendor/local/share/groonga/doc/ja/html/_static/file.png +0 -0
  126. data/vendor/local/share/groonga/doc/ja/html/_static/jquery.js +6240 -0
  127. data/vendor/local/share/groonga/doc/ja/html/_static/minus.png +0 -0
  128. data/vendor/local/share/groonga/doc/ja/html/_static/plus.png +0 -0
  129. data/vendor/local/share/groonga/doc/ja/html/_static/pygments.css +61 -0
  130. data/vendor/local/share/groonga/doc/ja/html/_static/searchtools.js +518 -0
  131. data/vendor/local/share/groonga/doc/ja/html/_static/sidebar.js +147 -0
  132. data/vendor/local/share/groonga/doc/ja/html/_static/underscore.js +16 -0
  133. data/vendor/local/share/groonga/doc/ja/html/characteristic.html +162 -0
  134. data/vendor/local/share/groonga/doc/ja/html/commands.html +139 -0
  135. data/vendor/local/share/groonga/doc/ja/html/commands/cache_limit.html +173 -0
  136. data/vendor/local/share/groonga/doc/ja/html/commands/check.html +285 -0
  137. data/vendor/local/share/groonga/doc/ja/html/commands/clearlock.html +180 -0
  138. data/vendor/local/share/groonga/doc/ja/html/commands/column_create.html +210 -0
  139. data/vendor/local/share/groonga/doc/ja/html/commands/column_list.html +220 -0
  140. data/vendor/local/share/groonga/doc/ja/html/commands/column_remove.html +183 -0
  141. data/vendor/local/share/groonga/doc/ja/html/commands/define_selector.html +221 -0
  142. data/vendor/local/share/groonga/doc/ja/html/commands/defrag.html +177 -0
  143. data/vendor/local/share/groonga/doc/ja/html/commands/delete.html +182 -0
  144. data/vendor/local/share/groonga/doc/ja/html/commands/dump.html +177 -0
  145. data/vendor/local/share/groonga/doc/ja/html/commands/load.html +208 -0
  146. data/vendor/local/share/groonga/doc/ja/html/commands/log_level.html +187 -0
  147. data/vendor/local/share/groonga/doc/ja/html/commands/log_put.html +190 -0
  148. data/vendor/local/share/groonga/doc/ja/html/commands/log_reopen.html +188 -0
  149. data/vendor/local/share/groonga/doc/ja/html/commands/quit.html +156 -0
  150. data/vendor/local/share/groonga/doc/ja/html/commands/select.html +331 -0
  151. data/vendor/local/share/groonga/doc/ja/html/commands/shutdown.html +156 -0
  152. data/vendor/local/share/groonga/doc/ja/html/commands/status.html +179 -0
  153. data/vendor/local/share/groonga/doc/ja/html/commands/suggest.html +191 -0
  154. data/vendor/local/share/groonga/doc/ja/html/commands/table_create.html +222 -0
  155. data/vendor/local/share/groonga/doc/ja/html/commands/table_list.html +202 -0
  156. data/vendor/local/share/groonga/doc/ja/html/commands/table_remove.html +173 -0
  157. data/vendor/local/share/groonga/doc/ja/html/commands/view_add.html +175 -0
  158. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/add.html +180 -0
  159. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/get.html +161 -0
  160. data/vendor/local/share/groonga/doc/ja/html/commands_not_implemented/set.html +182 -0
  161. data/vendor/local/share/groonga/doc/ja/html/developer.html +118 -0
  162. data/vendor/local/share/groonga/doc/ja/html/developer/com.html +136 -0
  163. data/vendor/local/share/groonga/doc/ja/html/developer/document.html +159 -0
  164. data/vendor/local/share/groonga/doc/ja/html/developer/query.html +336 -0
  165. data/vendor/local/share/groonga/doc/ja/html/developer/test.html +220 -0
  166. data/vendor/local/share/groonga/doc/ja/html/execfile.html +370 -0
  167. data/vendor/local/share/groonga/doc/ja/html/expr.html +157 -0
  168. data/vendor/local/share/groonga/doc/ja/html/functions.html +122 -0
  169. data/vendor/local/share/groonga/doc/ja/html/functions/edit_distance.html +162 -0
  170. data/vendor/local/share/groonga/doc/ja/html/functions/geo_distance.html +170 -0
  171. data/vendor/local/share/groonga/doc/ja/html/functions/geo_in_circle.html +173 -0
  172. data/vendor/local/share/groonga/doc/ja/html/functions/geo_in_rectangle.html +172 -0
  173. data/vendor/local/share/groonga/doc/ja/html/functions/now.html +152 -0
  174. data/vendor/local/share/groonga/doc/ja/html/functions/rand.html +159 -0
  175. data/vendor/local/share/groonga/doc/ja/html/genindex.html +227 -0
  176. data/vendor/local/share/groonga/doc/ja/html/grnslap.html +183 -0
  177. data/vendor/local/share/groonga/doc/ja/html/grntest.html +368 -0
  178. data/vendor/local/share/groonga/doc/ja/html/http.html +163 -0
  179. data/vendor/local/share/groonga/doc/ja/html/index.html +291 -0
  180. data/vendor/local/share/groonga/doc/ja/html/install.html +228 -0
  181. data/vendor/local/share/groonga/doc/ja/html/news.html +310 -0
  182. data/vendor/local/share/groonga/doc/ja/html/objects.inv +0 -0
  183. data/vendor/local/share/groonga/doc/ja/html/process.html +120 -0
  184. data/vendor/local/share/groonga/doc/ja/html/pseudo_column.html +147 -0
  185. data/vendor/local/share/groonga/doc/ja/html/reference.html +174 -0
  186. data/vendor/local/share/groonga/doc/ja/html/search.html +96 -0
  187. data/vendor/local/share/groonga/doc/ja/html/searchindex.js +1 -0
  188. data/vendor/local/share/groonga/doc/ja/html/tutorial.html +172 -0
  189. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial01.html +388 -0
  190. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial02.html +214 -0
  191. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial03.html +183 -0
  192. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial04.html +212 -0
  193. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial05.html +169 -0
  194. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial06.html +209 -0
  195. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial07.html +212 -0
  196. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial08.html +139 -0
  197. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial09.html +114 -0
  198. data/vendor/local/share/groonga/doc/ja/html/tutorial/tutorial10.html +458 -0
  199. data/vendor/local/share/groonga/doc/ja/html/type.html +217 -0
  200. data/vendor/local/share/groonga/doc/ja/source/__init__.py +0 -0
  201. data/vendor/local/share/groonga/doc/ja/source/characteristic.txt +56 -0
  202. data/vendor/local/share/groonga/doc/ja/source/commands.txt +10 -0
  203. data/vendor/local/share/groonga/doc/ja/source/commands/cache_limit.txt +52 -0
  204. data/vendor/local/share/groonga/doc/ja/source/commands/check.txt +164 -0
  205. data/vendor/local/share/groonga/doc/ja/source/commands/clearlock.txt +61 -0
  206. data/vendor/local/share/groonga/doc/ja/source/commands/column_create.txt +93 -0
  207. data/vendor/local/share/groonga/doc/ja/source/commands/column_list.txt +97 -0
  208. data/vendor/local/share/groonga/doc/ja/source/commands/column_remove.txt +58 -0
  209. data/vendor/local/share/groonga/doc/ja/source/commands/define_selector.txt +114 -0
  210. data/vendor/local/share/groonga/doc/ja/source/commands/defrag.txt +57 -0
  211. data/vendor/local/share/groonga/doc/ja/source/commands/delete.txt +68 -0
  212. data/vendor/local/share/groonga/doc/ja/source/commands/dump.txt +62 -0
  213. data/vendor/local/share/groonga/doc/ja/source/commands/load.txt +98 -0
  214. data/vendor/local/share/groonga/doc/ja/source/commands/log_level.txt +65 -0
  215. data/vendor/local/share/groonga/doc/ja/source/commands/log_put.txt +69 -0
  216. data/vendor/local/share/groonga/doc/ja/source/commands/log_reopen.txt +66 -0
  217. data/vendor/local/share/groonga/doc/ja/source/commands/quit.txt +38 -0
  218. data/vendor/local/share/groonga/doc/ja/source/commands/select.txt +247 -0
  219. data/vendor/local/share/groonga/doc/ja/source/commands/shutdown.txt +38 -0
  220. data/vendor/local/share/groonga/doc/ja/source/commands/status.txt +59 -0
  221. data/vendor/local/share/groonga/doc/ja/source/commands/table_create.txt +111 -0
  222. data/vendor/local/share/groonga/doc/ja/source/commands/table_list.txt +87 -0
  223. data/vendor/local/share/groonga/doc/ja/source/commands/table_remove.txt +50 -0
  224. data/vendor/local/share/groonga/doc/ja/source/commands/view_add.txt +53 -0
  225. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/add.txt +102 -0
  226. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/get.txt +78 -0
  227. data/vendor/local/share/groonga/doc/ja/source/commands_not_implemented/set.txt +103 -0
  228. data/vendor/local/share/groonga/doc/ja/source/conf.py +265 -0
  229. data/vendor/local/share/groonga/doc/ja/source/developer.txt +10 -0
  230. data/vendor/local/share/groonga/doc/ja/source/developer/com.txt +18 -0
  231. data/vendor/local/share/groonga/doc/ja/source/developer/document.txt +38 -0
  232. data/vendor/local/share/groonga/doc/ja/source/developer/query.txt +212 -0
  233. data/vendor/local/share/groonga/doc/ja/source/developer/test.txt +114 -0
  234. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-1.log +6 -0
  235. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-10.log +5 -0
  236. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-11.log +5 -0
  237. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-12.log +5 -0
  238. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-13.log +5 -0
  239. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-14.log +9 -0
  240. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-15.log +5 -0
  241. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-16.log +5 -0
  242. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-17.log +5 -0
  243. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-2.log +5 -0
  244. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-3.log +5 -0
  245. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-4.log +7 -0
  246. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-5.log +5 -0
  247. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-6.log +5 -0
  248. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-7.log +16 -0
  249. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-8.log +5 -0
  250. data/vendor/local/share/groonga/doc/ja/source/example/tutorial01-9.log +5 -0
  251. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-1.log +8 -0
  252. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-2.log +6 -0
  253. data/vendor/local/share/groonga/doc/ja/source/example/tutorial02-3.log +12 -0
  254. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-1.log +18 -0
  255. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-2.log +10 -0
  256. data/vendor/local/share/groonga/doc/ja/source/example/tutorial03-3.log +10 -0
  257. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-1.log +5 -0
  258. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-2.log +7 -0
  259. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-3.log +7 -0
  260. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-4.log +13 -0
  261. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-5.log +5 -0
  262. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-6.log +5 -0
  263. data/vendor/local/share/groonga/doc/ja/source/example/tutorial04-7.log +5 -0
  264. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-1.log +24 -0
  265. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-2.log +5 -0
  266. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-3.log +5 -0
  267. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-4.log +5 -0
  268. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-5.log +5 -0
  269. data/vendor/local/share/groonga/doc/ja/source/example/tutorial05-6.log +5 -0
  270. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-1.log +25 -0
  271. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-2.log +9 -0
  272. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-3.log +21 -0
  273. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-4.log +7 -0
  274. data/vendor/local/share/groonga/doc/ja/source/example/tutorial06-5.log +5 -0
  275. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-1.log +22 -0
  276. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-2.log +9 -0
  277. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-3.log +20 -0
  278. data/vendor/local/share/groonga/doc/ja/source/example/tutorial07-4.log +9 -0
  279. data/vendor/local/share/groonga/doc/ja/source/example/tutorial08-1.log +14 -0
  280. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-1.log +5 -0
  281. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-10.log +5 -0
  282. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-2.log +5 -0
  283. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-3.log +5 -0
  284. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-4.log +5 -0
  285. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-5.log +5 -0
  286. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-6.log +5 -0
  287. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-7.log +5 -0
  288. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-8.log +5 -0
  289. data/vendor/local/share/groonga/doc/ja/source/example/tutorial10-9.log +5 -0
  290. data/vendor/local/share/groonga/doc/ja/source/execfile.txt +226 -0
  291. data/vendor/local/share/groonga/doc/ja/source/expr.txt +43 -0
  292. data/vendor/local/share/groonga/doc/ja/source/functions.txt +10 -0
  293. data/vendor/local/share/groonga/doc/ja/source/functions/edit_distance.txt +48 -0
  294. data/vendor/local/share/groonga/doc/ja/source/functions/geo_distance.txt +51 -0
  295. data/vendor/local/share/groonga/doc/ja/source/functions/geo_in_circle.txt +54 -0
  296. data/vendor/local/share/groonga/doc/ja/source/functions/geo_in_rectangle.txt +55 -0
  297. data/vendor/local/share/groonga/doc/ja/source/functions/now.txt +34 -0
  298. data/vendor/local/share/groonga/doc/ja/source/functions/rand.txt +41 -0
  299. data/vendor/local/share/groonga/doc/ja/source/grnslap.txt +64 -0
  300. data/vendor/local/share/groonga/doc/ja/source/grntest.txt +259 -0
  301. data/vendor/local/share/groonga/doc/ja/source/http.txt +52 -0
  302. data/vendor/local/share/groonga/doc/ja/source/index.txt +21 -0
  303. data/vendor/local/share/groonga/doc/ja/source/install.txt +114 -0
  304. data/vendor/local/share/groonga/doc/ja/source/news.txt +199 -0
  305. data/vendor/local/share/groonga/doc/ja/source/process.txt +12 -0
  306. data/vendor/local/share/groonga/doc/ja/source/pseudo_column.txt +38 -0
  307. data/vendor/local/share/groonga/doc/ja/source/rdoc.py +762 -0
  308. data/vendor/local/share/groonga/doc/ja/source/reference.txt +14 -0
  309. data/vendor/local/share/groonga/doc/ja/source/tutorial.txt +10 -0
  310. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial01.txt +293 -0
  311. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial02.txt +100 -0
  312. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial03.txt +72 -0
  313. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial04.txt +111 -0
  314. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial05.txt +65 -0
  315. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial06.txt +91 -0
  316. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial07.txt +92 -0
  317. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial08.txt +53 -0
  318. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial09.txt +9 -0
  319. data/vendor/local/share/groonga/doc/ja/source/tutorial/tutorial10.txt +486 -0
  320. data/vendor/local/share/groonga/doc/ja/source/type.txt +118 -0
  321. data/vendor/local/share/groonga/doc/ja/source/update_execution_example.py +113 -0
  322. data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +46 -0
  323. data/vendor/local/share/groonga/examples/dictionary/edict/edict_import.sh +10 -0
  324. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +61 -0
  325. data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro_import.sh +10 -0
  326. data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +46 -0
  327. data/vendor/local/share/groonga/examples/dictionary/gene95/gene_import.sh +10 -0
  328. data/vendor/local/share/groonga/examples/dictionary/html/css/dictionary.css +3 -0
  329. data/vendor/local/share/groonga/examples/dictionary/html/index.html +26 -0
  330. data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +51 -0
  331. data/vendor/local/share/groonga/examples/dictionary/html/js/jquery-1.4.2.min.js +154 -0
  332. data/vendor/local/share/groonga/examples/dictionary/init_db.sh +10 -0
  333. data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +42 -0
  334. data/vendor/local/share/groonga/examples/dictionary/readme.txt +71 -0
  335. data/vendor/local/share/man/man1/groonga.1 +5498 -0
  336. metadata +360 -118
  337. data/pkg-config.rb +0 -333
  338. data/pkg/rroonga-0.9.5/NEWS.ja.rdoc +0 -156
  339. data/pkg/rroonga-0.9.5/NEWS.rdoc +0 -158
  340. data/pkg/rroonga-0.9.5/README.ja.rdoc +0 -65
  341. data/pkg/rroonga-0.9.5/README.rdoc +0 -66
  342. data/pkg/rroonga-0.9.5/text/TUTORIAL.ja.rdoc +0 -394
  343. data/pkg/rroonga-0.9.5/text/expression.rdoc +0 -285
  344. data/test-unit/Rakefile +0 -40
  345. data/test-unit/TODO +0 -5
  346. data/test-unit/bin/testrb +0 -5
  347. data/test-unit/html/classic.html +0 -15
  348. data/test-unit/html/index.html +0 -25
  349. data/test-unit/html/index.html.ja +0 -27
  350. data/test-unit/lib/test/unit.rb +0 -323
  351. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
  352. data/test-unit/lib/test/unit/assertions.rb +0 -1230
  353. data/test-unit/lib/test/unit/attribute.rb +0 -125
  354. data/test-unit/lib/test/unit/autorunner.rb +0 -360
  355. data/test-unit/lib/test/unit/collector.rb +0 -36
  356. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  357. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  358. data/test-unit/lib/test/unit/collector/load.rb +0 -144
  359. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  360. data/test-unit/lib/test/unit/color-scheme.rb +0 -102
  361. data/test-unit/lib/test/unit/color.rb +0 -96
  362. data/test-unit/lib/test/unit/diff.rb +0 -724
  363. data/test-unit/lib/test/unit/error.rb +0 -130
  364. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  365. data/test-unit/lib/test/unit/failure.rb +0 -136
  366. data/test-unit/lib/test/unit/fixture.rb +0 -176
  367. data/test-unit/lib/test/unit/notification.rb +0 -129
  368. data/test-unit/lib/test/unit/omission.rb +0 -191
  369. data/test-unit/lib/test/unit/pending.rb +0 -150
  370. data/test-unit/lib/test/unit/priority.rb +0 -180
  371. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  372. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  373. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  374. data/test-unit/lib/test/unit/testcase.rb +0 -476
  375. data/test-unit/lib/test/unit/testresult.rb +0 -89
  376. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  377. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  378. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -466
  379. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
  380. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -92
  381. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -28
  382. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  383. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  384. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
  385. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  386. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  387. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  388. data/test-unit/lib/test/unit/version.rb +0 -7
  389. data/test-unit/sample/adder.rb +0 -13
  390. data/test-unit/sample/subtracter.rb +0 -12
  391. data/test-unit/sample/test_adder.rb +0 -20
  392. data/test-unit/sample/test_subtracter.rb +0 -20
  393. data/test-unit/sample/test_user.rb +0 -23
  394. data/test-unit/test/collector/test-descendant.rb +0 -133
  395. data/test-unit/test/collector/test-load.rb +0 -442
  396. data/test-unit/test/collector/test_dir.rb +0 -406
  397. data/test-unit/test/collector/test_objectspace.rb +0 -100
  398. data/test-unit/test/run-test.rb +0 -15
  399. data/test-unit/test/test-attribute.rb +0 -86
  400. data/test-unit/test/test-color-scheme.rb +0 -67
  401. data/test-unit/test/test-color.rb +0 -47
  402. data/test-unit/test/test-diff.rb +0 -518
  403. data/test-unit/test/test-emacs-runner.rb +0 -60
  404. data/test-unit/test/test-fixture.rb +0 -287
  405. data/test-unit/test/test-notification.rb +0 -33
  406. data/test-unit/test/test-omission.rb +0 -81
  407. data/test-unit/test/test-pending.rb +0 -70
  408. data/test-unit/test/test-priority.rb +0 -119
  409. data/test-unit/test/test-testcase.rb +0 -544
  410. data/test-unit/test/test_assertions.rb +0 -1151
  411. data/test-unit/test/test_error.rb +0 -26
  412. data/test-unit/test/test_failure.rb +0 -33
  413. data/test-unit/test/test_testresult.rb +0 -113
  414. data/test-unit/test/test_testsuite.rb +0 -129
  415. data/test-unit/test/testunit-test-util.rb +0 -14
  416. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  417. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  418. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  419. data/test-unit/test/util/test_observable.rb +0 -102
  420. data/test-unit/test/util/test_procwrapper.rb +0 -36
  421. data/vendor/local/lib/groonga/modules/functions/cast.dll +0 -0
@@ -0,0 +1,139 @@
1
+
2
+
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>3.8. 主キーによる前方一致検索 &mdash; groonga v1.0.2 documentation</title>
11
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+ <script type="text/javascript">
14
+ var DOCUMENTATION_OPTIONS = {
15
+ URL_ROOT: '../',
16
+ VERSION: '1.0.2',
17
+ COLLAPSE_INDEX: false,
18
+ FILE_SUFFIX: '.html',
19
+ HAS_SOURCE: true
20
+ };
21
+ </script>
22
+ <script type="text/javascript" src="../_static/jquery.js"></script>
23
+ <script type="text/javascript" src="../_static/underscore.js"></script>
24
+ <script type="text/javascript" src="../_static/doctools.js"></script>
25
+ <link rel="top" title="groonga v1.0.2 documentation" href="../index.html" />
26
+ <link rel="up" title="3. チュートリアル" href="../tutorial.html" />
27
+ <link rel="next" title="3.9. 全文検索の語彙表に対する追加情報" href="tutorial09.html" />
28
+ <link rel="prev" title="3.7. match_columnsパラメータ" href="tutorial07.html" />
29
+ </head>
30
+ <body>
31
+ <div class="related">
32
+ <h3>Navigation</h3>
33
+ <ul>
34
+ <li class="right" style="margin-right: 10px">
35
+ <a href="../genindex.html" title="General Index"
36
+ accesskey="I">index</a></li>
37
+ <li class="right" >
38
+ <a href="tutorial09.html" title="3.9. 全文検索の語彙表に対する追加情報"
39
+ accesskey="N">next</a> |</li>
40
+ <li class="right" >
41
+ <a href="tutorial07.html" title="3.7. match_columnsパラメータ"
42
+ accesskey="P">previous</a> |</li>
43
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
44
+ <li><a href="../tutorial.html" accesskey="U">3. チュートリアル</a> &raquo;</li>
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="document">
49
+ <div class="documentwrapper">
50
+ <div class="bodywrapper">
51
+ <div class="body">
52
+
53
+ <div class="section" id="id1">
54
+ <h1>3.8. 主キーによる前方一致検索<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
55
+ <p>groongaのテーブルは、テーブル作成時にパトリシア木オプションを指定すると、前方一致検索を行うことができます。また、追加のオプションを指定することにより、主キーの後方一致検索をも行うことができます。</p>
56
+ <div class="section" id="id2">
57
+ <h2>3.8.1. 主キーによる前方一致検索<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
58
+ <p>table_createコマンドのflagsオプションにTABLE_PAT_KEYを指定することで、主キーによる前方一致検索ができるようになります。</p>
59
+ <p>実行例</p>
60
+ <div class="highlight-none"><div class="highlight"><pre>&gt; table_create --name PatPre --flags TABLE_PAT_KEY --key_type ShortText
61
+ [[0,1280378814.93737,0.10571],true]
62
+ &gt; load --table PatPre
63
+ &gt; [
64
+ &gt; {&quot;_key&quot;:&quot;ひろゆき&quot;},
65
+ &gt; {&quot;_key&quot;:&quot;まろゆき&quot;},
66
+ &gt; {&quot;_key&quot;:&quot;ひろあき&quot;}
67
+ &gt; ]
68
+ [[0,1280378815.24384,1.001289],3]
69
+ &gt; select --table PatPre --query _key:@ひろ
70
+ [[0,1280378816.44578,0.022706],[[[2],[[&quot;_id&quot;,&quot;UInt32&quot;],[&quot;_key&quot;,&quot;ShortText&quot;]],[3,&quot;ひろあき&quot;],[1,&quot;ひろゆき&quot;]]]]
71
+ </pre></div>
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+
77
+ </div>
78
+ </div>
79
+ </div>
80
+ <div class="sphinxsidebar">
81
+ <div class="sphinxsidebarwrapper">
82
+ <h3><a href="../index.html">Table Of Contents</a></h3>
83
+ <ul>
84
+ <li><a class="reference internal" href="#">3.8. 主キーによる前方一致検索</a><ul>
85
+ <li><a class="reference internal" href="#id2">3.8.1. 主キーによる前方一致検索</a></li>
86
+ </ul>
87
+ </li>
88
+ </ul>
89
+
90
+ <h4>Previous topic</h4>
91
+ <p class="topless"><a href="tutorial07.html"
92
+ title="previous chapter">3.7. match_columnsパラメータ</a></p>
93
+ <h4>Next topic</h4>
94
+ <p class="topless"><a href="tutorial09.html"
95
+ title="next chapter">3.9. 全文検索の語彙表に対する追加情報</a></p>
96
+ <h3>This Page</h3>
97
+ <ul class="this-page-menu">
98
+ <li><a href="../_sources/tutorial/tutorial08.txt"
99
+ rel="nofollow">Show Source</a></li>
100
+ </ul>
101
+ <div id="searchbox" style="display: none">
102
+ <h3>Quick search</h3>
103
+ <form class="search" action="../search.html" method="get">
104
+ <input type="text" name="q" size="18" />
105
+ <input type="submit" value="Go" />
106
+ <input type="hidden" name="check_keywords" value="yes" />
107
+ <input type="hidden" name="area" value="default" />
108
+ </form>
109
+ <p class="searchtip" style="font-size: 90%">
110
+ Enter search terms or a module, class or function name.
111
+ </p>
112
+ </div>
113
+ <script type="text/javascript">$('#searchbox').show(0);</script>
114
+ </div>
115
+ </div>
116
+ <div class="clearer"></div>
117
+ </div>
118
+ <div class="related">
119
+ <h3>Navigation</h3>
120
+ <ul>
121
+ <li class="right" style="margin-right: 10px">
122
+ <a href="../genindex.html" title="General Index"
123
+ >index</a></li>
124
+ <li class="right" >
125
+ <a href="tutorial09.html" title="3.9. 全文検索の語彙表に対する追加情報"
126
+ >next</a> |</li>
127
+ <li class="right" >
128
+ <a href="tutorial07.html" title="3.7. match_columnsパラメータ"
129
+ >previous</a> |</li>
130
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
131
+ <li><a href="../tutorial.html" >3. チュートリアル</a> &raquo;</li>
132
+ </ul>
133
+ </div>
134
+ <div class="footer">
135
+ &copy; Copyright 2009-2010, Brazil, Inc.
136
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
137
+ </div>
138
+ </body>
139
+ </html>
@@ -0,0 +1,114 @@
1
+
2
+
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>3.9. 全文検索の語彙表に対する追加情報 &mdash; groonga v1.0.2 documentation</title>
11
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+ <script type="text/javascript">
14
+ var DOCUMENTATION_OPTIONS = {
15
+ URL_ROOT: '../',
16
+ VERSION: '1.0.2',
17
+ COLLAPSE_INDEX: false,
18
+ FILE_SUFFIX: '.html',
19
+ HAS_SOURCE: true
20
+ };
21
+ </script>
22
+ <script type="text/javascript" src="../_static/jquery.js"></script>
23
+ <script type="text/javascript" src="../_static/underscore.js"></script>
24
+ <script type="text/javascript" src="../_static/doctools.js"></script>
25
+ <link rel="top" title="groonga v1.0.2 documentation" href="../index.html" />
26
+ <link rel="up" title="3. チュートリアル" href="../tutorial.html" />
27
+ <link rel="next" title="3.10. マイクロブログ検索システムの作成" href="tutorial10.html" />
28
+ <link rel="prev" title="3.8. 主キーによる前方一致検索" href="tutorial08.html" />
29
+ </head>
30
+ <body>
31
+ <div class="related">
32
+ <h3>Navigation</h3>
33
+ <ul>
34
+ <li class="right" style="margin-right: 10px">
35
+ <a href="../genindex.html" title="General Index"
36
+ accesskey="I">index</a></li>
37
+ <li class="right" >
38
+ <a href="tutorial10.html" title="3.10. マイクロブログ検索システムの作成"
39
+ accesskey="N">next</a> |</li>
40
+ <li class="right" >
41
+ <a href="tutorial08.html" title="3.8. 主キーによる前方一致検索"
42
+ accesskey="P">previous</a> |</li>
43
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
44
+ <li><a href="../tutorial.html" accesskey="U">3. チュートリアル</a> &raquo;</li>
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="document">
49
+ <div class="documentwrapper">
50
+ <div class="bodywrapper">
51
+ <div class="body">
52
+
53
+ <div class="section" id="id1">
54
+ <h1>3.9. 全文検索の語彙表に対する追加情報<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
55
+ <p>groongaでは、全文検索に用いるための語意表がテーブルとして扱えます。よって、語彙ごとに複数の情報を保持することができます。例えば、語彙の出現数や検索ストップワードのフラグ、単語の重要度などを保持することができます。</p>
56
+ <p>この項目については、現在執筆中です。</p>
57
+ </div>
58
+
59
+
60
+ </div>
61
+ </div>
62
+ </div>
63
+ <div class="sphinxsidebar">
64
+ <div class="sphinxsidebarwrapper">
65
+ <h4>Previous topic</h4>
66
+ <p class="topless"><a href="tutorial08.html"
67
+ title="previous chapter">3.8. 主キーによる前方一致検索</a></p>
68
+ <h4>Next topic</h4>
69
+ <p class="topless"><a href="tutorial10.html"
70
+ title="next chapter">3.10. マイクロブログ検索システムの作成</a></p>
71
+ <h3>This Page</h3>
72
+ <ul class="this-page-menu">
73
+ <li><a href="../_sources/tutorial/tutorial09.txt"
74
+ rel="nofollow">Show Source</a></li>
75
+ </ul>
76
+ <div id="searchbox" style="display: none">
77
+ <h3>Quick search</h3>
78
+ <form class="search" action="../search.html" method="get">
79
+ <input type="text" name="q" size="18" />
80
+ <input type="submit" value="Go" />
81
+ <input type="hidden" name="check_keywords" value="yes" />
82
+ <input type="hidden" name="area" value="default" />
83
+ </form>
84
+ <p class="searchtip" style="font-size: 90%">
85
+ Enter search terms or a module, class or function name.
86
+ </p>
87
+ </div>
88
+ <script type="text/javascript">$('#searchbox').show(0);</script>
89
+ </div>
90
+ </div>
91
+ <div class="clearer"></div>
92
+ </div>
93
+ <div class="related">
94
+ <h3>Navigation</h3>
95
+ <ul>
96
+ <li class="right" style="margin-right: 10px">
97
+ <a href="../genindex.html" title="General Index"
98
+ >index</a></li>
99
+ <li class="right" >
100
+ <a href="tutorial10.html" title="3.10. マイクロブログ検索システムの作成"
101
+ >next</a> |</li>
102
+ <li class="right" >
103
+ <a href="tutorial08.html" title="3.8. 主キーによる前方一致検索"
104
+ >previous</a> |</li>
105
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
106
+ <li><a href="../tutorial.html" >3. チュートリアル</a> &raquo;</li>
107
+ </ul>
108
+ </div>
109
+ <div class="footer">
110
+ &copy; Copyright 2009-2010, Brazil, Inc.
111
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
112
+ </div>
113
+ </body>
114
+ </html>
@@ -0,0 +1,458 @@
1
+
2
+
3
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>3.10. マイクロブログ検索システムの作成 &mdash; groonga v1.0.2 documentation</title>
11
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
12
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
+ <script type="text/javascript">
14
+ var DOCUMENTATION_OPTIONS = {
15
+ URL_ROOT: '../',
16
+ VERSION: '1.0.2',
17
+ COLLAPSE_INDEX: false,
18
+ FILE_SUFFIX: '.html',
19
+ HAS_SOURCE: true
20
+ };
21
+ </script>
22
+ <script type="text/javascript" src="../_static/jquery.js"></script>
23
+ <script type="text/javascript" src="../_static/underscore.js"></script>
24
+ <script type="text/javascript" src="../_static/doctools.js"></script>
25
+ <link rel="top" title="groonga v1.0.2 documentation" href="../index.html" />
26
+ <link rel="up" title="3. チュートリアル" href="../tutorial.html" />
27
+ <link rel="next" title="4. リファレンスマニュアル" href="../reference.html" />
28
+ <link rel="prev" title="3.9. 全文検索の語彙表に対する追加情報" href="tutorial09.html" />
29
+ </head>
30
+ <body>
31
+ <div class="related">
32
+ <h3>Navigation</h3>
33
+ <ul>
34
+ <li class="right" style="margin-right: 10px">
35
+ <a href="../genindex.html" title="General Index"
36
+ accesskey="I">index</a></li>
37
+ <li class="right" >
38
+ <a href="../reference.html" title="4. リファレンスマニュアル"
39
+ accesskey="N">next</a> |</li>
40
+ <li class="right" >
41
+ <a href="tutorial09.html" title="3.9. 全文検索の語彙表に対する追加情報"
42
+ accesskey="P">previous</a> |</li>
43
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
44
+ <li><a href="../tutorial.html" accesskey="U">3. チュートリアル</a> &raquo;</li>
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="document">
49
+ <div class="documentwrapper">
50
+ <div class="bodywrapper">
51
+ <div class="body">
52
+
53
+ <div class="section" id="id1">
54
+ <h1>3.10. マイクロブログ検索システムの作成<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h1>
55
+ <p>これまで学んだgroongaの機能を用いて、マイクロブログの検索システムを作成してみましょう。マイクロブログとは、Twitterのような短いメッセージを投稿するブログです。</p>
56
+ <div class="section" id="id2">
57
+ <h2>3.10.1. テーブルの作成<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
58
+ <p>まずは、テーブルを作成します。</p>
59
+ <div class="highlight-none"><div class="highlight"><pre>table_create --name Users --flags TABLE_HASH_KEY --key_type ShortText
60
+ table_create --name Comments --flags TABLE_HASH_KEY --key_type ShortText
61
+ table_create --name HashTags --flags TABLE_HASH_KEY --key_type ShortText
62
+ table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
63
+
64
+ column_create --table Users --name name --flags COLUMN_SCALAR --type ShortText
65
+ column_create --table Users --name follower --flags COLUMN_VECTOR --type Users
66
+ column_create --table Users --name favorites --flags COLUMN_VECTOR --type Comments
67
+ column_create --table Users --name location --flags COLUMN_SCALAR --type WGS84GeoPoint
68
+ column_create --table Users --name location_str --flags COLUMN_SCALAR --type ShortText
69
+ column_create --table Users --name description --flags COLUMN_SCALAR --type ShortText
70
+ column_create --table Users --name folowee --flags COLUMN_INDEX --type Users --source follower
71
+
72
+ column_create --table Comments --name comment --flags COLUMN_SCALAR --type ShortText
73
+ column_create --table Comments --name last_modified --flags COLUMN_SCALAR --type Time
74
+ column_create --table Comments --name replied_to --flags COLUMN_SCALAR --type Comments
75
+ column_create --table Comments --name replied_users --flags COLUMN_VECTOR --type Users
76
+ column_create --table Comments --name hash_tags --flags COLUMN_VECTOR --type HashTags
77
+ column_create --table Comments --name location --flags COLUMN_SCALAR --type WGS84GeoPoint
78
+ column_create --table Comments --name posted_by --flags COLUMN_SCALAR --type Users
79
+ column_create --table Comments --name favorited_by --flags COLUMN_INDEX --type Users --source favorites
80
+
81
+ column_create --table HashTags --name hash_index --flags COLUMN_INDEX --type Comments --source hash_tags
82
+
83
+ column_create --table Bigram --name users_index --flags COLUMN_INDEX|WITH_POSITION|WITH_SECTION --type Users --source name,location_str,description
84
+ column_create --table Bigram --name comment_index --flags COLUMN_INDEX|WITH_POSITION --type Comments --source comment
85
+ </pre></div>
86
+ </div>
87
+ <div class="section" id="users">
88
+ <h3>3.10.1.1. Usersテーブル<a class="headerlink" href="#users" title="Permalink to this headline">¶</a></h3>
89
+ <p>ユーザーの名前や自己紹介文、フォローしているユーザー一覧など、ユーザー情報を格納するためのテーブルです。</p>
90
+ <dl class="docutils">
91
+ <dt><tt class="docutils literal"><span class="pre">_key</span></tt></dt>
92
+ <dd>ユーザーID</dd>
93
+ <dt><tt class="docutils literal"><span class="pre">name</span></tt></dt>
94
+ <dd>ユーザー名</dd>
95
+ <dt><tt class="docutils literal"><span class="pre">follower</span></tt></dt>
96
+ <dd>フォローしているユーザーの一覧</dd>
97
+ <dt><tt class="docutils literal"><span class="pre">favorites</span></tt></dt>
98
+ <dd>お気に入りのコメント一覧</dd>
99
+ <dt><tt class="docutils literal"><span class="pre">location</span></tt></dt>
100
+ <dd>ユーザーの現在地(緯度経度座標)</dd>
101
+ <dt><tt class="docutils literal"><span class="pre">location_str</span></tt></dt>
102
+ <dd>ユーザーの現在地(文字列)</dd>
103
+ <dt><tt class="docutils literal"><span class="pre">description</span></tt></dt>
104
+ <dd>ユーザーの自己紹介</dd>
105
+ <dt><tt class="docutils literal"><span class="pre">folowee</span></tt></dt>
106
+ <dd>Usersテーブルのfollowerカラムに対するインデックス。
107
+ このインデックスを作ることで、あるユーザーをフォローしているユーザーを検索できるようになります。</dd>
108
+ </dl>
109
+ </div>
110
+ <div class="section" id="comments">
111
+ <h3>3.10.1.2. Commentsテーブル<a class="headerlink" href="#comments" title="Permalink to this headline">¶</a></h3>
112
+ <p>コメント内容や投稿日時、返信先情報など、コメントに関する内容を格納するテーブルです。</p>
113
+ <dl class="docutils">
114
+ <dt><tt class="docutils literal"><span class="pre">_key</span></tt></dt>
115
+ <dd>コメントID</dd>
116
+ <dt><tt class="docutils literal"><span class="pre">comment</span></tt></dt>
117
+ <dd>コメント内容</dd>
118
+ <dt><tt class="docutils literal"><span class="pre">last_modified</span></tt></dt>
119
+ <dd>投稿日時</dd>
120
+ <dt><tt class="docutils literal"><span class="pre">replied_to</span></tt></dt>
121
+ <dd>返信元のコメント内容</dd>
122
+ <dt><tt class="docutils literal"><span class="pre">replied_users</span></tt></dt>
123
+ <dd>返信先のユーザーの一覧</dd>
124
+ <dt><tt class="docutils literal"><span class="pre">hash_tags</span></tt></dt>
125
+ <dd>コメントのハッシュタグの一覧</dd>
126
+ <dt><tt class="docutils literal"><span class="pre">location</span></tt></dt>
127
+ <dd>投稿場所(緯度経度座標のため)</dd>
128
+ <dt><tt class="docutils literal"><span class="pre">posted_by</span></tt></dt>
129
+ <dd>コメントを書いたユーザー</dd>
130
+ <dt><tt class="docutils literal"><span class="pre">favorited_by</span></tt></dt>
131
+ <dd>Usersテーブルのfavoritesカラムに対するインデックス。
132
+ このインデックスを作ることで、指定したコメントを誰がお気に入りに入れているのかを検索できるようになります。</dd>
133
+ </dl>
134
+ </div>
135
+ <div class="section" id="hashtags">
136
+ <h3>3.10.1.3. HashTagsテーブル<a class="headerlink" href="#hashtags" title="Permalink to this headline">¶</a></h3>
137
+ <p>コメントのハッシュタグを一覧で保存するためのテーブルです。</p>
138
+ <dl class="docutils">
139
+ <dt><tt class="docutils literal"><span class="pre">_key</span></tt></dt>
140
+ <dd>ハッシュタグ</dd>
141
+ <dt><tt class="docutils literal"><span class="pre">hash_index</span></tt></dt>
142
+ <dd>「Comments.hash_tags」のインデックス。
143
+ このインデックスを作ることで、指定したハッシュタグのついているコメントの一覧を出すことが出来るようになります。</dd>
144
+ </dl>
145
+ </div>
146
+ <div class="section" id="bigram">
147
+ <h3>3.10.1.4. Bigramテーブル<a class="headerlink" href="#bigram" title="Permalink to this headline">¶</a></h3>
148
+ <p>ユーザー情報・コメントで全文検索が出来るようにするためのインデックスを格納するテーブルです。</p>
149
+ <dl class="docutils">
150
+ <dt><tt class="docutils literal"><span class="pre">_key</span></tt></dt>
151
+ <dd>単語</dd>
152
+ <dt><tt class="docutils literal"><span class="pre">users_index</span></tt></dt>
153
+ <dd>ユーザー情報のインデックス。
154
+ このカラムは、ユーザー名「Users.name」、現在地「Users.location_str」、自己紹介文「Users.description」のインデックスになっています。</dd>
155
+ <dt><tt class="docutils literal"><span class="pre">comment_index</span></tt></dt>
156
+ <dd>コメント内容「Comments.comment」のインデックス</dd>
157
+ </dl>
158
+ </div>
159
+ </div>
160
+ <div class="section" id="id3">
161
+ <h2>3.10.2. データのロード<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
162
+ <p>つづいて、テスト用データをロードします。</p>
163
+ <div class="highlight-none"><div class="highlight"><pre>load --table Users
164
+ [
165
+ {
166
+ &quot;_key&quot;: &quot;daijiro&quot;,
167
+ &quot;name&quot;: &quot;hsiomaneki&quot;,
168
+ &quot;follower&quot;: [&quot;tasukuchan&quot;],
169
+ &quot;favorites&quot;: [],
170
+ &quot;location&quot;: &quot;127678039x502643091&quot;,
171
+ &quot;location_str&quot;: &quot;神奈川県&quot;,
172
+ &quot;description&quot;: &quot;groonga developer&quot;
173
+ },
174
+ {
175
+ &quot;_key&quot;: &quot;tasukuchan&quot;,
176
+ &quot;name&quot;: &quot;グニャラくん&quot;,
177
+ &quot;follower&quot;: [&quot;daijiro&quot;,&quot;OffGao&quot;],
178
+ &quot;favorites&quot;: [&quot;daijiro:1&quot;,&quot;OffGao:1&quot;],
179
+ &quot;location&quot;: &quot;128423343x502929252&quot;,
180
+ &quot;location_str&quot;: &quot;東京都渋谷区&quot;,
181
+ &quot;description&quot;: &quot;エロいおっさん&quot;
182
+ },
183
+ {
184
+ &quot;_key&quot;: &quot;OffGao&quot;,
185
+ &quot;name&quot;: &quot;OffGao&quot;,
186
+ &quot;follower&quot;: [&quot;tasukuchan&quot;,&quot;daijiro&quot;],
187
+ &quot;favorites&quot;: [&quot;tasukuchan:1&quot;,&quot;daijiro:1&quot;],
188
+ &quot;location&quot;: &quot;128544408x502801502&quot;,
189
+ &quot;location_str&quot;: &quot;東京都中野区&quot;,
190
+ &quot;description&quot;: &quot;がおがお&quot;
191
+ }
192
+ ]
193
+
194
+ load --table Comments
195
+ [
196
+ {
197
+ &quot;_key&quot;: &quot;daijiro:1&quot;,
198
+ &quot;comment&quot;: &quot;マイクロブログ作ってみました(甘栗むいちゃいました的な感じで)。&quot;,
199
+ &quot;last_modified&quot;: &quot;2010/03/17 12:05:00&quot;,
200
+ &quot;posted_by&quot;: &quot;daijiro&quot;,
201
+ },
202
+ {
203
+ &quot;_key&quot;: &quot;tasukuchan:1&quot;,
204
+ &quot;comment&quot;: &quot;初の書き込み。テストテスト。&quot;,
205
+ &quot;last_modified&quot;: &quot;2010/03/17 12:00:00&quot;,
206
+ &quot;posted_by&quot;: &quot;tasukuchan&quot;,
207
+ },
208
+ {
209
+ &quot;_key&quot;: &quot;daijiro:2&quot;,
210
+ &quot;comment&quot;: &quot;@tasukuchan ようこそ!!!&quot;,
211
+ &quot;last_modified&quot;: &quot;2010/03/17 12:05:00&quot;,
212
+ &quot;replied_to&quot;: &quot;tasukuchan:1&quot;,
213
+ &quot;replied_users&quot;: [&quot;tasukuchan&quot;],
214
+ &quot;posted_by&quot;: &quot;daijiro&quot;,
215
+ },
216
+ {
217
+ &quot;_key&quot;: &quot;tasukuchan:2&quot;,
218
+ &quot;comment&quot;: &quot;@daijiro ありがとう!&quot;,
219
+ &quot;last_modified&quot;: &quot;2010/03/17 13:00:00&quot;,
220
+ &quot;replied_to&quot;: &quot;daijiro:2&quot;,
221
+ &quot;replied_users&quot;: [&quot;daijiro&quot;],
222
+ &quot;posted_by&quot;: &quot;tasukuchan&quot;,
223
+ },
224
+ {
225
+ &quot;_key&quot;: &quot;tasukuchan:3&quot;,
226
+ &quot;comment&quot;: &quot;groongaなう #groonga&quot;,
227
+ &quot;last_modified&quot;: &quot;2010/03/17 14:00:00&quot;,
228
+ &quot;hash_tags&quot;: [&quot;groonga&quot;],
229
+ &quot;location&quot;: &quot;127972422x503117107&quot;,
230
+ &quot;posted_by&quot;: &quot;tasukuchan&quot;,
231
+ },
232
+ {
233
+ &quot;_key&quot;: &quot;tasukuchan:4&quot;,
234
+ &quot;comment&quot;: &quot;groonga開発合宿のため羽田空港に来ました! #groonga #travel&quot;,
235
+ &quot;last_modified&quot;: &quot;2010/03/17 14:05:00&quot;,
236
+ &quot;hash_tags&quot;: [&quot;groonga&quot;, &quot;travel&quot;],
237
+ &quot;location&quot;: &quot;127975798x502919856&quot;,
238
+ &quot;posted_by&quot;: &quot;tasukuchan&quot;,
239
+ },
240
+ {
241
+ &quot;_key&quot;: &quot;OffGao:1&quot;,
242
+ &quot;comment&quot;: &quot;@daijiro @tasukuchan 登録してみましたよー!&quot;,
243
+ &quot;last_modified&quot;: &quot;2010/03/17 15:00:00&quot;,
244
+ &quot;replied_users&quot;: [&quot;daijiro&quot;, &quot;tasukuchan&quot;],
245
+ &quot;location&quot;: &quot;128551935x502796433&quot;,
246
+ &quot;posted_by&quot;: &quot;OffGao&quot;,
247
+ }
248
+ {
249
+ &quot;_key&quot;: &quot;OffGao:2&quot;,
250
+ &quot;comment&quot;: &quot;中野ブロードウェイなうなう&quot;,
251
+ &quot;last_modified&quot;: &quot;2010/03/17 15:05:00&quot;,
252
+ &quot;location&quot;: &quot;128551935x502796434&quot;,
253
+ &quot;posted_by&quot;: &quot;OffGao&quot;,
254
+ }
255
+ ]
256
+ </pre></div>
257
+ </div>
258
+ <p>Usersテーブルのfollowerカラムとfavoritesカラム、そしてCommentsテーブルのreplied_usersカラムは、ベクターカラムです。そのため、これらのカラムは配列で値を指定します。</p>
259
+ <p>Usersテーブルのlocationカラムと、Commentsテーブルのlocationカラムは、GeoPoint型です。この型での値の指定は、&#8221;[緯度]x[経度]&#8221;と記述して指定します。</p>
260
+ <p>Commentsテーブルのlast_modifiedカラムは、Time型です。この型での値の指定方法は、マイクロ秒数の値を直接指定する方法のほかに、文字列で指定する方法もあります。&#8221;年/月/日 時:分:秒&#8221;というフォーマットで記述することで、データロードの際に文字列からキャストされ、マイクロ秒数の値が格納されます。</p>
261
+ </div>
262
+ <div class="section" id="id4">
263
+ <h2>3.10.3. 検索<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
264
+ <p>それでは、実際に検索をしてみましょう。</p>
265
+ <div class="section" id="id5">
266
+ <h3>3.10.3.1. キーワードでユーザー検索<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
267
+ <p>ここでは、 <a class="reference internal" href="tutorial07.html"><em>match_columnsパラメータ</em></a> で扱った、複数カラムを対象とした検索を行います。
268
+ 指定された文字列で、ユーザー名・現在地・自己紹介文を対象に検索をします。</p>
269
+ <p>実行例</p>
270
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Users --match_columns name,location_str,description --query 東京 --output_columns _key,name
271
+ [[0,1280378873.00607,0.00053],[[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;name&quot;,&quot;ShortText&quot;]],[&quot;tasukuchan&quot;,&quot;グニャラくん&quot;],[&quot;OffGao&quot;,&quot;OffGao&quot;]]]]
272
+ </pre></div>
273
+ </div>
274
+ <p>「東京」をキーワードにユーザー検索した結果、東京都に住んでいる「グニャラくん」と「OffGao」がヒットしました。</p>
275
+ </div>
276
+ <div class="section" id="geopoint">
277
+ <h3>3.10.3.2. GeoPointでユーザー検索<a class="headerlink" href="#geopoint" title="Permalink to this headline">¶</a></h3>
278
+ <p>ここでは、 <a class="reference internal" href="tutorial04.html"><em>さまざまな検索条件の指定</em></a> で扱った、GeoPoint型のカラムで検索をします。
279
+ 以下の例では、指定された位置から5000m以内にいるユーザーを検索しています。</p>
280
+ <p>実行例</p>
281
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Users --filter &#39;geo_in_circle(location,&quot;128484216x502919856&quot;,5000)&#39; --output_columns _key,name
282
+ [[0,1280378873.20845,0.000337],[[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;name&quot;,&quot;ShortText&quot;]],[&quot;tasukuchan&quot;,&quot;グニャラくん&quot;],[&quot;OffGao&quot;,&quot;OffGao&quot;]]]]
283
+ </pre></div>
284
+ </div>
285
+ <p>新宿駅から5km以内にすんでいるユーザーを検索したところ、「グニャラくん」と「OffGao」がヒットしました。</p>
286
+ </div>
287
+ <div class="section" id="id6">
288
+ <h3>3.10.3.3. あるユーザーをフォローしているユーザーの検索<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
289
+ <p>ここでは、 <a class="reference internal" href="tutorial06.html"><em>タグ検索・参照関係の逆引き</em></a> で扱った、参照関係の逆引きをします。
290
+ 以下の例では、Usersテーブルのfollowerカラムにあるフォローリストを逆引きします。</p>
291
+ <p>実行例</p>
292
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Users --query follower:@tasukuchan --output_columns _key,name
293
+ [[0,1280378873.4108,0.000311],[[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;name&quot;,&quot;ShortText&quot;]],[&quot;daijiro&quot;,&quot;hsiomaneki&quot;],[&quot;OffGao&quot;,&quot;OffGao&quot;]]]]
294
+ </pre></div>
295
+ </div>
296
+ <p>「グニャラくん」をフォローしている「hsiomaneki」と「OffGao」がヒットしました。</p>
297
+ </div>
298
+ <div class="section" id="id7">
299
+ <h3>3.10.3.4. GeoPointでコメント検索<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
300
+ <p>ある範囲内で書かれたコメントを検索します。
301
+ また、 <a class="reference internal" href="tutorial05.html"><em>ドリルダウン</em></a> で扱ったドリルダウンも行います。検索結果をハッシュタグとユーザーでドリルダウンし、ユーザー別・ハッシュタグ別のカウントを出します。</p>
302
+ <p>実行例</p>
303
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Comments --filter &#39;geo_in_circle(location,&quot;127975798x502919856&quot;,20000)&#39; --output_columns posted_by.name,comment --drilldown hash_tags,posted_by
304
+ [[0,1280378873.61299,0.000702],[[[4],[[&quot;posted_by.name&quot;,&quot;ShortText&quot;],[&quot;comment&quot;,&quot;ShortText&quot;]],[&quot;OffGao&quot;,&quot;@daijiro @tasukuchan 登録してみましたよー!&quot;],[&quot;グニャラくん&quot;,&quot;groongaなう #groonga&quot;],[&quot;グニャラくん&quot;,&quot;groonga開発合宿のため羽田空港に来ました! #groonga #travel&quot;],[&quot;OffGao&quot;,&quot;中野ブロードウェイなうなう&quot;]],[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;groonga&quot;,2],[&quot;travel&quot;,1]],[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;OffGao&quot;,2],[&quot;tasukuchan&quot;,2]]]]
305
+ </pre></div>
306
+ </div>
307
+ <p>範囲を広く指定したため、位置情報のあるすべてのコメントがヒットしました。そして、ヒットしたコメントからドリルダウンされた結果も返ってきており、ハッシュタグは「#groonga」が2つに「#travel」が1つ、投稿者は「グニャラくん」「OffGao」がそれぞれ2件ずつであることがわかります。</p>
308
+ </div>
309
+ <div class="section" id="id8">
310
+ <h3>3.10.3.5. キーワードでコメント検索<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
311
+ <p>あるキーワードを含むコメントを検索します。
312
+ さらに、 <a class="reference internal" href="tutorial04.html"><em>さまざまな検索条件の指定</em></a> で扱った、スコア値_scoreも出してみましょう。</p>
313
+ <p>実行例</p>
314
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Comments --query comment:@なう --output_columns comment,_score
315
+ [[0,1280378873.81946,0.000332],[[[2],[[&quot;comment&quot;,&quot;ShortText&quot;],[&quot;_score&quot;,&quot;Int32&quot;]],[&quot;groongaなう #groonga&quot;,1],[&quot;中野ブロードウェイなうなう&quot;,2]]]]
316
+ </pre></div>
317
+ </div>
318
+ <p>「なう」をキーワードにコメント検索した結果、2件のコメントがヒットしました。また、_scoreの値も返ってきており、「なう」の数が出力されていることが確認できます。</p>
319
+ </div>
320
+ <div class="section" id="id9">
321
+ <h3>3.10.3.6. GeoPointとキーワードでコメント検索<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
322
+ <p>今度は、キーワードとGeoPointの両方を条件に検索をしてみます。&#8211;queryと&#8211;filterの両方を使用した場合、両方の条件に一致するレコードがヒットします。</p>
323
+ <p>実行例</p>
324
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Comments --query comment:@羽田 --filter &#39;geo_in_circle(location,&quot;127975798x502919856&quot;,20000)&#39; --output_columns posted_by.name,comment --drilldown hash_tags,posted_by
325
+ [[0,1280378874.02194,0.000669],[[[1],[[&quot;posted_by.name&quot;,&quot;ShortText&quot;],[&quot;comment&quot;,&quot;ShortText&quot;]],[&quot;グニャラくん&quot;,&quot;groonga開発合宿のため羽田空港に来ました! #groonga #travel&quot;]],[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;groonga&quot;,1],[&quot;travel&quot;,1]],[[1],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;tasukuchan&quot;,1]]]]
326
+ </pre></div>
327
+ </div>
328
+ <p>両方の条件を満たすコメントが1件ヒットしました。また、ドリルダウンの結果も返ってきており、「グニャラくん」のコメント1件であることがわかります。</p>
329
+ </div>
330
+ <div class="section" id="id10">
331
+ <h3>3.10.3.7. ハッシュタグでコメント検索<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
332
+ <p>あるハッシュタグのついているコメントを検索します。
333
+ これも、 <a class="reference internal" href="tutorial06.html"><em>タグ検索・参照関係の逆引き</em></a> で扱った、参照関係の逆引きを使います。</p>
334
+ <p>実行例</p>
335
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Comments --query hash_tags:@groonga --output_columns posted_by.name,comment --drilldown posted_by
336
+ [[0,1280378874.22658,0.000485],[[[2],[[&quot;posted_by.name&quot;,&quot;ShortText&quot;],[&quot;comment&quot;,&quot;ShortText&quot;]],[&quot;グニャラくん&quot;,&quot;groongaなう #groonga&quot;],[&quot;グニャラくん&quot;,&quot;groonga開発合宿のため羽田空港に来ました! #groonga #travel&quot;]],[[1],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;tasukuchan&quot;,2]]]]
337
+ </pre></div>
338
+ </div>
339
+ <p>#groongaタグの付いている2件のコメントがヒットしました。また、投稿者のドリルダウンも返ってきており、2件とも「グニャラくん」のものであることがわかります。</p>
340
+ </div>
341
+ <div class="section" id="id">
342
+ <h3>3.10.3.8. ユーザーIDでコメント検索<a class="headerlink" href="#id" title="Permalink to this headline">¶</a></h3>
343
+ <p>あるユーザーが投稿したコメントを検索します。</p>
344
+ <p>実行例</p>
345
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Comments --query posted_by:tasukuchan --output_columns comment --drilldown hash_tags
346
+ [[0,1280378874.43074,0.000502],[[[4],[[&quot;comment&quot;,&quot;ShortText&quot;]],[&quot;初の書き込み。テストテスト。&quot;],[&quot;@daijiro ありがとう!&quot;],[&quot;groongaなう #groonga&quot;],[&quot;groonga開発合宿のため羽田空港に来ました! #groonga #travel&quot;]],[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;groonga&quot;,2],[&quot;travel&quot;,1]]]]
347
+ </pre></div>
348
+ </div>
349
+ <p>「グニャラくん」が書き込んだ4件のコメントがヒットしました。また、ハッシュタグでドリルダウンした結果も返ってきており、ハッシュタグは「#groonga」が2つに「#travel」が1つあることがわかります。</p>
350
+ </div>
351
+ <div class="section" id="id11">
352
+ <h3>3.10.3.9. ユーザーのお気に入りコメントを検索<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
353
+ <p>あるユーザーがお気に入りに入れているコメントを検索します。</p>
354
+ <p>実行例</p>
355
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select --table Users --query _key:tasukuchan --output_columns favorites.posted_by,favorites.comment
356
+ [[0,1280378874.63511,0.000327],[[[1],[[&quot;favorites.posted_by&quot;,&quot;Users&quot;],[&quot;favorites.comment&quot;,&quot;ShortText&quot;]],[[&quot;daijiro&quot;,&quot;OffGao&quot;],[&quot;マイクロブログ作ってみました(甘栗むいちゃいました的な感じで)。&quot;,&quot;@daijiro @tasukuchan 登録してみましたよー!&quot;]]]]]
357
+ </pre></div>
358
+ </div>
359
+ <p>「グニャラくん」がお気に入りに入れている2件のコメントがヒットしました。</p>
360
+ </div>
361
+ <div class="section" id="id12">
362
+ <h3>3.10.3.10. 投稿時間でコメント検索<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
363
+ <p>コメントの投稿時間で検索をします。Time型については <a class="reference internal" href="tutorial03.html"><em>さまざまな種類をもったデータの保存</em></a> で扱っています。
364
+ この例では、指定した時間よりも前に投稿されているコメントを検索します。</p>
365
+ <p>実行例</p>
366
+ <div class="highlight-none"><div class="highlight"><pre>&gt; select Comments --filter &#39;last_modified&lt;=1268802000&#39; --output_columns posted_by.name,comment,last_modified --drilldown hash_tags,posted_by
367
+ [[0,1280378874.83883,0.000681],[[[5],[[&quot;posted_by.name&quot;,&quot;ShortText&quot;],[&quot;comment&quot;,&quot;ShortText&quot;],[&quot;last_modified&quot;,&quot;Time&quot;]],[&quot;hsiomaneki&quot;,&quot;マイクロブログ作ってみました(甘栗むいちゃいました的な感じで)。&quot;,1268795100.0],[&quot;グニャラくん&quot;,&quot;初の書き込み。テストテスト。&quot;,1268794800.0],[&quot;hsiomaneki&quot;,&quot;@tasukuchan ようこそ!!!&quot;,1268795100.0],[&quot;グニャラくん&quot;,&quot;@daijiro ありがとう!&quot;,1268798400.0],[&quot;グニャラくん&quot;,&quot;groongaなう #groonga&quot;,1268802000.0]],[[1],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;groonga&quot;,1]],[[2],[[&quot;_key&quot;,&quot;ShortText&quot;],[&quot;_nsubrecs&quot;,&quot;Int32&quot;]],[&quot;daijiro&quot;,2],[&quot;tasukuchan&quot;,3]]]]
368
+ </pre></div>
369
+ </div>
370
+ <p>2010/03/17 14:00:00以前に書かれたコメント5件がヒットしました。また、ドリルダウンの結果も返ってきており、「hsiomaneki」が2件、「グニャラくん」が3件ヒットしていることがわかります。</p>
371
+ </div>
372
+ </div>
373
+ </div>
374
+
375
+
376
+ </div>
377
+ </div>
378
+ </div>
379
+ <div class="sphinxsidebar">
380
+ <div class="sphinxsidebarwrapper">
381
+ <h3><a href="../index.html">Table Of Contents</a></h3>
382
+ <ul>
383
+ <li><a class="reference internal" href="#">3.10. マイクロブログ検索システムの作成</a><ul>
384
+ <li><a class="reference internal" href="#id2">3.10.1. テーブルの作成</a><ul>
385
+ <li><a class="reference internal" href="#users">3.10.1.1. Usersテーブル</a></li>
386
+ <li><a class="reference internal" href="#comments">3.10.1.2. Commentsテーブル</a></li>
387
+ <li><a class="reference internal" href="#hashtags">3.10.1.3. HashTagsテーブル</a></li>
388
+ <li><a class="reference internal" href="#bigram">3.10.1.4. Bigramテーブル</a></li>
389
+ </ul>
390
+ </li>
391
+ <li><a class="reference internal" href="#id3">3.10.2. データのロード</a></li>
392
+ <li><a class="reference internal" href="#id4">3.10.3. 検索</a><ul>
393
+ <li><a class="reference internal" href="#id5">3.10.3.1. キーワードでユーザー検索</a></li>
394
+ <li><a class="reference internal" href="#geopoint">3.10.3.2. GeoPointでユーザー検索</a></li>
395
+ <li><a class="reference internal" href="#id6">3.10.3.3. あるユーザーをフォローしているユーザーの検索</a></li>
396
+ <li><a class="reference internal" href="#id7">3.10.3.4. GeoPointでコメント検索</a></li>
397
+ <li><a class="reference internal" href="#id8">3.10.3.5. キーワードでコメント検索</a></li>
398
+ <li><a class="reference internal" href="#id9">3.10.3.6. GeoPointとキーワードでコメント検索</a></li>
399
+ <li><a class="reference internal" href="#id10">3.10.3.7. ハッシュタグでコメント検索</a></li>
400
+ <li><a class="reference internal" href="#id">3.10.3.8. ユーザーIDでコメント検索</a></li>
401
+ <li><a class="reference internal" href="#id11">3.10.3.9. ユーザーのお気に入りコメントを検索</a></li>
402
+ <li><a class="reference internal" href="#id12">3.10.3.10. 投稿時間でコメント検索</a></li>
403
+ </ul>
404
+ </li>
405
+ </ul>
406
+ </li>
407
+ </ul>
408
+
409
+ <h4>Previous topic</h4>
410
+ <p class="topless"><a href="tutorial09.html"
411
+ title="previous chapter">3.9. 全文検索の語彙表に対する追加情報</a></p>
412
+ <h4>Next topic</h4>
413
+ <p class="topless"><a href="../reference.html"
414
+ title="next chapter">4. リファレンスマニュアル</a></p>
415
+ <h3>This Page</h3>
416
+ <ul class="this-page-menu">
417
+ <li><a href="../_sources/tutorial/tutorial10.txt"
418
+ rel="nofollow">Show Source</a></li>
419
+ </ul>
420
+ <div id="searchbox" style="display: none">
421
+ <h3>Quick search</h3>
422
+ <form class="search" action="../search.html" method="get">
423
+ <input type="text" name="q" size="18" />
424
+ <input type="submit" value="Go" />
425
+ <input type="hidden" name="check_keywords" value="yes" />
426
+ <input type="hidden" name="area" value="default" />
427
+ </form>
428
+ <p class="searchtip" style="font-size: 90%">
429
+ Enter search terms or a module, class or function name.
430
+ </p>
431
+ </div>
432
+ <script type="text/javascript">$('#searchbox').show(0);</script>
433
+ </div>
434
+ </div>
435
+ <div class="clearer"></div>
436
+ </div>
437
+ <div class="related">
438
+ <h3>Navigation</h3>
439
+ <ul>
440
+ <li class="right" style="margin-right: 10px">
441
+ <a href="../genindex.html" title="General Index"
442
+ >index</a></li>
443
+ <li class="right" >
444
+ <a href="../reference.html" title="4. リファレンスマニュアル"
445
+ >next</a> |</li>
446
+ <li class="right" >
447
+ <a href="tutorial09.html" title="3.9. 全文検索の語彙表に対する追加情報"
448
+ >previous</a> |</li>
449
+ <li><a href="../index.html">groonga v1.0.2 documentation</a> &raquo;</li>
450
+ <li><a href="../tutorial.html" >3. チュートリアル</a> &raquo;</li>
451
+ </ul>
452
+ </div>
453
+ <div class="footer">
454
+ &copy; Copyright 2009-2010, Brazil, Inc.
455
+ Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
456
+ </div>
457
+ </body>
458
+ </html>