rroonga 5.0.9-x86-mingw32 → 5.1.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (629) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/ext/groonga/{rb-grn-conf.c → rb-grn-config.c} +18 -13
  4. data/ext/groonga/rb-grn-database.c +83 -0
  5. data/ext/groonga/rb-grn-fix-size-column.c +85 -0
  6. data/ext/groonga/rb-grn-index-column.c +82 -0
  7. data/ext/groonga/rb-grn-object.c +67 -1
  8. data/ext/groonga/rb-grn-table-key-support.c +87 -1
  9. data/ext/groonga/rb-grn-table.c +2 -2
  10. data/ext/groonga/rb-grn-variable-size-column.c +84 -1
  11. data/ext/groonga/rb-grn.h +5 -5
  12. data/ext/groonga/rb-groonga.c +27 -1
  13. data/lib/2.0/groonga.so +0 -0
  14. data/lib/2.1/groonga.so +0 -0
  15. data/lib/2.2/groonga.so +0 -0
  16. data/lib/2.3/groonga.so +0 -0
  17. data/lib/groonga/context.rb +12 -3
  18. data/lib/groonga/expression-builder.rb +2 -1
  19. data/rroonga-build.rb +6 -6
  20. data/test/test-accessor.rb +30 -0
  21. data/test/{test-conf.rb → test-config.rb} +5 -5
  22. data/test/test-database.rb +41 -0
  23. data/test/test-fix-size-column.rb +84 -0
  24. data/test/test-index-column.rb +71 -1
  25. data/test/test-package-label.rb +20 -0
  26. data/test/test-table-key-support.rb +42 -0
  27. data/test/test-table.rb +13 -0
  28. data/test/test-variable-size-column.rb +71 -1
  29. data/vendor/local/bin/grndb.exe +0 -0
  30. data/vendor/local/bin/groonga-benchmark.exe +0 -0
  31. data/vendor/local/bin/groonga.exe +0 -0
  32. data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
  33. data/vendor/local/bin/libgroonga-0.dll +0 -0
  34. data/vendor/local/bin/libmecab-1.dll +0 -0
  35. data/vendor/local/bin/libmsgpack-4.dll +0 -0
  36. data/vendor/local/bin/libmsgpackc-2.dll +0 -0
  37. data/vendor/local/bin/libonig-5.dll +0 -0
  38. data/vendor/local/bin/libstdc++-6.dll +0 -0
  39. data/vendor/local/bin/lz4.exe +0 -0
  40. data/vendor/local/bin/lz4c.exe +0 -0
  41. data/vendor/local/bin/lz4cat +0 -0
  42. data/vendor/local/bin/mecab.exe +0 -0
  43. data/vendor/local/bin/zlib1.dll +0 -0
  44. data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +9 -9
  45. data/vendor/local/include/groonga/groonga.h +1 -0
  46. data/vendor/local/include/groonga/groonga/file_reader.h +40 -0
  47. data/vendor/local/include/groonga/groonga/groonga.h +1 -0
  48. data/vendor/local/include/groonga/groonga/obj.h +7 -42
  49. data/vendor/local/include/groonga/groonga/portability.h +4 -4
  50. data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
  51. data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
  52. data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
  53. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
  54. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
  55. data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
  56. data/vendor/local/lib/groonga/plugins/ruby/eval.a +0 -0
  57. data/vendor/local/lib/groonga/plugins/ruby/eval.dll +0 -0
  58. data/vendor/local/lib/groonga/plugins/ruby/eval.dll.a +0 -0
  59. data/vendor/local/lib/groonga/plugins/ruby/load.a +0 -0
  60. data/vendor/local/lib/groonga/plugins/ruby/load.dll +0 -0
  61. data/vendor/local/lib/groonga/plugins/ruby/load.dll.a +0 -0
  62. data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +70 -38
  63. data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
  64. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
  65. data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
  66. data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
  67. data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
  68. data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
  69. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
  70. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
  71. data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
  72. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
  73. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
  74. data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
  75. data/vendor/local/lib/groonga/scripts/ruby/command_line/grndb.rb +21 -0
  76. data/vendor/local/lib/groonga/scripts/ruby/id.rb +12 -0
  77. data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +2 -0
  78. data/vendor/local/lib/groonga/scripts/ruby/logger.rb +3 -1
  79. data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +6 -0
  80. data/vendor/local/lib/libgroonga.a +0 -0
  81. data/vendor/local/lib/libgroonga.dll.a +0 -0
  82. data/vendor/local/lib/liblz4.a +0 -0
  83. data/vendor/local/lib/liblz4.dll +0 -0
  84. data/vendor/local/lib/liblz4.dll.1 +0 -0
  85. data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
  86. data/vendor/local/lib/libmecab.a +0 -0
  87. data/vendor/local/lib/libmecab.dll.a +0 -0
  88. data/vendor/local/lib/libmsgpack.a +0 -0
  89. data/vendor/local/lib/libmsgpack.dll.a +0 -0
  90. data/vendor/local/lib/libmsgpackc.a +0 -0
  91. data/vendor/local/lib/libmsgpackc.dll.a +0 -0
  92. data/vendor/local/lib/libonig.a +0 -0
  93. data/vendor/local/lib/libonig.dll.a +0 -0
  94. data/vendor/local/lib/libz.a +0 -0
  95. data/vendor/local/lib/libz.dll.a +0 -0
  96. data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
  97. data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
  98. data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
  99. data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
  100. data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
  101. data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
  102. data/vendor/local/sbin/groonga-httpd.exe +0 -0
  103. data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
  104. data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +7 -2
  105. data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
  106. data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
  107. data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
  108. data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
  109. data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
  110. data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
  111. data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +4 -3
  112. data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
  113. data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +122 -1
  114. data/vendor/local/share/doc/groonga/en/html/_sources/news/4.x.txt +1 -1
  115. data/vendor/local/share/doc/groonga/en/html/_sources/reference/command.txt +1 -0
  116. data/vendor/local/share/doc/groonga/en/html/_sources/reference/command/pretty_print.txt +45 -0
  117. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/lock_clear.txt +1 -1
  118. data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/reindex.txt +142 -0
  119. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/between.txt +10 -23
  120. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/geo_distance.txt +4 -4
  121. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_full.txt +2 -2
  122. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/highlight_html.txt +2 -2
  123. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/html_untag.txt +2 -2
  124. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/in_values.txt +3 -3
  125. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/prefix_rk_search.txt +158 -0
  126. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/query.txt +2 -2
  127. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/snippet_html.txt +2 -2
  128. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/sub_filter.txt +2 -2
  129. data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/vector_size.txt +3 -3
  130. data/vendor/local/share/doc/groonga/en/html/_sources/reference/operations.txt +3 -2
  131. data/vendor/local/share/doc/groonga/en/html/_sources/reference/operations/geolocation_search.txt +1 -2
  132. data/vendor/local/share/doc/groonga/en/html/_sources/reference/operations/prefix_rk_search.txt +76 -0
  133. data/vendor/local/share/doc/groonga/en/html/_sources/reference/suggest/completion.txt +2 -7
  134. data/vendor/local/share/doc/groonga/en/html/_sources/reference/tuning.txt +1 -2
  135. data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +37 -8
  136. data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
  137. data/vendor/local/share/doc/groonga/en/html/client.html +5 -5
  138. data/vendor/local/share/doc/groonga/en/html/community.html +12 -6
  139. data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
  140. data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
  141. data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +5 -5
  142. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +5 -5
  143. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +5 -5
  144. data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +5 -5
  145. data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
  146. data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +5 -5
  147. data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
  148. data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +5 -5
  149. data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +5 -5
  150. data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
  151. data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
  152. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
  153. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
  154. data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +5 -5
  155. data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
  156. data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
  157. data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
  158. data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
  159. data/vendor/local/share/doc/groonga/en/html/index.html +72 -68
  160. data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
  161. data/vendor/local/share/doc/groonga/en/html/install/centos.html +8 -8
  162. data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
  163. data/vendor/local/share/doc/groonga/en/html/install/fedora.html +8 -8
  164. data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
  165. data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
  166. data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
  167. data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +9 -8
  168. data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
  169. data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
  170. data/vendor/local/share/doc/groonga/en/html/news.html +187 -76
  171. data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
  172. data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
  173. data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
  174. data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
  175. data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +5 -5
  176. data/vendor/local/share/doc/groonga/en/html/news/2.x.html +5 -5
  177. data/vendor/local/share/doc/groonga/en/html/news/3.x.html +5 -5
  178. data/vendor/local/share/doc/groonga/en/html/news/4.x.html +7 -7
  179. data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
  180. data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
  181. data/vendor/local/share/doc/groonga/en/html/reference.html +72 -68
  182. data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
  183. data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +5 -5
  184. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +5 -5
  185. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +5 -5
  186. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +5 -5
  187. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +5 -5
  188. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +5 -5
  189. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +5 -5
  190. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +5 -5
  191. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
  192. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +5 -5
  193. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +5 -5
  194. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +5 -5
  195. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +5 -5
  196. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +5 -5
  197. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +5 -5
  198. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +5 -5
  199. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +5 -5
  200. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +5 -5
  201. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +5 -5
  202. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +5 -5
  203. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +5 -5
  204. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +5 -5
  205. data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +5 -5
  206. data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +5 -5
  207. data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +5 -5
  208. data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
  209. data/vendor/local/share/doc/groonga/en/html/reference/column.html +5 -5
  210. data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +5 -5
  211. data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +5 -5
  212. data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +5 -5
  213. data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +5 -5
  214. data/vendor/local/share/doc/groonga/en/html/reference/command.html +58 -56
  215. data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
  216. data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +10 -10
  217. data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +183 -0
  218. data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +22 -22
  219. data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +21 -21
  220. data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +29 -29
  221. data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +25 -25
  222. data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +27 -27
  223. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +41 -41
  224. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +25 -25
  225. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +31 -31
  226. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +25 -25
  227. data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +33 -33
  228. data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +29 -29
  229. data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +27 -27
  230. data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +25 -25
  231. data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +29 -29
  232. data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +37 -37
  233. data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +33 -33
  234. data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +29 -29
  235. data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +28 -27
  236. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +27 -27
  237. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +27 -27
  238. data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +29 -29
  239. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +39 -39
  240. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +31 -31
  241. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +57 -57
  242. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +105 -105
  243. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +33 -33
  244. data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +37 -37
  245. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +37 -37
  246. data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +25 -25
  247. data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +29 -29
  248. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +25 -25
  249. data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +25 -25
  250. data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +25 -25
  251. data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +25 -25
  252. data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +26 -26
  253. data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +279 -0
  254. data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +32 -32
  255. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +29 -29
  256. data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +29 -29
  257. data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +107 -107
  258. data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +25 -25
  259. data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +29 -29
  260. data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +27 -27
  261. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +49 -49
  262. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +25 -25
  263. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +35 -35
  264. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +31 -31
  265. data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +39 -39
  266. data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +31 -31
  267. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +43 -43
  268. data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +25 -25
  269. data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +25 -25
  270. data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
  271. data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +5 -5
  272. data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
  273. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +5 -5
  274. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +5 -5
  275. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
  276. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
  277. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +5 -5
  278. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +5 -5
  279. data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +5 -5
  280. data/vendor/local/share/doc/groonga/en/html/reference/function.html +18 -17
  281. data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +14 -8
  282. data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +7 -7
  283. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +7 -7
  284. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +6 -6
  285. data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +6 -6
  286. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +8 -8
  287. data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +9 -9
  288. data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +9 -9
  289. data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +8 -8
  290. data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +11 -11
  291. data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +434 -0
  292. data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +42 -42
  293. data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +27 -27
  294. data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +27 -27
  295. data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +31 -31
  296. data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +23 -23
  297. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
  298. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
  299. data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +5 -5
  300. data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +5 -5
  301. data/vendor/local/share/doc/groonga/en/html/reference/log.html +9 -9
  302. data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +5 -5
  303. data/vendor/local/share/doc/groonga/en/html/reference/operations.html +15 -17
  304. data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +12 -12
  305. data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +203 -0
  306. data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
  307. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
  308. data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
  309. data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +5 -5
  310. data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +5 -5
  311. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +5 -5
  312. data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +5 -5
  313. data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +15 -15
  314. data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +10 -10
  315. data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +7 -11
  316. data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +5 -5
  317. data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +5 -5
  318. data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +5 -5
  319. data/vendor/local/share/doc/groonga/en/html/reference/tables.html +5 -5
  320. data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +5 -5
  321. data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
  322. data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +6 -6
  323. data/vendor/local/share/doc/groonga/en/html/reference/types.html +9 -9
  324. data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
  325. data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
  326. data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
  327. data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
  328. data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
  329. data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
  330. data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
  331. data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
  332. data/vendor/local/share/doc/groonga/en/html/server/memcached.html +5 -5
  333. data/vendor/local/share/doc/groonga/en/html/server/package.html +5 -5
  334. data/vendor/local/share/doc/groonga/en/html/spec.html +5 -5
  335. data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
  336. data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
  337. data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
  338. data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
  339. data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
  340. data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
  341. data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
  342. data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
  343. data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
  344. data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
  345. data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
  346. data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
  347. data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
  348. data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
  349. data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
  350. data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
  351. data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
  352. data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
  353. data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +7 -2
  354. data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
  355. data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +3 -3
  356. data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
  357. data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
  358. data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
  359. data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
  360. data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +4 -3
  361. data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
  362. data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +122 -1
  363. data/vendor/local/share/doc/groonga/ja/html/_sources/news/4.x.txt +1 -1
  364. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/command.txt +1 -0
  365. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/command/pretty_print.txt +45 -0
  366. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/lock_clear.txt +1 -1
  367. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/reindex.txt +142 -0
  368. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/between.txt +10 -23
  369. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/geo_distance.txt +4 -4
  370. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_full.txt +2 -2
  371. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/highlight_html.txt +2 -2
  372. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/html_untag.txt +2 -2
  373. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/in_values.txt +3 -3
  374. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/prefix_rk_search.txt +158 -0
  375. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/query.txt +2 -2
  376. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/snippet_html.txt +2 -2
  377. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/sub_filter.txt +2 -2
  378. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/vector_size.txt +3 -3
  379. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/operations.txt +3 -2
  380. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/operations/geolocation_search.txt +1 -2
  381. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/operations/prefix_rk_search.txt +76 -0
  382. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/suggest/completion.txt +2 -7
  383. data/vendor/local/share/doc/groonga/ja/html/_sources/reference/tuning.txt +1 -2
  384. data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +37 -8
  385. data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
  386. data/vendor/local/share/doc/groonga/ja/html/client.html +5 -5
  387. data/vendor/local/share/doc/groonga/ja/html/community.html +14 -6
  388. data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
  389. data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
  390. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +5 -5
  391. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +5 -5
  392. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +5 -5
  393. data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +5 -5
  394. data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
  395. data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +5 -5
  396. data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
  397. data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +5 -5
  398. data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +5 -5
  399. data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
  400. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
  401. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
  402. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
  403. data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +5 -5
  404. data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
  405. data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
  406. data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
  407. data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
  408. data/vendor/local/share/doc/groonga/ja/html/index.html +71 -67
  409. data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
  410. data/vendor/local/share/doc/groonga/ja/html/install/centos.html +8 -8
  411. data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
  412. data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +8 -8
  413. data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
  414. data/vendor/local/share/doc/groonga/ja/html/install/others.html +8 -8
  415. data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
  416. data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +9 -8
  417. data/vendor/local/share/doc/groonga/ja/html/install/windows.html +14 -14
  418. data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
  419. data/vendor/local/share/doc/groonga/ja/html/news.html +188 -76
  420. data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
  421. data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
  422. data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
  423. data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
  424. data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +5 -5
  425. data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +5 -5
  426. data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +5 -5
  427. data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +6 -6
  428. data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
  429. data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
  430. data/vendor/local/share/doc/groonga/ja/html/reference.html +71 -67
  431. data/vendor/local/share/doc/groonga/ja/html/reference/api.html +5 -5
  432. data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +5 -5
  433. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +5 -5
  434. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +5 -5
  435. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +5 -5
  436. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +5 -5
  437. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +5 -5
  438. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +5 -5
  439. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +5 -5
  440. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +5 -5
  441. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +5 -5
  442. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +5 -5
  443. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +5 -5
  444. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +5 -5
  445. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +5 -5
  446. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +5 -5
  447. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +5 -5
  448. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +5 -5
  449. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +5 -5
  450. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +5 -5
  451. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +5 -5
  452. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +5 -5
  453. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +5 -5
  454. data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +5 -5
  455. data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +5 -5
  456. data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +5 -5
  457. data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
  458. data/vendor/local/share/doc/groonga/ja/html/reference/column.html +5 -5
  459. data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +5 -5
  460. data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +5 -5
  461. data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +5 -5
  462. data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +5 -5
  463. data/vendor/local/share/doc/groonga/ja/html/reference/command.html +58 -56
  464. data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
  465. data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +12 -11
  466. data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +183 -0
  467. data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +28 -33
  468. data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +21 -21
  469. data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +29 -29
  470. data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +25 -25
  471. data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +27 -27
  472. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +41 -41
  473. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +25 -25
  474. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +31 -31
  475. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +25 -25
  476. data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +33 -33
  477. data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +29 -29
  478. data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +27 -27
  479. data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +25 -25
  480. data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +29 -29
  481. data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +37 -37
  482. data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +33 -33
  483. data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +31 -31
  484. data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +33 -37
  485. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +27 -27
  486. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +27 -27
  487. data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +29 -29
  488. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +39 -39
  489. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +31 -31
  490. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +57 -57
  491. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +105 -105
  492. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +33 -33
  493. data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +37 -37
  494. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +37 -37
  495. data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +25 -25
  496. data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +29 -29
  497. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +25 -25
  498. data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +25 -25
  499. data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +25 -25
  500. data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +25 -25
  501. data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +26 -26
  502. data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +267 -0
  503. data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +32 -32
  504. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +29 -29
  505. data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +29 -29
  506. data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +107 -107
  507. data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +25 -25
  508. data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +29 -29
  509. data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +31 -31
  510. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +49 -49
  511. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +25 -25
  512. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +35 -35
  513. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +31 -31
  514. data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +39 -39
  515. data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +31 -31
  516. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +43 -43
  517. data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +25 -25
  518. data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +25 -25
  519. data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
  520. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +5 -5
  521. data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
  522. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +5 -5
  523. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +5 -5
  524. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
  525. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
  526. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +5 -5
  527. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +5 -5
  528. data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +5 -5
  529. data/vendor/local/share/doc/groonga/ja/html/reference/function.html +18 -17
  530. data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +13 -7
  531. data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +7 -7
  532. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +7 -7
  533. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +6 -6
  534. data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +6 -6
  535. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +8 -8
  536. data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +9 -9
  537. data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +9 -9
  538. data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +8 -8
  539. data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +11 -11
  540. data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +422 -0
  541. data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +42 -42
  542. data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +27 -27
  543. data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +27 -27
  544. data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +31 -31
  545. data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +23 -23
  546. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
  547. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
  548. data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
  549. data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +5 -5
  550. data/vendor/local/share/doc/groonga/ja/html/reference/log.html +9 -9
  551. data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +5 -5
  552. data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +11 -13
  553. data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +10 -10
  554. data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +190 -0
  555. data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
  556. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
  557. data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
  558. data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +5 -5
  559. data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +5 -5
  560. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +5 -5
  561. data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +5 -5
  562. data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +15 -15
  563. data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +10 -10
  564. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +6 -7
  565. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +5 -5
  566. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +5 -5
  567. data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +5 -5
  568. data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +5 -5
  569. data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +5 -5
  570. data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
  571. data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +6 -6
  572. data/vendor/local/share/doc/groonga/ja/html/reference/types.html +9 -9
  573. data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
  574. data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
  575. data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
  576. data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
  577. data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
  578. data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
  579. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
  580. data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
  581. data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +5 -5
  582. data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
  583. data/vendor/local/share/doc/groonga/ja/html/spec.html +5 -5
  584. data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
  585. data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
  586. data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
  587. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
  588. data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
  589. data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
  590. data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
  591. data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
  592. data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
  593. data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
  594. data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
  595. data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
  596. data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
  597. data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
  598. data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
  599. data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
  600. data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
  601. data/vendor/local/share/groonga/html/admin/404.html +26 -2
  602. data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  603. data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +272 -213
  604. data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  605. data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  606. data/vendor/local/share/groonga/html/admin/bower_components/bootstrap-sass-official/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  607. data/vendor/local/share/groonga/html/admin/index.html +39 -5
  608. data/vendor/local/share/groonga/html/admin/scripts/oldieshim.572be7b4.js +2337 -0
  609. data/vendor/local/share/groonga/html/admin/scripts/scripts.a1c295fa.js +1749 -0
  610. data/vendor/local/share/groonga/html/admin/scripts/vendor.2c228d46.js +50748 -0
  611. data/vendor/local/share/groonga/html/admin/styles/main.d9de008c.css +12602 -0
  612. data/vendor/local/share/groonga/html/admin/styles/vendor.7f75f6e0.css +130 -0
  613. data/vendor/local/share/groonga/html/admin/views/columns/new.html +64 -1
  614. data/vendor/local/share/groonga/html/admin/views/columns/show.html +70 -1
  615. data/vendor/local/share/groonga/html/admin/views/tables/index.html +53 -1
  616. data/vendor/local/share/groonga/html/admin/views/tables/new.html +54 -2
  617. data/vendor/local/share/groonga/html/admin/views/tables/search.html +236 -1
  618. data/vendor/local/share/groonga/html/admin/views/tables/show.html +111 -1
  619. data/vendor/local/share/groonga/html/admin/views/top.html +20 -1
  620. data/vendor/local/share/license/groonga-admin/README.md +2 -2
  621. data/vendor/local/share/man/ja/man1/groonga.1 +955 -3334
  622. data/vendor/local/share/man/man1/groonga.1 +937 -3373
  623. metadata +78 -57
  624. data/vendor/local/share/groonga/html/admin/images/yeoman.d2754b85.png +0 -0
  625. data/vendor/local/share/groonga/html/admin/scripts/oldieshim.a466b7b1.js +0 -1
  626. data/vendor/local/share/groonga/html/admin/scripts/scripts.87083bfd.js +0 -1
  627. data/vendor/local/share/groonga/html/admin/scripts/vendor.fa48c0ac.js +0 -13
  628. data/vendor/local/share/groonga/html/admin/styles/main.0390285b.css +0 -1
  629. data/vendor/local/share/groonga/html/admin/styles/vendor.f4ae649a.css +0 -10
@@ -0,0 +1,1749 @@
1
+ 'use strict';
2
+
3
+ (function() {
4
+ function GroongaClient($http) {
5
+ this._$http = $http;
6
+ this._pathPrefix = '/d/';
7
+ }
8
+ window.GroongaClient = GroongaClient;
9
+
10
+ GroongaClient.prototype.execute = function(name, parameters) {
11
+ var params = {
12
+ callback: 'JSON_CALLBACK'
13
+ };
14
+ for (var key in parameters) {
15
+ var value = parameters[key].toString();
16
+ if (value.length === 0) {
17
+ continue;
18
+ }
19
+ params[key] = value;
20
+ }
21
+ var rawRequest = this._$http.jsonp(this._pathPrefix + name + '.json',
22
+ {params: params});
23
+ var request = new GroongaClient.Request(rawRequest, name, params);
24
+ return request;
25
+ };
26
+
27
+ GroongaClient.Request = function(rawRequest, name, parameters) {
28
+ this._rawRequest = rawRequest;
29
+ this._name = name;
30
+ this._parameters = parameters;
31
+ };
32
+
33
+ GroongaClient.Request.prototype.success = function(callback) {
34
+ var name = this._name;
35
+ return this._rawRequest.then(function(rawResponse) {
36
+ var ResponseConstructor = GroongaClient.Response.find(name);
37
+ var response = new ResponseConstructor(rawResponse.data);
38
+ return callback(response, rawResponse);
39
+ });
40
+ };
41
+
42
+ GroongaClient.Request.prototype.error = function(callback) {
43
+ return this._rawRequest.then(null, function(rawResponse) {
44
+ var ResponseConstructor = GroongaClient.Response.find(name);
45
+ var response = new ResponseConstructor(rawResponse.data);
46
+ return callback(response, rawResponse);
47
+ });
48
+ };
49
+
50
+ GroongaClient.Request.prototype.commandLine = function() {
51
+ function escapeCommandValue(value) {
52
+ return value.toString().replace(/(["\\])/g, function(match) {
53
+ return '\\' + match;
54
+ });
55
+ }
56
+
57
+ var components = [this._name];
58
+ for (var key in this._parameters) {
59
+ if (key === 'callback') {
60
+ continue;
61
+ }
62
+
63
+ var value = this._parameters[key];
64
+ components.push('--' + key);
65
+ components.push('"' + escapeCommandValue(value) + '"');
66
+ }
67
+ return components.join(' ');
68
+ };
69
+ })();
70
+
71
+ 'use strict';
72
+
73
+ GroongaClient.Response = {
74
+ };
75
+
76
+ GroongaClient.Response.find = function(name) {
77
+ var constructorName = name.replace(/(^.|_.)/g, function(matched) {
78
+ if (matched.length === 1) {
79
+ return matched.toUpperCase();
80
+ } else {
81
+ return matched[1].toUpperCase();
82
+ }
83
+ });
84
+ return this[constructorName] || this.Base;
85
+ };
86
+
87
+ 'use strict';
88
+
89
+ (function() {
90
+ function Base(rawData) {
91
+ this._rawData = rawData;
92
+ }
93
+ GroongaClient.Response.Base = Base;
94
+
95
+ Base.prototype.rawData = function() {
96
+ return this._rawData;
97
+ };
98
+
99
+ Base.prototype.header = function() {
100
+ return this._rawData[0];
101
+ };
102
+
103
+ Base.prototype.status = function() {
104
+ return this.header()[0];
105
+ };
106
+
107
+ Base.prototype.isSuccess = function() {
108
+ return this.status() === 0;
109
+ };
110
+
111
+ Base.prototype.startTime = function() {
112
+ var startTime = new Date();
113
+ startTime.setTime(this.header()[1]);
114
+ return startTime;
115
+ };
116
+
117
+ Base.prototype.elapsedTime = function() {
118
+ return this.header()[2];
119
+ };
120
+
121
+ Base.prototype.errorMessage = function() {
122
+ return this.header()[3];
123
+ };
124
+
125
+ Base.prototype.body = function() {
126
+ return this._rawData[1];
127
+ };
128
+ })();
129
+
130
+ 'use strict';
131
+
132
+ (function() {
133
+ function Select(rawData) {
134
+ GroongaClient.Response.Base.call(this, rawData);
135
+ }
136
+ GroongaClient.Response.Select = Select;
137
+
138
+ Select.prototype = Object.create(GroongaClient.Response.Base.prototype);
139
+ Select.prototype.constructor = Select;
140
+
141
+ Select.prototype.nTotalRecords = function() {
142
+ return this.body()[0][0][0];
143
+ };
144
+
145
+ Select.prototype.columns = function() {
146
+ return this.body()[0][1].map(function(rawDefinition) {
147
+ return {
148
+ name: rawDefinition[0],
149
+ type: rawDefinition[1]
150
+ };
151
+ });
152
+ };
153
+
154
+ Select.prototype.records = function() {
155
+ return this.body()[0].slice(2);
156
+ };
157
+
158
+ Select.prototype.drilldowns = function() {
159
+ return this.body().slice(1).map(function(drilldown) {
160
+ var columns = drilldown[1].map(function(rawColumn) {
161
+ return {
162
+ name: rawColumn[0],
163
+ type: rawColumn[1]
164
+ };
165
+ });
166
+ return {
167
+ nTotalRecords: drilldown[0][0],
168
+ columns: columns,
169
+ records: drilldown.slice(2).map(function(rawRecord) {
170
+ var record = {};
171
+ columns.forEach(function(column, i) {
172
+ record[column.name] = rawRecord[i];
173
+ });
174
+ return record;
175
+ })
176
+ };
177
+ });
178
+ };
179
+ })();
180
+
181
+ 'use strict';
182
+
183
+ (function() {
184
+ function Schema(rawData) {
185
+ GroongaClient.Response.Base.call(this, rawData);
186
+ }
187
+ GroongaClient.Response.Schema = Schema;
188
+
189
+ Schema.prototype = Object.create(GroongaClient.Response.Base.prototype);
190
+ Schema.prototype.constructor = Schema;
191
+ })();
192
+
193
+ 'use strict';
194
+
195
+ (function() {
196
+ function TableList(rawData) {
197
+ GroongaClient.Response.Base.call(this, rawData);
198
+ }
199
+ GroongaClient.Response.TableList = TableList;
200
+
201
+ TableList.prototype = Object.create(GroongaClient.Response.Base.prototype);
202
+ TableList.prototype.constructor = TableList;
203
+
204
+ TableList.prototype.parameters = function() {
205
+ return this.body()[0].map(function(parameter) {
206
+ return {
207
+ name: parameter[0],
208
+ type: parameter[1]
209
+ };
210
+ });
211
+ };
212
+
213
+ TableList.prototype.tables = function() {
214
+ var parameters = this.parameters();
215
+ return this.body().slice(1).map(function(tableProperties) {
216
+ var table = {
217
+ properties: {},
218
+ rawProperties: tableProperties
219
+ };
220
+ parameters.forEach(function(parameter, index) {
221
+ var name = parameter.name;
222
+ var value = tableProperties[index];
223
+ switch (name) {
224
+ case 'flags':
225
+ value = value.split('|');
226
+ break;
227
+ case 'default_tokenizer':
228
+ name = 'tokenizer';
229
+ break;
230
+ case 'token_filters':
231
+ name = 'tokenFilters';
232
+ break;
233
+ }
234
+ table[name] = table.properties[name] = value;
235
+ });
236
+ table.isArray = table.flags.indexOf('TABLE_NO_KEY') != -1;
237
+ table.isHashTable = table.flags.indexOf('TABLE_HASH_KEY') != -1;
238
+ table.isPatriciaTrie = table.flags.indexOf('TABLE_PAT_KEY') != -1;
239
+ table.isDoubleArrayTrie = table.flags.indexOf('TABLE_DAT_KEY') != -1;
240
+ table.hasKey = !table.isArray;
241
+ if (table.isArray) {
242
+ table.type = 'array';
243
+ } else if (table.isHashTable) {
244
+ table.type = 'hash table';
245
+ } else if (table.isPatriciaTrie) {
246
+ table.type = 'patricia trie';
247
+ } else if (table.isDoubleArrayTrie) {
248
+ table.type = 'double array trie';
249
+ } else {
250
+ table.type = 'unknown';
251
+ }
252
+ return table;
253
+ });
254
+ };
255
+ })();
256
+
257
+ 'use strict';
258
+
259
+ (function() {
260
+ function TableCreate(rawData) {
261
+ GroongaClient.Response.Base.call(this, rawData);
262
+ }
263
+ GroongaClient.Response.TableCreate = TableCreate;
264
+
265
+ TableCreate.prototype = Object.create(GroongaClient.Response.Base.prototype);
266
+ TableCreate.prototype.constructor = TableCreate;
267
+
268
+ TableCreate.prototype.isCreated = function() {
269
+ return this.isSuccess() && this.body();
270
+ };
271
+ })();
272
+
273
+ 'use strict';
274
+
275
+ (function() {
276
+ function TableRemove(rawData) {
277
+ GroongaClient.Response.Base.call(this, rawData);
278
+ }
279
+ GroongaClient.Response.TableRemove = TableRemove;
280
+
281
+ TableRemove.prototype = Object.create(GroongaClient.Response.Base.prototype);
282
+ TableRemove.prototype.constructor = TableRemove;
283
+
284
+ TableRemove.prototype.isRemoved = function() {
285
+ return this.isSuccess() && this.body();
286
+ };
287
+ })();
288
+
289
+ 'use strict';
290
+
291
+ (function() {
292
+ function ColumnList(rawData) {
293
+ GroongaClient.Response.Base.call(this, rawData);
294
+ }
295
+ GroongaClient.Response.ColumnList = ColumnList;
296
+
297
+ ColumnList.prototype = Object.create(GroongaClient.Response.Base.prototype);
298
+ ColumnList.prototype.constructor = ColumnList;
299
+
300
+ ColumnList.prototype.parameters = function() {
301
+ return this.body()[0].map(function(parameter) {
302
+ return {
303
+ name: parameter[0],
304
+ type: parameter[1]
305
+ };
306
+ });
307
+ };
308
+
309
+ ColumnList.prototype.columns = function() {
310
+ return this.body().slice(1).map(function(rawColumn) {
311
+ return this.parseRawColumn(rawColumn);
312
+ }, this);
313
+ };
314
+
315
+ ColumnList.prototype.parseRawColumn = function(rawColumn) {
316
+ var parameters = this.parameters();
317
+ var column = {
318
+ properties: {},
319
+ rawProperties: rawColumn
320
+ };
321
+ parameters.forEach(function(parameter, index) {
322
+ var name = parameter.name;
323
+ var value = rawColumn[index];
324
+ switch (parameter.name) {
325
+ case 'type':
326
+ name = 'sizeType';
327
+ break;
328
+ case 'flags':
329
+ value = value.split('|');
330
+ break;
331
+ case 'source':
332
+ name = 'sources';
333
+ break;
334
+ }
335
+ column[name] = column.properties[name] = value;
336
+ });
337
+ column.isScalar = column.flags.indexOf('COLUMN_SCALAR') != -1;
338
+ column.isVector = column.flags.indexOf('COLUMN_VECTOR') != -1;
339
+ column.isIndex = column.flags.indexOf('COLUMN_INDEX') != -1;
340
+ if (column.isScalar) {
341
+ column.type = 'scalar';
342
+ } else if (column.isVector) {
343
+ column.type = 'vector';
344
+ } else if (column.isIndex) {
345
+ column.type = 'index';
346
+ } else {
347
+ column.type = 'unknown';
348
+ }
349
+ return column;
350
+ };
351
+ })();
352
+
353
+ 'use strict';
354
+
355
+ (function() {
356
+ function ColumnCreate(rawData) {
357
+ GroongaClient.Response.Base.call(this, rawData);
358
+ }
359
+ GroongaClient.Response.ColumnCreate = ColumnCreate;
360
+
361
+ ColumnCreate.prototype = Object.create(GroongaClient.Response.Base.prototype);
362
+ ColumnCreate.prototype.constructor = ColumnCreate;
363
+
364
+ ColumnCreate.prototype.isCreated = function() {
365
+ return this.isSuccess() && this.body();
366
+ };
367
+ })();
368
+
369
+ 'use strict';
370
+
371
+ (function() {
372
+ function ColumnRemove(rawData) {
373
+ GroongaClient.Response.Base.call(this, rawData);
374
+ }
375
+ GroongaClient.Response.ColumnRemove = ColumnRemove;
376
+
377
+ ColumnRemove.prototype = Object.create(GroongaClient.Response.Base.prototype);
378
+ ColumnRemove.prototype.constructor = ColumnRemove;
379
+
380
+ ColumnRemove.prototype.isRemoved = function() {
381
+ return this.isSuccess() && this.body();
382
+ };
383
+ })();
384
+
385
+ 'use strict';
386
+
387
+ (function(global) {
388
+ function TimeUnit(parameters) {
389
+ this.label = parameters.label;
390
+ this.baseTimeInMilliseconds = parameters.baseTimeInMilliseconds;
391
+ this.getBaseDate = parameters.getBaseDate;
392
+ }
393
+ global.TimeUnit = TimeUnit;
394
+
395
+ TimeUnit.units = {};
396
+
397
+ TimeUnit.register = function(name, unit) {
398
+ TimeUnit.units[name] = unit;
399
+ };
400
+
401
+ TimeUnit.getOrderedUnits = function() {
402
+ var orderedUnits = [];
403
+ for (var name in TimeUnit.units) {
404
+ orderedUnits.push(TimeUnit.units[name]);
405
+ }
406
+ orderedUnits.sort(function(unit1, unit2) {
407
+ return unit1.baseTimeInMilliseconds - unit2.baseTimeInMilliseconds;
408
+ });
409
+ return orderedUnits;
410
+ };
411
+
412
+ TimeUnit.findByDateRange = function(start, end) {
413
+ var orderedUnits = TimeUnit.getOrderedUnits();
414
+
415
+ if (!start && !end) {
416
+ return orderedUnits[0];
417
+ }
418
+
419
+ var unit;
420
+ for (var i = 0; i < orderedUnits.length; i++) {
421
+ var candidateUnit = orderedUnits[i];
422
+ if (start && !candidateUnit.dateIncluded(start)) {
423
+ continue;
424
+ }
425
+ if (end && !candidateUnit.dateIncluded(end)) {
426
+ continue;
427
+ }
428
+ unit = candidateUnit;
429
+ break;
430
+ }
431
+ if (!unit) {
432
+ unit = orderedUnits[orderedUnits.length - 1];
433
+ }
434
+ return unit;
435
+ };
436
+
437
+ TimeUnit.prototype.dateIncluded = function(date) {
438
+ var baseDate = this.getBaseDate();
439
+ var baseTime = baseDate.getTime();
440
+ var time = date.getTime();
441
+ return (baseTime <= time &&
442
+ time <= (baseTime * this.baseTimeInMilliseconds));
443
+ };
444
+
445
+ TimeUnit.prototype.percentToDate = function(percent) {
446
+ var baseDate = this.getBaseDate();
447
+ var date;
448
+ date = new Date();
449
+ date.setTime(baseDate.getTime() +
450
+ this.baseTimeInMilliseconds * percent);
451
+ return date;
452
+ };
453
+
454
+ TimeUnit.prototype.dateToPercent = function(date) {
455
+ var diffTime = date.getTime() - this.getBaseDate().getTime();
456
+ return diffTime / this.baseTimeInMilliseconds;
457
+ };
458
+
459
+
460
+ // Built-in units
461
+ TimeUnit.register('hour', new TimeUnit({
462
+ label: 'Hour',
463
+ baseTimeInMilliseconds: 60 * 60 * 1000,
464
+ getBaseDate: function() {
465
+ var now = new Date();
466
+ return new Date(now.getFullYear(),
467
+ now.getMonth(),
468
+ now.getDate(),
469
+ now.getHours(),
470
+ now.getMinutes() - 30);
471
+ }
472
+ }));
473
+
474
+ TimeUnit.register('day', new TimeUnit({
475
+ label: 'Day',
476
+ baseTimeInMilliseconds: 24 * 60 * 60 * 1000,
477
+ getBaseDate: function() {
478
+ var now = new Date();
479
+ return new Date(now.getFullYear(),
480
+ now.getMonth(),
481
+ now.getDate(),
482
+ now.getHours() - 12);
483
+ }
484
+ }));
485
+
486
+ TimeUnit.register('week', new TimeUnit({
487
+ label: 'Week',
488
+ baseTimeInMilliseconds: 7 * 24 * 60 * 60 * 1000,
489
+ getBaseDate: function() {
490
+ var now = new Date();
491
+ return new Date(now.getFullYear(),
492
+ now.getMonth(),
493
+ now.getDate() - 3,
494
+ now.getHours() - 12);
495
+ }
496
+ }));
497
+
498
+ TimeUnit.register('month', new TimeUnit({
499
+ label: 'Month',
500
+ baseTimeInMilliseconds: 30 * 24 * 60 * 60 * 1000,
501
+ getBaseDate: function() {
502
+ var now = new Date();
503
+ return new Date(now.getFullYear(),
504
+ now.getMonth(),
505
+ now.getDate() - 15);
506
+ }
507
+ }));
508
+
509
+ TimeUnit.register('year', new TimeUnit({
510
+ label: 'Year',
511
+ baseTimeInMilliseconds: 365 * 24 * 60 * 60 * 1000,
512
+ getBaseDate: function() {
513
+ var now = new Date();
514
+ return new Date(now.getFullYear(),
515
+ now.getMonth() - 6);
516
+ }
517
+ }));
518
+
519
+ TimeUnit.register('decade', new TimeUnit({
520
+ label: 'Decade',
521
+ baseTimeInMilliseconds: 10 * 365 * 24 * 60 * 60 * 1000,
522
+ getBaseDate: function() {
523
+ var now = new Date();
524
+ return new Date(now.getFullYear() - 5);
525
+ }
526
+ }));
527
+ })(window);
528
+
529
+ 'use strict';
530
+
531
+ /**
532
+ * @ngdoc overview
533
+ * @name groongaAdminApp
534
+ * @description
535
+ * # groongaAdminApp
536
+ *
537
+ * Main module of the application.
538
+ */
539
+ angular
540
+ .module('groongaAdminApp', [
541
+ 'ngAnimate',
542
+ 'ngCookies',
543
+ 'ngResource',
544
+ 'ngRoute',
545
+ 'ngSanitize',
546
+ 'ngTouch',
547
+ 'ui.bootstrap',
548
+ 'ui.bootstrap-slider'
549
+ ])
550
+ .config(function ($routeProvider) {
551
+ $routeProvider
552
+ .when('/', {
553
+ templateUrl: 'views/top.html',
554
+ controller: 'TopController'
555
+ })
556
+ .when('/tables/', {
557
+ templateUrl: 'views/tables/index.html',
558
+ controller: 'TableIndexController'
559
+ })
560
+ .when('/tables/_new', {
561
+ templateUrl: 'views/tables/new.html',
562
+ controller: 'TableNewController'
563
+ })
564
+ .when('/tables/:table/', {
565
+ templateUrl: 'views/tables/show.html',
566
+ controller: 'TableShowController'
567
+ })
568
+ .when('/tables/:table/search', {
569
+ templateUrl: 'views/tables/search.html',
570
+ controller: 'TableSearchController'
571
+ })
572
+ .when('/tables/:table/columns/_new', {
573
+ templateUrl: 'views/columns/new.html',
574
+ controller: 'ColumnNewController'
575
+ })
576
+ .when('/tables/:table/columns/:column', {
577
+ templateUrl: 'views/columns/show.html',
578
+ controller: 'ColumnShowController'
579
+ })
580
+ .otherwise({
581
+ redirectTo: '/'
582
+ });
583
+ });
584
+
585
+ 'use strict';
586
+
587
+ /**
588
+ * @ngdoc function
589
+ * @name groongaAdminApp.service:schemaLoader
590
+ * @description
591
+ * # schemaLoader
592
+ * Groonga database schema loader.
593
+ */
594
+ angular.module('groongaAdminApp')
595
+ .factory('schemaLoader', [
596
+ '$q', '$http', '$timeout',
597
+ function ($q, $http, $timeout) {
598
+ var fetching = false;
599
+ var waitingDeferes = [];
600
+ var fetched = false;
601
+ var schema;
602
+ var client = new GroongaClient($http);
603
+
604
+ function createSchema() {
605
+ var newSchema = {};
606
+ fillTypes(newSchema);
607
+ return newSchema;
608
+ }
609
+
610
+ function fillTypes(schema) {
611
+ var builtinTypes = [
612
+ {
613
+ name: 'Bool'
614
+ },
615
+ {
616
+ name: 'Int8'
617
+ },
618
+ {
619
+ name: 'UInt8'
620
+ },
621
+ {
622
+ name: 'Int16'
623
+ },
624
+ {
625
+ name: 'UInt16'
626
+ },
627
+ {
628
+ name: 'Int32'
629
+ },
630
+ {
631
+ name: 'UInt32'
632
+ },
633
+ {
634
+ name: 'Int64'
635
+ },
636
+ {
637
+ name: 'UInt64'
638
+ },
639
+ {
640
+ name: 'Float'
641
+ },
642
+ {
643
+ name: 'Time'
644
+ },
645
+ {
646
+ name: 'ShortText'
647
+ },
648
+ {
649
+ name: 'Text'
650
+ },
651
+ {
652
+ name: 'LongText'
653
+ },
654
+ {
655
+ name: 'TokyoGeoPoint'
656
+ },
657
+ {
658
+ name: 'WGS84GeoPoint'
659
+ }
660
+ ];
661
+ schema.types = {};
662
+ angular.forEach(builtinTypes, function(type) {
663
+ schema.types[type.name] = type;
664
+ });
665
+ }
666
+
667
+ function isTextType(typeName) {
668
+ switch (typeName) {
669
+ case 'ShortText':
670
+ case 'Text':
671
+ case 'LongText':
672
+ return true;
673
+ default:
674
+ return false;
675
+ }
676
+ }
677
+
678
+ function isReferenceType(schema, typeName) {
679
+ return typeName in schema.tables;
680
+ }
681
+
682
+ function resolveTable(table) {
683
+ table.keyType = {
684
+ name: table.domain,
685
+ isTextType: isTextType(table.domain)
686
+ };
687
+ }
688
+
689
+ function resolveTables(schema) {
690
+ angular.forEach(schema.tables, function(table) {
691
+ resolveTable(table);
692
+ });
693
+ }
694
+
695
+ function resolveColumn(schema, column) {
696
+ column.valueType = {
697
+ name: column.range,
698
+ isTextType: isTextType(column.range),
699
+ isReferenceType: isReferenceType(schema, column.range)
700
+ };
701
+ }
702
+
703
+ function resolveColumns(schema) {
704
+ angular.forEach(schema.tables, function(table) {
705
+ angular.forEach(table.columns, function(column) {
706
+ resolveColumn(schema, column);
707
+ });
708
+ });
709
+ }
710
+
711
+ function resolveIndex(schema, column) {
712
+ var table = schema.tables[column.range];
713
+ column.sources.forEach(function(source) {
714
+ var columnName;
715
+ if (source.indexOf('.') === -1) {
716
+ columnName = '_key';
717
+ } else {
718
+ columnName = source.split('.')[1];
719
+ }
720
+ var targetColumn = table.columns[columnName];
721
+ targetColumn.indexes.push(column);
722
+ });
723
+ }
724
+
725
+ function resolveIndexes(schema) {
726
+ angular.forEach(schema.tables, function(table) {
727
+ angular.forEach(table.columns, function(column) {
728
+ if (column.isIndex) {
729
+ resolveIndex(schema, column);
730
+ }
731
+ });
732
+ });
733
+ }
734
+
735
+ function addColumn(table, column) {
736
+ column.table = table;
737
+ column.indexes = [];
738
+ table.columns[column.name] = column;
739
+ }
740
+
741
+ function fetchColumns(table) {
742
+ table.columns = {};
743
+
744
+ return client.execute('column_list', {table: table.name})
745
+ .success(function(response) {
746
+ var columns = response.columns();
747
+
748
+ var rawIDColumn = [
749
+ table.id, // id
750
+ '_id', // name
751
+ table.path, // path
752
+ 'fix', // type
753
+ 'COLUMN_SCALAR|PERSISTENT', // flags
754
+ table.name, // domain
755
+ 'UInt32', // range
756
+ [] // source
757
+ ];
758
+ columns.unshift(response.parseRawColumn(rawIDColumn));
759
+
760
+ columns.forEach(function(column) {
761
+ addColumn(table, column);
762
+ });
763
+ });
764
+ }
765
+
766
+ function fetchTables(schema) {
767
+ schema.tables = {};
768
+ return client.execute('table_list')
769
+ .success(function(response) {
770
+ response.tables().forEach(function(table) {
771
+ schema.tables[table.name] = table;
772
+ });
773
+ resolveTables(schema);
774
+
775
+ var fetchColumnsTasks = [];
776
+ angular.forEach(schema.tables, function(table) {
777
+ fetchColumnsTasks.push(fetchColumns(table));
778
+ });
779
+
780
+ return $q.all(fetchColumnsTasks)
781
+ .then(function() {
782
+ resolveColumns(schema);
783
+ resolveIndexes(schema);
784
+ fetched = true;
785
+ fetching = false;
786
+ waitingDeferes.forEach(function(defer) {
787
+ defer.resolve(schema);
788
+ });
789
+ waitingDeferes = [];
790
+ return schema;
791
+ });
792
+ });
793
+ }
794
+
795
+ schema = createSchema();
796
+
797
+ return function() {
798
+ var defer;
799
+ var loader;
800
+ if (fetching) {
801
+ defer = $q.defer();
802
+ waitingDeferes.push(defer);
803
+ loader = defer.promise;
804
+ } else if (fetched) {
805
+ defer = $q.defer();
806
+ $timeout(function() {
807
+ defer.resolve(schema);
808
+ });
809
+ loader = defer.promise;
810
+ } else {
811
+ fetching = true;
812
+ loader = fetchTables(schema);
813
+ }
814
+ loader.reload = function() {
815
+ fetching = false;
816
+ fetched = false;
817
+ schema = createSchema();
818
+ };
819
+ return loader;
820
+ };
821
+ }]);
822
+
823
+ 'use strict';
824
+
825
+ /**
826
+ * @ngdoc function
827
+ * @name groongaAdminApp.controller:TopController
828
+ * @description
829
+ * # TopController
830
+ * Controller of the groongaAdminApp
831
+ */
832
+ angular.module('groongaAdminApp')
833
+ .controller('TopController', [
834
+ '$scope', 'schemaLoader',
835
+ function ($scope, schemaLoader) {
836
+ $scope.tables = [];
837
+ schemaLoader()
838
+ .then(function(schema) {
839
+ angular.forEach(schema.tables, function(table) {
840
+ $scope.tables.push(table);
841
+ });
842
+ });
843
+ }]);
844
+
845
+ 'use strict';
846
+
847
+ /**
848
+ * @ngdoc function
849
+ * @name groongaAdminApp.controller:TableIndexController
850
+ * @description
851
+ * # TableIndexController
852
+ * Controller of the groongaAdminApp
853
+ */
854
+ angular.module('groongaAdminApp')
855
+ .controller('TableIndexController', [
856
+ '$scope', 'schemaLoader',
857
+ function ($scope, schemaLoader) {
858
+ var schema;
859
+
860
+ function initialize() {
861
+ $scope.tables = [];
862
+ }
863
+
864
+ initialize();
865
+ schemaLoader()
866
+ .then(function(_schema) {
867
+ schema = _schema;
868
+
869
+ var tables = [];
870
+ angular.forEach(schema.tables, function(value) {
871
+ tables.push(value);
872
+ });
873
+ $scope.tables = tables.sort(function(table1, table2) {
874
+ return (table1.name > table2.name) ? 1 : -1;
875
+ });
876
+ });
877
+ }]);
878
+
879
+ 'use strict';
880
+
881
+ /**
882
+ * @ngdoc function
883
+ * @name groongaAdminApp.controller:TableShowController
884
+ * @description
885
+ * # TableShowController
886
+ * Controller of the groongaAdminApp
887
+ */
888
+ angular.module('groongaAdminApp')
889
+ .controller('TableShowController', [
890
+ '$scope', '$routeParams', '$http', '$location', 'schemaLoader',
891
+ function ($scope, $routeParams, $http, $location, schemaLoader) {
892
+ var schema;
893
+ var client = new GroongaClient($http);
894
+
895
+ function initialize() {
896
+ $scope.table = {
897
+ name: $routeParams.table,
898
+ columns: []
899
+ };
900
+ $scope.remove = remove;
901
+ }
902
+
903
+ function remove() {
904
+ if (!window.confirm('Really remove the table?')) {
905
+ return;
906
+ }
907
+
908
+ var request = client.execute('table_remove', {name: $scope.table.name});
909
+ request.success(function(response) {
910
+ console.log(response);
911
+ if (response.isRemoved()) {
912
+ schemaLoader().reload();
913
+ $location.url('/tables/');
914
+ } else {
915
+ var errorMessage = response.errorMessage();
916
+ $scope.message = 'Failed to remove the table: ' + errorMessage;
917
+ }
918
+ });
919
+ }
920
+
921
+ initialize();
922
+ schemaLoader()
923
+ .then(function(_schema) {
924
+ schema = _schema;
925
+
926
+ var table = schema.tables[$scope.table.name];
927
+ angular.extend($scope.table, table);
928
+ var columns = [];
929
+ angular.forEach(table.columns, function(value) {
930
+ columns.push(value);
931
+ });
932
+ $scope.table.columns = columns.sort(function(column1, column2) {
933
+ return (column1.name > column2.name) ? 1 : -1;
934
+ });
935
+ });
936
+ }]);
937
+
938
+ 'use strict';
939
+
940
+ /**
941
+ * @ngdoc function
942
+ * @name groongaAdminApp.controller:TableNewController
943
+ * @description
944
+ * # TableNewController
945
+ * Controller of the groongaAdminApp
946
+ */
947
+ angular.module('groongaAdminApp')
948
+ .controller('TableNewController', [
949
+ '$scope', '$http', '$location', 'schemaLoader',
950
+ function ($scope, $http, $location, schemaLoader) {
951
+ var schema;
952
+ var client = new GroongaClient($http);
953
+
954
+ function initialize() {
955
+ $scope.availableTypes = {
956
+ array: {
957
+ label: 'Array',
958
+ flag: 'TABLE_NO_KEY'
959
+ },
960
+ hashTable: {
961
+ label: 'Hash table',
962
+ flag: 'TABLE_HASH_KEY'
963
+ },
964
+ patriciaTrie: {
965
+ label: 'Patricia trie',
966
+ flag: 'TABLE_PAT_KEY'
967
+ },
968
+ doubleArrayTrie: {
969
+ label: 'Double array trie',
970
+ flag: 'TABLE_DAT_KEY'
971
+ }
972
+ };
973
+ $scope.parameters = {
974
+ type: $scope.availableTypes.array
975
+ };
976
+ $scope.tables = {
977
+ };
978
+ $scope.submit = submit;
979
+ }
980
+
981
+ function submit() {
982
+ var parameters = {
983
+ name: $scope.parameters.name,
984
+ flags: [$scope.parameters.type.flag].join('|')
985
+ };
986
+ var request = client.execute('table_create', parameters);
987
+ request.success(function(response) {
988
+ if (response.isCreated()) {
989
+ schemaLoader().reload();
990
+ $location.url('/tables/' + parameters.name);
991
+ } else {
992
+ var errorMessage = response.errorMessage();
993
+ $scope.message = 'Failed to create the table: ' + errorMessage;
994
+ }
995
+ });
996
+ }
997
+
998
+ initialize();
999
+ schemaLoader()
1000
+ .then(function(_schema) {
1001
+ schema = _schema;
1002
+
1003
+ $scope.tables = schema.tables;
1004
+ });
1005
+ }]);
1006
+
1007
+ 'use strict';
1008
+
1009
+ /**
1010
+ * @ngdoc function
1011
+ * @name groongaAdminApp.controller:TableSearchController
1012
+ * @description
1013
+ * # TableSearchController
1014
+ * Controller of the groongaAdminApp
1015
+ */
1016
+ angular.module('groongaAdminApp')
1017
+ .controller('TableSearchController', [
1018
+ '$scope',
1019
+ '$routeParams',
1020
+ '$location',
1021
+ '$http',
1022
+ '$filter',
1023
+ '$interval',
1024
+ 'schemaLoader',
1025
+ function ($scope,
1026
+ $routeParams,
1027
+ $location,
1028
+ $http,
1029
+ $filter,
1030
+ $interval,
1031
+ schemaLoader) {
1032
+ var schema;
1033
+ var client = new GroongaClient($http);
1034
+ var autoRefreshPromise = null;
1035
+
1036
+ function findElement(array, finder) {
1037
+ var i, length;
1038
+ length = array.length;
1039
+ for (i = 0; i < length; i++) {
1040
+ var element = array[i];
1041
+ if (finder(element)) {
1042
+ return element;
1043
+ }
1044
+ }
1045
+ return undefined;
1046
+ }
1047
+
1048
+ function computeCurrentPage(offset) {
1049
+ return Math.ceil((parseInt(offset) + 1) / $scope.nRecordsInPage);
1050
+ }
1051
+
1052
+ function initialize() {
1053
+ $scope.orderedTimeColumnUnits = TimeUnit.getOrderedUnits();
1054
+
1055
+ $scope.table = {
1056
+ name: $routeParams.table,
1057
+ allColumns: [],
1058
+ timeColumns: [],
1059
+ indexedColumns: []
1060
+ };
1061
+ $scope.style = 'table';
1062
+ $scope.response = {
1063
+ rawData: [],
1064
+ columns: [],
1065
+ records: [],
1066
+ drilldowns: [],
1067
+ elapsedTimeInMilliseconds: 0,
1068
+ nTotalRecords: 0
1069
+ };
1070
+ $scope.commandLine = '';
1071
+ $scope.message = '';
1072
+ $scope.parameters = angular.copy($location.search());
1073
+ if ($scope.parameters.limit && $scope.parameters.limit > 0) {
1074
+ $scope.nRecordsInPage = $scope.parameters.limit;
1075
+ } else {
1076
+ $scope.nRecordsInPage = 10;
1077
+ }
1078
+ $scope.currentPage = computeCurrentPage($scope.parameters.offset || 0);
1079
+ $scope.maxNPages = 10;
1080
+ $scope.autoRefreshIntervalInSeconds = 0;
1081
+
1082
+ $scope.search = search;
1083
+ $scope.incrementalSearch = incrementalSearch;
1084
+ $scope.updateAutoRefresh = updateAutoRefresh;
1085
+ $scope.clearQuery = clearQuery;
1086
+ $scope.clear = clear;
1087
+ $scope.toggleSort = toggleSort;
1088
+ $scope.selectDrilldown = selectDrilldown;
1089
+ $scope.toggleAllColumns = toggleAllColumns;
1090
+ $scope.toggleAllColumnsChecked = true;
1091
+ }
1092
+
1093
+ function packColumns(columns) {
1094
+ var names = columns.map(function(column) {
1095
+ return column.name;
1096
+ });
1097
+ return names.join(',');
1098
+ }
1099
+
1100
+ function packMatchColumns(columns) {
1101
+ var names = columns.map(function(column) {
1102
+ return column.indexName;
1103
+ });
1104
+ return names.join(',');
1105
+ }
1106
+
1107
+ function packSortColumns(columns) {
1108
+ var keys = columns.map(function(column) {
1109
+ if (column.sort === 'ascending') {
1110
+ return column.name;
1111
+ } else {
1112
+ return '-' + column.name;
1113
+ }
1114
+ });
1115
+ return keys.join(',');
1116
+ }
1117
+
1118
+ function toGroongaTime(date) {
1119
+ return '"' + $filter('date')(date, 'yyyy-MM-dd HH:mm:ss.sss') + '"';
1120
+ }
1121
+
1122
+ function fromGroongaTime(time) {
1123
+ if (typeof time === 'number') {
1124
+ return new Date(time * 1000);
1125
+ } else {
1126
+ return new Date(time.replace(/ /, 'T'));
1127
+ }
1128
+ }
1129
+
1130
+ function toBetweenBorder(included) {
1131
+ if (included) {
1132
+ return '"include"';
1133
+ } else {
1134
+ return '"exclude"';
1135
+ }
1136
+ }
1137
+
1138
+ function fromBetweenBorder(border) {
1139
+ return border === 'include';
1140
+ }
1141
+
1142
+ function buildFilter() {
1143
+ $scope.table.timeColumns.forEach(function(column) {
1144
+ column.syncFromRange();
1145
+ });
1146
+ var timeQueries = $scope.table.timeColumns.filter(function(column) {
1147
+ return column.start || column.end;
1148
+ }).map(function(column) {
1149
+ var operator;
1150
+ var groongaTime;
1151
+ if (column.start && column.end) {
1152
+ return 'between(' + column.name + ', ' +
1153
+ toGroongaTime(column.start) + ', ' +
1154
+ toBetweenBorder(column.startIncluded) + ', ' +
1155
+ toGroongaTime(column.end) + ', ' +
1156
+ toBetweenBorder(column.endIncluded) + ')';
1157
+ } else if (column.start) {
1158
+ if (column.startIncluded) {
1159
+ operator = '>=';
1160
+ } else {
1161
+ operator = '>';
1162
+ }
1163
+ groongaTime = toGroongaTime(column.start);
1164
+ return column.name + ' ' + operator + ' ' + groongaTime;
1165
+ } else {
1166
+ if (column.endIncluded) {
1167
+ operator = '<=';
1168
+ } else {
1169
+ operator = '<';
1170
+ }
1171
+ groongaTime = toGroongaTime(column.end);
1172
+ return column.name + ' ' + operator + ' ' + groongaTime;
1173
+ }
1174
+ });
1175
+
1176
+ return timeQueries.join(' && ');
1177
+ }
1178
+
1179
+ function buildParameters() {
1180
+ var parameters = angular.copy($scope.parameters);
1181
+
1182
+ var matchColumns = $scope.table.indexedColumns.filter(function(column) {
1183
+ return column.inUse;
1184
+ });
1185
+ parameters.match_columns = packMatchColumns(matchColumns);
1186
+
1187
+ var outputColumns = $scope.table.allColumns.filter(function(column) {
1188
+ return column.output;
1189
+ });
1190
+ parameters.output_columns = packColumns(outputColumns);
1191
+
1192
+ parameters.offset = ($scope.currentPage - 1) * $scope.nRecordsInPage;
1193
+ parameters.limit = $scope.nRecordsInPage;
1194
+
1195
+ var sortColumns = $scope.table.allColumns.filter(function(column) {
1196
+ return column.sort;
1197
+ });
1198
+ parameters.sortby = packSortColumns(sortColumns);
1199
+
1200
+ var drilldowns = $scope.table.allColumns.filter(function(column) {
1201
+ return column.drilldown;
1202
+ });
1203
+ parameters.drilldown = packColumns(drilldowns);
1204
+
1205
+ parameters.drilldown_sortby = '-_nsubrecs';
1206
+
1207
+ parameters.filter = buildFilter();
1208
+
1209
+ return parameters;
1210
+ }
1211
+
1212
+ function search() {
1213
+ $location.search(buildParameters());
1214
+ }
1215
+
1216
+ function incrementalSearch() {
1217
+ select(buildParameters());
1218
+ }
1219
+
1220
+ function updateAutoRefresh() {
1221
+ if (autoRefreshPromise) {
1222
+ $interval.cancel(autoRefreshPromise);
1223
+ autoRefreshPromise = null;
1224
+ }
1225
+ if ($scope.autoRefreshIntervalInSeconds > 0) {
1226
+ autoRefreshPromise =
1227
+ $interval(incrementalSearch,
1228
+ $scope.autoRefreshIntervalInSeconds * 1000);
1229
+ }
1230
+ }
1231
+
1232
+ function clearQuery() {
1233
+ $scope.parameters.query = '';
1234
+ incrementalSearch();
1235
+ }
1236
+
1237
+ function clear() {
1238
+ $location.search({});
1239
+ }
1240
+
1241
+ function setSortIconClass(column, sort) {
1242
+ switch (sort) {
1243
+ case 'ascending':
1244
+ column.iconClass = 'glyphicon-sort-by-attributes';
1245
+ break;
1246
+ case 'descending':
1247
+ column.iconClass = 'glyphicon-sort-by-attributes-alt';
1248
+ break;
1249
+ default:
1250
+ column.iconClass = 'glyphicon-sort';
1251
+ break;
1252
+ }
1253
+ }
1254
+
1255
+ function toggleAllColumns() {
1256
+ $scope.table.allColumns.forEach(function(columnInfo) {
1257
+ if (columnInfo.name === '_id') {
1258
+ columnInfo.output = true;
1259
+ } else {
1260
+ columnInfo.output = $scope.toggleAllColumnsChecked;
1261
+ }
1262
+ });
1263
+ incrementalSearch();
1264
+ }
1265
+
1266
+ function toggleSort(column) {
1267
+ var columnInfo = findElement($scope.table.allColumns, function(columnInfo) {
1268
+ return columnInfo.name === column.name;
1269
+ });
1270
+ if (!columnInfo) {
1271
+ return;
1272
+ }
1273
+
1274
+ var sort;
1275
+ switch (columnInfo.sort) {
1276
+ case 'ascending':
1277
+ sort = 'descending';
1278
+ break;
1279
+ case 'descending':
1280
+ sort = null;
1281
+ break;
1282
+ default:
1283
+ sort = 'ascending';
1284
+ break;
1285
+ }
1286
+ columnInfo.sort = sort;
1287
+ setSortIconClass(column, columnInfo.sort);
1288
+ incrementalSearch();
1289
+ }
1290
+
1291
+ function selectDrilldown(key, value) {
1292
+ var queryKey = key;
1293
+ var column = findElement($scope.table.allColumns, function(column) {
1294
+ return column.name === key;
1295
+ });
1296
+
1297
+ var escapedValue;
1298
+ if (typeof value === 'string') {
1299
+ escapedValue = '"' + value.replace('"', '\\"') + '"';
1300
+ } else {
1301
+ escapedValue = value.toString();
1302
+ }
1303
+
1304
+ var query = $scope.parameters.query || '';
1305
+ if (query.length > 0) {
1306
+ query += ' ';
1307
+ }
1308
+ $scope.parameters.query = query + queryKey + ':' + escapedValue;
1309
+
1310
+ var drilldowns = ($scope.parameters.drilldown || '').split(/\s*,\s*/);
1311
+ drilldowns = drilldowns.filter(function(drilldown) {
1312
+ return drilldown !== key;
1313
+ });
1314
+ $scope.parameters.drilldown = drilldowns.join(',');
1315
+
1316
+ search();
1317
+ }
1318
+
1319
+ function createColumnInfo(column) {
1320
+ var name = column.name;
1321
+
1322
+ var output = true;
1323
+ var outputColumns = $scope.parameters.output_columns;
1324
+ if (outputColumns) {
1325
+ outputColumns = outputColumns.split(/\s*,\s*/);
1326
+ output = outputColumns.indexOf(name) !== -1;
1327
+ }
1328
+
1329
+ var drilldown = false;
1330
+ var drilldowns = $scope.parameters.drilldown;
1331
+ if (drilldowns) {
1332
+ drilldowns = drilldowns.split(/\s*,\s*/);
1333
+ drilldown = drilldowns.indexOf(name) !== -1;
1334
+ }
1335
+
1336
+ var sort = null;
1337
+ var sortKeys = ($scope.parameters.sortby || '').split(/\s*,\s*/);
1338
+ if (sortKeys.indexOf(column.name) !== -1) {
1339
+ sort = 'ascending';
1340
+ } else if (sortKeys.indexOf('-' + column.name) !== -1) {
1341
+ sort = 'descending';
1342
+ }
1343
+
1344
+ return {
1345
+ name: name,
1346
+ output: output,
1347
+ drilldown: drilldown,
1348
+ sort: sort,
1349
+ indexes: column.indexes || [],
1350
+ valueType: column.valueType
1351
+ };
1352
+ }
1353
+
1354
+ function addTimeColumn(columnInfo) {
1355
+ if (columnInfo.valueType.name !== 'Time') {
1356
+ return;
1357
+ }
1358
+
1359
+ var timeColumnInfo = {
1360
+ name: columnInfo.name,
1361
+ start: null,
1362
+ startIncluded: true,
1363
+ end: null,
1364
+ endIncluded: true,
1365
+ unit: TimeUnit.units.day,
1366
+ range: [0, 0],
1367
+ syncFromRange: function() {
1368
+ if (this.range[0] === 0 && this.range[1] === 0) {
1369
+ return;
1370
+ }
1371
+ this.start = this.unit.percentToDate(this.range[0] / 100);
1372
+ this.end = this.unit.percentToDate(this.range[1] / 100);
1373
+ },
1374
+ syncToRange: function() {
1375
+ this.unit = TimeUnit.findByDateRange(this.start, this.end);
1376
+ this.updateRangeByDateRange(this.start, this.end);
1377
+ },
1378
+ updateRangeByDateRange: function(start, end) {
1379
+ if (start && end) {
1380
+ this.range = [
1381
+ this.unit.dateToPercent(start) * 100,
1382
+ this.unit.dateToPercent(end) * 100
1383
+ ];
1384
+ } else if (start) {
1385
+ this.range = [
1386
+ this.unit.dateToPercent(start) * 100,
1387
+ 100
1388
+ ];
1389
+ } else if (end) {
1390
+ this.range = [
1391
+ 0,
1392
+ this.unit.dateToPercent(end) * 100
1393
+ ];
1394
+ } else {
1395
+ this.range = [0, 0];
1396
+ }
1397
+ },
1398
+ formater: function(value) {
1399
+ var date = timeColumnInfo.unit.percentToDate(value / 100);
1400
+ return date.toLocaleString();
1401
+ },
1402
+ onRangeChange: function() {
1403
+ timeColumnInfo.syncFromRange();
1404
+ incrementalSearch();
1405
+ },
1406
+ onUnitChange: function() {
1407
+ timeColumnInfo.updateRangeByDateRange(timeColumnInfo.start,
1408
+ timeColumnInfo.end);
1409
+ }
1410
+ };
1411
+ $scope.table.timeColumns.push(timeColumnInfo);
1412
+ }
1413
+
1414
+ function addIndexedColumn(columnInfo) {
1415
+ if (columnInfo.indexes.length === 0) {
1416
+ return;
1417
+ }
1418
+
1419
+ var isTextType = false;
1420
+ if (columnInfo.valueType.isReferenceType) {
1421
+ var table = schema.tables[columnInfo.valueType.name];
1422
+ isTextType = table.keyType.isTextType;
1423
+ } else {
1424
+ isTextType = columnInfo.valueType.isTextType;
1425
+ }
1426
+
1427
+ if (!isTextType) {
1428
+ return;
1429
+ }
1430
+
1431
+ var matchColumns = $scope.parameters.match_columns;
1432
+ var indexName = columnInfo.name;
1433
+ if (columnInfo.valueType.isReferenceType) {
1434
+ indexName += '._key';
1435
+ }
1436
+ var inUse = true;
1437
+ if (matchColumns) {
1438
+ inUse = (matchColumns.indexOf(indexName) !== -1);
1439
+ }
1440
+ var indexedColumnInfo = {
1441
+ name: columnInfo.name,
1442
+ indexName: indexName,
1443
+ inUse: inUse
1444
+ };
1445
+ $scope.table.indexedColumns.push(indexedColumnInfo);
1446
+ }
1447
+
1448
+ function addColumn(columnInfo) {
1449
+ $scope.table.allColumns.push(columnInfo);
1450
+ addTimeColumn(columnInfo);
1451
+ addIndexedColumn(columnInfo);
1452
+ }
1453
+
1454
+ function applyTimeQueries() {
1455
+ var filter = $scope.parameters.filter || '';
1456
+ var conditions = filter.split(/\s*(\|\||&&)\s*/);
1457
+ conditions.forEach(function(condition) {
1458
+ var parts;
1459
+ var columnName;
1460
+ var operator;
1461
+ var time;
1462
+ var timeColumn;
1463
+ if (/^between\(/.test(condition)) {
1464
+ parts = condition.split(/\s*[(,)]\s*/).map(function(part) {
1465
+ var matchData = part.match(/^"(.*)"$/);
1466
+ if (matchData) {
1467
+ return matchData[1];
1468
+ }
1469
+ matchData = part.match(/^\d+$/);
1470
+ if (matchData) {
1471
+ return parseInt(part);
1472
+ }
1473
+ matchData = part.match(/^\d+\.\d+$/);
1474
+ if (matchData) {
1475
+ return parseFloat(part);
1476
+ }
1477
+ return part;
1478
+ });
1479
+ columnName = parts[1];
1480
+ var start = parts[2];
1481
+ var startBorder = parts[3];
1482
+ var end = parts[4];
1483
+ var endBorder = parts[5];
1484
+ timeColumn = findElement($scope.table.timeColumns, function(column) {
1485
+ return column.name === columnName;
1486
+ });
1487
+ if (!timeColumn) {
1488
+ return;
1489
+ }
1490
+ timeColumn.start = fromGroongaTime(start);
1491
+ timeColumn.startBorder = fromBetweenBorder(startBorder);
1492
+ timeColumn.end = fromGroongaTime(end);
1493
+ timeColumn.endBorder = fromBetweenBorder(endBorder);
1494
+ timeColumn.syncToRange();
1495
+ } else if (/(<=|<|>|=>)/.test(condition)) {
1496
+ parts = condition.split(/(<=|<|>|=>)/);
1497
+ columnName = parts[0];
1498
+ operator = parts[1];
1499
+ time = parts[2];
1500
+ timeColumn = findElement($scope.table.timeColumns, function(column) {
1501
+ return column.name === columnName;
1502
+ });
1503
+ if (!timeColumn) {
1504
+ return;
1505
+ }
1506
+ switch (operator) {
1507
+ case '<=':
1508
+ timeColumn.end = fromGroongaTime(time);
1509
+ timeColumn.endBorder = 'include';
1510
+ break;
1511
+ case '<':
1512
+ timeColumn.end = fromGroongaTime(time);
1513
+ timeColumn.endBorder = 'exclude';
1514
+ break;
1515
+ case '>':
1516
+ timeColumn.start = fromGroongaTime(time);
1517
+ timeColumn.startBorder = 'exclude';
1518
+ break;
1519
+ case '>=':
1520
+ timeColumn.start = fromGroongaTime(time);
1521
+ timeColumn.startBorder = 'include';
1522
+ break;
1523
+ }
1524
+ timeColumn.syncToRange();
1525
+ }
1526
+ });
1527
+ }
1528
+
1529
+ function select(userParameters) {
1530
+ var parameters = {
1531
+ table: $scope.table.name
1532
+ };
1533
+ angular.forEach(userParameters, function(value, key) {
1534
+ if (key in parameters) {
1535
+ return;
1536
+ }
1537
+ parameters[key] = value;
1538
+ });
1539
+ var request = client.execute('select', parameters);
1540
+ request.success(function(response) {
1541
+ $scope.message = '';
1542
+ $scope.response.rawData = response.rawData();
1543
+ $scope.commandLine = request.commandLine();
1544
+ $scope.response.elapsedTimeInMilliseconds =
1545
+ response.elapsedTime() * 1000;
1546
+ if (!response.isSuccess()) {
1547
+ $scope.message =
1548
+ 'Failed to call "select" command: ' + response.errorMessage();
1549
+ $scope.response.nTotalRecords = 0;
1550
+ return;
1551
+ }
1552
+ $scope.currentPage = computeCurrentPage(parameters.offset || 0);
1553
+ $scope.response.nTotalRecords = response.nTotalRecords();
1554
+ $scope.response.columns = response.columns();
1555
+ $scope.response.columns.forEach(function(column) {
1556
+ var columnInfo = findElement($scope.table.allColumns, function(columnInfo) {
1557
+ return columnInfo.name === column.name;
1558
+ });
1559
+ if (columnInfo) {
1560
+ setSortIconClass(column, columnInfo.sort);
1561
+ }
1562
+ });
1563
+ $scope.response.records = response.records().map(function(record) {
1564
+ return record.map(function(value, index) {
1565
+ var column = $scope.response.columns[index];
1566
+ var formattedValue;
1567
+ if (column.type === 'Time') {
1568
+ var iso8601Format = 'yyyy-MM-ddTHH:mm:ss.sssZ';
1569
+ formattedValue = $filter('date')(value * 1000, iso8601Format);
1570
+ } else {
1571
+ formattedValue = value;
1572
+ }
1573
+ return {
1574
+ value: value,
1575
+ formattedValue: formattedValue,
1576
+ column: column
1577
+ };
1578
+ });
1579
+ });
1580
+ $scope.response.drilldowns = response.drilldowns();
1581
+ (parameters.drilldown || '')
1582
+ .split(/\s*,\s*/)
1583
+ .filter(function(drilldown) {
1584
+ return drilldown.length > 0;
1585
+ })
1586
+ .forEach(function(drilldown, i) {
1587
+ $scope.response.drilldowns[i].key = drilldown;
1588
+ });
1589
+ });
1590
+ }
1591
+
1592
+ initialize();
1593
+ schemaLoader()
1594
+ .then(function(_schema) {
1595
+ schema = _schema;
1596
+ var table = schema.tables[$scope.table.name];
1597
+ angular.forEach(table.columns, function(column) {
1598
+ addColumn(createColumnInfo(column));
1599
+ });
1600
+ applyTimeQueries();
1601
+
1602
+ var parameters = buildParameters();
1603
+ if ($scope.parameters.offset) {
1604
+ parameters.offset = $scope.parameters.offset;
1605
+ }
1606
+ select(parameters);
1607
+ });
1608
+ }]);
1609
+
1610
+ 'use strict';
1611
+
1612
+ /**
1613
+ * @ngdoc function
1614
+ * @name groongaAdminApp.controller:ColumnShowController
1615
+ * @description
1616
+ * # ColumnShowController
1617
+ * Controller of the groongaAdminApp
1618
+ */
1619
+ angular.module('groongaAdminApp')
1620
+ .controller('ColumnShowController', [
1621
+ '$scope', '$routeParams', '$location', '$http', 'schemaLoader',
1622
+ function ($scope, $routeParams, $location, $http, schemaLoader) {
1623
+ var schema;
1624
+ var client = new GroongaClient($http);
1625
+
1626
+ function initialize() {
1627
+ $scope.column = {
1628
+ name: $routeParams.column,
1629
+ table: {
1630
+ name: $routeParams.table
1631
+ }
1632
+ };
1633
+ $scope.remove = remove;
1634
+ }
1635
+
1636
+ function remove() {
1637
+ if (!window.confirm('Really remove the column?')) {
1638
+ return;
1639
+ }
1640
+
1641
+ var parameters = {
1642
+ table: $scope.column.table.name,
1643
+ name: $scope.column.name
1644
+ };
1645
+ var request = client.execute('column_remove', parameters);
1646
+ request.success(function(response) {
1647
+ console.log(response);
1648
+ if (response.isRemoved()) {
1649
+ schemaLoader().reload();
1650
+ $location.url('/tables/' + $scope.column.table.name + '/');
1651
+ } else {
1652
+ var errorMessage = response.errorMessage();
1653
+ $scope.message = 'Failed to remove the column: ' + errorMessage;
1654
+ }
1655
+ });
1656
+ }
1657
+
1658
+ initialize();
1659
+ schemaLoader()
1660
+ .then(function(_schema) {
1661
+ schema = _schema;
1662
+
1663
+ var table = schema.tables[$scope.column.table.name];
1664
+ var column = table.columns[$scope.column.name];
1665
+ angular.extend($scope.column, column);
1666
+ });
1667
+ }]);
1668
+
1669
+ 'use strict';
1670
+
1671
+ /**
1672
+ * @ngdoc function
1673
+ * @name groongaAdminApp.controller:ColumnNewController
1674
+ * @description
1675
+ * # ColumnNewController
1676
+ * Controller of the groongaAdminApp
1677
+ */
1678
+ angular.module('groongaAdminApp')
1679
+ .controller('ColumnNewController', [
1680
+ '$scope', '$routeParams', '$location', '$http', 'schemaLoader',
1681
+ function ($scope, $routeParams, $location, $http, schemaLoader) {
1682
+ var schema;
1683
+ var client = new GroongaClient($http);
1684
+
1685
+ function initialize() {
1686
+ $scope.table = {
1687
+ name: $routeParams.table
1688
+ };
1689
+ $scope.availableTypes = {
1690
+ scalar: {
1691
+ label: 'Scalar',
1692
+ flag: 'COLUMN_SCALAR'
1693
+ },
1694
+ vector: {
1695
+ label: 'Vector',
1696
+ flag: 'COLUMN_VECTOR'
1697
+ },
1698
+ index: {
1699
+ label: 'Index',
1700
+ flag: 'COLUMN_INDEX'
1701
+ }
1702
+ };
1703
+ $scope.availableValueTypes = {};
1704
+ $scope.column = {
1705
+ type: $scope.availableTypes.scalar,
1706
+ sources: []
1707
+ };
1708
+ $scope.submit = submit;
1709
+ }
1710
+
1711
+ function submit() {
1712
+ var parameters = {
1713
+ table: $scope.table.name,
1714
+ name: $scope.column.name,
1715
+ flags: [$scope.column.type.flag].join('|'),
1716
+ type: $scope.column.valueType,
1717
+ source: $scope.column.sources.join(',')
1718
+ };
1719
+ var request = client.execute('column_create', parameters);
1720
+ request.success(function(response) {
1721
+ if (response.isCreated()) {
1722
+ schemaLoader().reload();
1723
+ $location.url('/tables/' + parameters.table +
1724
+ '/columns/' + parameters.name);
1725
+ } else {
1726
+ var errorMessage = response.errorMessage();
1727
+ $scope.message = 'Failed to create the column: ' + errorMessage;
1728
+ }
1729
+ });
1730
+ }
1731
+
1732
+ function collectAvailableValueTypes() {
1733
+ var types = [];
1734
+ angular.forEach(schema.types, function(type) {
1735
+ types.push(type.name);
1736
+ });
1737
+ angular.forEach(schema.tables, function(table) {
1738
+ types.push(table.name);
1739
+ });
1740
+ return types.sort();
1741
+ }
1742
+
1743
+ initialize();
1744
+ schemaLoader()
1745
+ .then(function(_schema) {
1746
+ schema = _schema;
1747
+ $scope.availableValueTypes = collectAvailableValueTypes();
1748
+ });
1749
+ }]);