rroonga 6.1.3-x86-mingw32 → 7.0.2-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/Rakefile +1 -0
 - data/doc/text/news.md +28 -0
 - data/ext/groonga/rb-grn-column.c +53 -32
 - data/ext/groonga/rb-grn-context.c +1 -1
 - data/ext/groonga/rb-grn-data-column.c +103 -0
 - data/ext/groonga/rb-grn-default-cache.c +104 -0
 - data/ext/groonga/rb-grn-index-column.c +93 -15
 - data/ext/groonga/rb-grn-inverted-index-cursor.c +269 -0
 - data/ext/groonga/rb-grn-object.c +1 -1
 - data/ext/groonga/rb-grn-plugin.c +1 -1
 - data/ext/groonga/rb-grn-table-cursor.c +1 -1
 - data/ext/groonga/rb-grn-table-key-support.c +6 -0
 - data/ext/groonga/rb-grn-table.c +0 -3
 - data/ext/groonga/rb-grn-utils.c +35 -7
 - data/ext/groonga/rb-grn.h +13 -4
 - data/ext/groonga/rb-groonga.c +2 -0
 - data/lib/2.1/groonga.so +0 -0
 - data/lib/2.2/groonga.so +0 -0
 - data/lib/2.3/groonga.so +0 -0
 - data/rroonga-build.rb +7 -7
 - data/rroonga.gemspec +2 -1
 - data/test/test-data-column.rb +71 -2
 - data/test/test-default-cache.rb +43 -0
 - data/test/test-double-array-trie.rb +7 -0
 - data/test/test-fix-size-column.rb +12 -0
 - data/test/test-hash.rb +7 -0
 - data/test/test-index-column.rb +12 -0
 - data/test/test-index-cursor.rb +93 -28
 - data/test/test-patricia-trie.rb +7 -0
 - data/test/test-variable-size-column.rb +19 -0
 - data/vendor/local/bin/grndb.exe +0 -0
 - data/vendor/local/bin/groonga-benchmark.exe +0 -0
 - data/vendor/local/bin/groonga-suggest-create-dataset.exe +0 -0
 - data/vendor/local/bin/groonga.exe +0 -0
 - data/vendor/local/bin/libgroonga-0.dll +0 -0
 - data/vendor/local/bin/libmecab-2.dll +0 -0
 - data/vendor/local/bin/libmsgpackc.dll +0 -0
 - data/vendor/local/bin/libonigmo-6.dll +0 -0
 - data/vendor/local/bin/libpcre-1.dll +0 -0
 - data/vendor/local/bin/libpcrecpp-0.dll +0 -0
 - data/vendor/local/bin/libpcreposix-0.dll +0 -0
 - data/vendor/local/bin/lz4.exe +0 -0
 - data/vendor/local/bin/lz4c.exe +0 -0
 - data/vendor/local/bin/lz4cat +0 -0
 - data/vendor/local/bin/mecab-config +2 -2
 - data/vendor/local/bin/mecab.exe +0 -0
 - data/vendor/local/bin/onigmo-config +2 -2
 - data/vendor/local/bin/pcre-config +1 -1
 - data/vendor/local/bin/pcregrep.exe +0 -0
 - data/vendor/local/bin/pcretest.exe +0 -0
 - data/vendor/local/bin/zlib1.dll +0 -0
 - data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +16 -3
 - data/vendor/local/include/groonga/groonga.h +2 -1
 - data/vendor/local/include/groonga/groonga/cache.h +49 -0
 - data/vendor/local/include/groonga/groonga/column.h +1 -1
 - data/vendor/local/include/groonga/groonga/groonga.h +26 -16
 - data/vendor/local/include/groonga/groonga/ii.h +7 -1
 - data/vendor/local/include/groonga/groonga/obj.h +8 -1
 - data/vendor/local/include/groonga/groonga/plugin.h +6 -1
 - data/vendor/local/include/groonga/groonga/table.h +5 -0
 - data/vendor/local/include/groonga/groonga/util.h +4 -1
 - data/vendor/local/include/groonga/groonga/window_function.h +5 -1
 - data/vendor/local/include/onigmo.h +6 -5
 - data/vendor/local/include/zconf.h +32 -9
 - data/vendor/local/include/zlib.h +298 -154
 - data/vendor/local/lib/groonga/plugins/functions/number.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/number.la +2 -2
 - data/vendor/local/lib/groonga/plugins/functions/string.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/string.la +2 -2
 - data/vendor/local/lib/groonga/plugins/functions/time.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/time.la +2 -2
 - data/vendor/local/lib/groonga/plugins/functions/vector.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/functions/vector.la +2 -2
 - data/vendor/local/lib/groonga/plugins/normalizers/mysql.a +0 -0
 - data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/normalizers/mysql.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/normalizers/mysql.la +2 -2
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +2 -2
 - data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +2 -2
 - data/vendor/local/lib/groonga/plugins/sharding/logical_enumerator.rb +2 -2
 - data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +2 -2
 - data/vendor/local/lib/groonga/plugins/sharding/logical_select.rb +392 -53
 - data/vendor/local/lib/groonga/plugins/sharding/logical_table_remove.rb +1 -2
 - data/vendor/local/lib/groonga/plugins/sharding/range_expression_builder.rb +37 -14
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/suggest/suggest.la +2 -2
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.a +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/token_filters/stop_word.la +2 -2
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
 - data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
 - data/vendor/local/lib/groonga/scripts/ruby/command.rb +0 -1
 - data/vendor/local/lib/groonga/scripts/ruby/command_input.rb +15 -0
 - data/vendor/local/lib/groonga/scripts/ruby/expression.rb +1 -0
 - data/vendor/local/lib/groonga/scripts/ruby/expression_size_estimator.rb +2 -136
 - data/vendor/local/lib/groonga/scripts/ruby/expression_tree/function_call.rb +12 -1
 - data/vendor/local/lib/groonga/scripts/ruby/expression_tree_builder.rb +1 -1
 - data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +1 -0
 - data/vendor/local/lib/groonga/scripts/ruby/logger.rb +7 -8
 - data/vendor/local/lib/groonga/scripts/ruby/scan_info_builder.rb +234 -80
 - data/vendor/local/lib/groonga/scripts/ruby/scan_info_data_size_estimator.rb +185 -0
 - data/vendor/local/lib/groonga/scripts/ruby/table.rb +27 -2
 - data/vendor/local/lib/libgroonga.a +0 -0
 - data/vendor/local/lib/libgroonga.dll.a +0 -0
 - data/vendor/local/lib/libgroonga.la +2 -2
 - data/vendor/local/lib/liblz4.a +0 -0
 - data/vendor/local/lib/liblz4.dll +0 -0
 - data/vendor/local/lib/liblz4.dll.1 +0 -0
 - data/vendor/local/lib/liblz4.dll.1.5.0 +0 -0
 - data/vendor/local/lib/libmecab.a +0 -0
 - data/vendor/local/lib/libmecab.dll.a +0 -0
 - data/vendor/local/lib/libmecab.la +2 -2
 - data/vendor/local/lib/libmsgpackc.a +0 -0
 - data/vendor/local/lib/libmsgpackc.dll.a +0 -0
 - data/vendor/local/lib/libonigmo.a +0 -0
 - data/vendor/local/lib/libonigmo.dll.a +0 -0
 - data/vendor/local/lib/libonigmo.la +3 -3
 - data/vendor/local/lib/libpcre.a +0 -0
 - data/vendor/local/lib/libpcre.dll.a +0 -0
 - data/vendor/local/lib/libpcre.la +2 -2
 - data/vendor/local/lib/libpcrecpp.a +0 -0
 - data/vendor/local/lib/libpcrecpp.dll.a +0 -0
 - data/vendor/local/lib/libpcrecpp.la +2 -2
 - data/vendor/local/lib/libpcreposix.a +0 -0
 - data/vendor/local/lib/libpcreposix.dll.a +0 -0
 - data/vendor/local/lib/libpcreposix.la +2 -2
 - data/vendor/local/lib/libz.a +0 -0
 - data/vendor/local/lib/libz.dll.a +0 -0
 - data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
 - data/vendor/local/lib/pkgconfig/liblz4.pc +5 -5
 - data/vendor/local/lib/pkgconfig/libpcre.pc +1 -1
 - data/vendor/local/lib/pkgconfig/libpcrecpp.pc +1 -1
 - data/vendor/local/lib/pkgconfig/libpcreposix.pc +1 -1
 - data/vendor/local/lib/pkgconfig/msgpack.pc +1 -1
 - data/vendor/local/lib/pkgconfig/onigmo.pc +7 -7
 - data/vendor/local/lib/pkgconfig/zlib.pc +4 -4
 - data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
 - data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +11 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +13 -47
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +6 -5
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +4 -4
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -4
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +181 -891
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/1.2.x.txt +2 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/2.x.txt +11 -9
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/3.x.txt +4 -4
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/5.x.txt +2 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/news/6.x.txt +1086 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/command/request_timeout.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_level.txt +45 -19
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/logical_select.txt +632 -91
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/object_inspect.txt +514 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +902 -55
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/grnslap.txt +5 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-benchmark.txt +11 -9
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-httpd.txt +71 -23
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-httpd.txt +2 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-learner.txt +8 -6
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga.txt +51 -25
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/in_records.txt +195 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/query.txt +100 -15
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/string_length.txt +33 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/vector_new.txt +38 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/query_syntax.txt +35 -7
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/script_syntax.txt +24 -10
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/log.txt +6 -6
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/window_function.txt +22 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/window_functions/record_number.txt +28 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/window_functions/window_record_number.txt +25 -0
 - data/vendor/local/share/doc/groonga/{ja/html/_sources/reference/functions/record_number.txt → en/html/_sources/reference/window_functions/window_sum.txt} +5 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/client.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_autotools.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/unix_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/build/windows_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +102 -93
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/genindex.html +326 -251
 - data/vendor/local/share/doc/groonga/en/html/index.html +111 -104
 - data/vendor/local/share/doc/groonga/en/html/install.html +8 -9
 - data/vendor/local/share/doc/groonga/en/html/install/centos.html +24 -65
 - data/vendor/local/share/doc/groonga/en/html/install/debian.html +12 -11
 - data/vendor/local/share/doc/groonga/en/html/install/fedora.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +8 -9
 - data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news.html +213 -898
 - data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +7 -6
 - data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/2.x.html +16 -14
 - data/vendor/local/share/doc/groonga/en/html/news/3.x.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/news/4.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/5.x.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/news/6.x.html +1148 -0
 - data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/en/html/reference.html +90 -82
 - data/vendor/local/share/doc/groonga/en/html/reference/alias.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/api.html +39 -39
 - data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_thread.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +20 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/api/overview.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/column.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/pretty_print.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/command/request_timeout.html +6 -6
 - data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_delete.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_get.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/config_set.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/database_unmap.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/io_flush.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_acquire.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_release.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +61 -17
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_count.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_parameters.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_select.html +1727 -408
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_shard_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/logical_table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_exist.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_inspect.html +526 -33
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/object_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_register.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/plugin_unregister.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/query_expand.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/reindex.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/schema.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +1685 -492
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/thread_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/configuration.html +19 -19
 - data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +14 -14
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +75 -34
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +107 -82
 - data/vendor/local/share/doc/groonga/en/html/reference/function.html +25 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/fuzzy_search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +10 -10
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/in_records.html +355 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +30 -30
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +25 -25
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/number_classify.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/prefix_rk_search.html +31 -31
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +155 -55
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +15 -15
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/{record_number.html → string_length.html} +36 -31
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/string_substring.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +31 -31
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_day.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_hour.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_minute.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_month.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_second.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_week.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/time_classify_year.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_new.html +170 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_size.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/vector_slice.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +36 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +27 -15
 - data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +21 -21
 - data/vendor/local/share/doc/groonga/en/html/reference/log.html +29 -29
 - data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/operations.html +17 -17
 - data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +20 -20
 - data/vendor/local/share/doc/groonga/en/html/reference/operations/prefix_rk_search.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/regular_expression.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorer.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_at_most.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/scorers/scorer_tf_idf.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/sharding.html +23 -23
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +33 -33
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/tables.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +35 -35
 - data/vendor/local/share/doc/groonga/en/html/reference/types.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/window_function.html +147 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/window_functions/record_number.html +164 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_record_number.html +163 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/window_functions/window_sum.html +163 -0
 - data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/memcached.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/package.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +11 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +13 -47
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +6 -5
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +4 -4
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -4
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +181 -891
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.2.x.txt +2 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/2.x.txt +11 -9
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/3.x.txt +4 -4
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/5.x.txt +2 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/news/6.x.txt +1086 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/command/request_timeout.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_level.txt +45 -19
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/logical_select.txt +632 -91
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/object_inspect.txt +514 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +902 -55
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/grnslap.txt +5 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-benchmark.txt +11 -9
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-httpd.txt +71 -23
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-httpd.txt +2 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-learner.txt +8 -6
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga.txt +51 -25
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/in_records.txt +195 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/query.txt +100 -15
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/string_length.txt +33 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/vector_new.txt +38 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/query_syntax.txt +35 -7
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/script_syntax.txt +24 -10
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/log.txt +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/window_function.txt +22 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/window_functions/record_number.txt +28 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/window_functions/window_record_number.txt +25 -0
 - data/vendor/local/share/doc/groonga/{en/html/_sources/reference/functions/record_number.txt → ja/html/_sources/reference/window_functions/window_sum.txt} +5 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/client.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_autotools.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/unix_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/build/windows_cmake.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +102 -93
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/genindex.html +186 -118
 - data/vendor/local/share/doc/groonga/ja/html/index.html +111 -104
 - data/vendor/local/share/doc/groonga/ja/html/install.html +8 -9
 - data/vendor/local/share/doc/groonga/ja/html/install/centos.html +24 -61
 - data/vendor/local/share/doc/groonga/ja/html/install/debian.html +12 -11
 - data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/others.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +8 -9
 - data/vendor/local/share/doc/groonga/ja/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/news.html +132 -761
 - data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +10 -10
 - data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/5.x.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/news/6.x.html +1064 -0
 - data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference.html +90 -82
 - data/vendor/local/share/doc/groonga/ja/html/reference/alias.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/api.html +39 -39
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_thread.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +20 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/overview.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/column.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/pretty_print.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/request_timeout.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_delete.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_get.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/config_set.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/database_unmap.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/io_flush.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_acquire.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_release.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +67 -17
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_count.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_parameters.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_select.html +1629 -383
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_shard_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/logical_table_remove.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_exist.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_inspect.html +508 -33
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/object_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_register.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/plugin_unregister.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/query_expand.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/reindex.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/schema.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +1606 -478
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_copy.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_rename.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/thread_limit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/configuration.html +19 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +14 -14
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +32 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +76 -48
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +103 -82
 - data/vendor/local/share/doc/groonga/ja/html/reference/function.html +25 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/fuzzy_search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +10 -10
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_records.html +370 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +25 -25
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/number_classify.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/prefix_rk_search.html +31 -31
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +150 -52
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +15 -15
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/{record_number.html → string_length.html} +36 -31
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/string_substring.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +31 -31
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_day.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_hour.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_minute.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_month.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_second.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_week.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/time_classify_year.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_new.html +171 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_size.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/vector_slice.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +36 -26
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +19 -7
 - data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +21 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/log.html +25 -25
 - data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +17 -17
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +20 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/operations/prefix_rk_search.html +26 -26
 - data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/regular_expression.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorer.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_at_most.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/scorers/scorer_tf_idf.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/sharding.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +33 -33
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +32 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +26 -26
 - data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +35 -35
 - data/vendor/local/share/doc/groonga/ja/html/reference/types.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/window_function.html +146 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/record_number.html +165 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_record_number.html +164 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/window_functions/window_sum.html +164 -0
 - data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/memcached.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
 - data/vendor/local/share/groonga/mruby/LEGAL +4 -0
 - data/vendor/local/share/license/mruby/AUTHORS +1 -0
 - data/vendor/local/share/license/mruby/MITL +1 -1
 - data/vendor/local/share/license/zlib/README +3 -3
 - metadata +100 -67
 - data/lib/2.4/groonga.so +0 -0
 - data/vendor/local/sbin/groonga-httpd-restart +0 -105
 
| 
         @@ -47,21 +47,61 @@ optional:: 
     | 
|
| 
       47 
47 
     | 
    
         
             
                     [adjuster=null]
         
     | 
| 
       48 
48 
     | 
    
         
             
                     [drilldown_calc_types=NONE]
         
     | 
| 
       49 
49 
     | 
    
         
             
                     [drilldown_calc_target=null]
         
     | 
| 
      
 50 
     | 
    
         
            +
                     [drilldown_filter=null]
         
     | 
| 
       50 
51 
     | 
    
         
             
                     [sort_keys=null]
         
     | 
| 
       51 
52 
     | 
    
         
             
                     [drilldown_sort_keys=null]
         
     | 
| 
       52 
53 
     | 
    
         | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
      
 54 
     | 
    
         
            +
            This command has the following named parameters for dynamic columns:
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
               * ``columns[${NAME}].stage=null``
         
     | 
| 
      
 57 
     | 
    
         
            +
               * ``columns[${NAME}].flags=COLUMN_SCALAR``
         
     | 
| 
      
 58 
     | 
    
         
            +
               * ``columns[${NAME}].type=null``
         
     | 
| 
      
 59 
     | 
    
         
            +
               * ``columns[${NAME}].value=null``
         
     | 
| 
      
 60 
     | 
    
         
            +
               * ``columns[${NAME}].window.sort_keys=null``
         
     | 
| 
      
 61 
     | 
    
         
            +
               * ``columns[${NAME}].window.group_keys=null``
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            You can use one or more alphabets, digits, ``_`` for ``${NAME}``. For
         
     | 
| 
      
 64 
     | 
    
         
            +
            example, ``column1`` is a valid ``${NAME}``. This is the same rule as
         
     | 
| 
      
 65 
     | 
    
         
            +
            normal column. See also :ref:`column-create-name`.
         
     | 
| 
      
 66 
     | 
    
         
            +
             
     | 
| 
      
 67 
     | 
    
         
            +
            Parameters that have the same ``${NAME}`` are grouped.
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            For example, the following parameters specify one dynamic column:
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
              * ``--columns[name].stage initial``
         
     | 
| 
      
 72 
     | 
    
         
            +
              * ``--columns[name].type UInt32``
         
     | 
| 
      
 73 
     | 
    
         
            +
              * ``--columns[name].value 29``
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
            The following parameters specify two dynamic columns:
         
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
              * ``--columns[name1].stage initial``
         
     | 
| 
      
 78 
     | 
    
         
            +
              * ``--columns[name1].type UInt32``
         
     | 
| 
      
 79 
     | 
    
         
            +
              * ``--columns[name1].value 29``
         
     | 
| 
      
 80 
     | 
    
         
            +
              * ``--columns[name2].stage filtered``
         
     | 
| 
      
 81 
     | 
    
         
            +
              * ``--columns[name2].type Float``
         
     | 
| 
      
 82 
     | 
    
         
            +
              * ``--columns[name2].value '_score * 0.1'``
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
            This command has the following named parameters for advanced drilldown:
         
     | 
| 
       54 
85 
     | 
    
         | 
| 
       55 
86 
     | 
    
         
             
              * ``drilldowns[${LABEL}].keys=null``
         
     | 
| 
       56 
     | 
    
         
            -
              * ``drilldowns[${LABEL}]. 
     | 
| 
      
 87 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].sort_keys=null``
         
     | 
| 
       57 
88 
     | 
    
         
             
              * ``drilldowns[${LABEL}].output_columns="_key, _nsubrecs"``
         
     | 
| 
       58 
89 
     | 
    
         
             
              * ``drilldowns[${LABEL}].offset=0``
         
     | 
| 
       59 
90 
     | 
    
         
             
              * ``drilldowns[${LABEL}].limit=10``
         
     | 
| 
       60 
91 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_types=NONE``
         
     | 
| 
       61 
92 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_target=null``
         
     | 
| 
      
 93 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].filter=null``
         
     | 
| 
      
 94 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].stage=null``
         
     | 
| 
      
 95 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].flags=COLUMN_SCALAR``
         
     | 
| 
      
 96 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].type=null``
         
     | 
| 
      
 97 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].value=null``
         
     | 
| 
      
 98 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.sort_keys=null``
         
     | 
| 
      
 99 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.group_keys=null``
         
     | 
| 
       62 
100 
     | 
    
         | 
| 
       63 
101 
     | 
    
         
             
            .. deprecated:: 6.0.3
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
               ``drilldown[...]`` syntax is deprecated, Use ``drilldowns[...]``
         
     | 
| 
      
 104 
     | 
    
         
            +
               instead.
         
     | 
| 
       65 
105 
     | 
    
         | 
| 
       66 
106 
     | 
    
         
             
            You can use one or more alphabets, digits, ``_`` and ``.`` for
         
     | 
| 
       67 
107 
     | 
    
         
             
            ``${LABEL}``. For example, ``parent.sub1`` is a valid ``${LABEL}``.
         
     | 
| 
         @@ -71,14 +111,14 @@ Parameters that have the same ``${LABEL}`` are grouped. 
     | 
|
| 
       71 
111 
     | 
    
         
             
            For example, the following parameters specify one drilldown:
         
     | 
| 
       72 
112 
     | 
    
         | 
| 
       73 
113 
     | 
    
         
             
              * ``--drilldowns[label].keys column``
         
     | 
| 
       74 
     | 
    
         
            -
              * ``--drilldowns[label]. 
     | 
| 
      
 114 
     | 
    
         
            +
              * ``--drilldowns[label].sort_keys -_nsubrecs``
         
     | 
| 
       75 
115 
     | 
    
         | 
| 
       76 
116 
     | 
    
         
             
            The following parameters specify two drilldowns:
         
     | 
| 
       77 
117 
     | 
    
         | 
| 
       78 
118 
     | 
    
         
             
              * ``--drilldowns[label1].keys column1``
         
     | 
| 
       79 
     | 
    
         
            -
              * ``--drilldowns[label1]. 
     | 
| 
      
 119 
     | 
    
         
            +
              * ``--drilldowns[label1].sort_keys -_nsubrecs``
         
     | 
| 
       80 
120 
     | 
    
         
             
              * ``--drilldowns[label2].keys column2``
         
     | 
| 
       81 
     | 
    
         
            -
              * ``--drilldowns[label2]. 
     | 
| 
      
 121 
     | 
    
         
            +
              * ``--drilldowns[label2].sort_keys _key``
         
     | 
| 
       82 
122 
     | 
    
         | 
| 
       83 
123 
     | 
    
         
             
            Usage
         
     | 
| 
       84 
124 
     | 
    
         
             
            -----
         
     | 
| 
         @@ -245,7 +285,7 @@ Drilldown 
     | 
|
| 
       245 
285 
     | 
    
         
             
            ^^^^^^^^^
         
     | 
| 
       246 
286 
     | 
    
         | 
| 
       247 
287 
     | 
    
         
             
            You can get additional grouped results against the search result in
         
     | 
| 
       248 
     | 
    
         
            -
            one ``select``. You need to use two or more ``SELECT``s in SQL but
         
     | 
| 
      
 288 
     | 
    
         
            +
            one ``select``. You need to use two or more ``SELECT`` s in SQL but
         
     | 
| 
       249 
289 
     | 
    
         
             
            ``select`` in Groonga can do it in one ``select``.
         
     | 
| 
       250 
290 
     | 
    
         | 
| 
       251 
291 
     | 
    
         
             
            This feature is called as `drilldown
         
     | 
| 
         @@ -291,6 +331,114 @@ the maximum and/or minimum value from grouped records, summing values 
     | 
|
| 
       291 
331 
     | 
    
         
             
            in grouped records and so on. See
         
     | 
| 
       292 
332 
     | 
    
         
             
            :ref:`select-drilldown-related-parameters` for details.
         
     | 
| 
       293 
333 
     | 
    
         | 
| 
      
 334 
     | 
    
         
            +
            Dynamic column
         
     | 
| 
      
 335 
     | 
    
         
            +
            ^^^^^^^^^^^^^^
         
     | 
| 
      
 336 
     | 
    
         
            +
             
     | 
| 
      
 337 
     | 
    
         
            +
            You can create zero or more columns dynamically while a ``select``
         
     | 
| 
      
 338 
     | 
    
         
            +
            execution. You can use them for drilldown by computed value, window
         
     | 
| 
      
 339 
     | 
    
         
            +
            function and so on.
         
     | 
| 
      
 340 
     | 
    
         
            +
             
     | 
| 
      
 341 
     | 
    
         
            +
            Here is an example that uses dynamic column for drilldown by computed
         
     | 
| 
      
 342 
     | 
    
         
            +
            value. This example creates a new column named
         
     | 
| 
      
 343 
     | 
    
         
            +
            ``n_likes_class``. ``n_likes_class`` column has classified value of
         
     | 
| 
      
 344 
     | 
    
         
            +
            ``Entry.n_likes`` value. This example classifies ``Entry.n_likes``
         
     | 
| 
      
 345 
     | 
    
         
            +
            column value ``10`` step and the lowest number in the class is the
         
     | 
| 
      
 346 
     | 
    
         
            +
            classified value. If a ``Entry.n_likes`` value is between ``0`` and
         
     | 
| 
      
 347 
     | 
    
         
            +
            ``9`` such as ``3`` and ``5``, ``n_likes_class`` value (classified
         
     | 
| 
      
 348 
     | 
    
         
            +
            value) is ``0``. If ``Entry.n_likes`` value is between ``10`` and
         
     | 
| 
      
 349 
     | 
    
         
            +
            ``19`` such as ``10`` and ``15``, ``n_likes_class`` value (classified
         
     | 
| 
      
 350 
     | 
    
         
            +
            value) is ``10``.
         
     | 
| 
      
 351 
     | 
    
         
            +
             
     | 
| 
      
 352 
     | 
    
         
            +
            You can use :doc:`/reference/functions/number_classify` function for
         
     | 
| 
      
 353 
     | 
    
         
            +
            the classification. You need to register ``functions/number`` plugin
         
     | 
| 
      
 354 
     | 
    
         
            +
            by :doc:`plugin_register` command to use
         
     | 
| 
      
 355 
     | 
    
         
            +
            :doc:`/reference/functions/number_classify` function.
         
     | 
| 
      
 356 
     | 
    
         
            +
             
     | 
| 
      
 357 
     | 
    
         
            +
            This example does drilldown by ``n_likes_class`` value. The drilldown
         
     | 
| 
      
 358 
     | 
    
         
            +
            result will help you to know data trend.
         
     | 
| 
      
 359 
     | 
    
         
            +
             
     | 
| 
      
 360 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 361 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/usage_dynamic_column.log
         
     | 
| 
      
 362 
     | 
    
         
            +
            .. plugin_register functions/number
         
     | 
| 
      
 363 
     | 
    
         
            +
            .. select \
         
     | 
| 
      
 364 
     | 
    
         
            +
            ..   --table Entries \
         
     | 
| 
      
 365 
     | 
    
         
            +
            ..   --columns[n_likes_class].stage initial \
         
     | 
| 
      
 366 
     | 
    
         
            +
            ..   --columns[n_likes_class].type UInt32 \
         
     | 
| 
      
 367 
     | 
    
         
            +
            ..   --columns[n_likes_class].value 'number_classify(n_likes, 10)' \
         
     | 
| 
      
 368 
     | 
    
         
            +
            ..   --drilldown n_likes_class \
         
     | 
| 
      
 369 
     | 
    
         
            +
            ..   --drilldown_sort_keys _nsubrecs \
         
     | 
| 
      
 370 
     | 
    
         
            +
            ..   --output_columns n_likes,n_likes_class
         
     | 
| 
      
 371 
     | 
    
         
            +
             
     | 
| 
      
 372 
     | 
    
         
            +
            See :ref:`select-dynamic-column-related-parameters` for details.
         
     | 
| 
      
 373 
     | 
    
         
            +
             
     | 
| 
      
 374 
     | 
    
         
            +
            Window function
         
     | 
| 
      
 375 
     | 
    
         
            +
            ^^^^^^^^^^^^^^^
         
     | 
| 
      
 376 
     | 
    
         
            +
             
     | 
| 
      
 377 
     | 
    
         
            +
            You can compute each record value from values of grouped records. For
         
     | 
| 
      
 378 
     | 
    
         
            +
            example, you can compute sums of each group and puts sums to each
         
     | 
| 
      
 379 
     | 
    
         
            +
            record. The difference against drilldown is drilldown can compute sums
         
     | 
| 
      
 380 
     | 
    
         
            +
            of each group but it puts sums to each group not record.
         
     | 
| 
      
 381 
     | 
    
         
            +
             
     | 
| 
      
 382 
     | 
    
         
            +
            Here is the result with window function. Each record has sum:
         
     | 
| 
      
 383 
     | 
    
         
            +
             
     | 
| 
      
 384 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 385 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 386 
     | 
    
         
            +
             
     | 
| 
      
 387 
     | 
    
         
            +
               * - Group No.
         
     | 
| 
      
 388 
     | 
    
         
            +
                 - Target value
         
     | 
| 
      
 389 
     | 
    
         
            +
                 - Sum result
         
     | 
| 
      
 390 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 391 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 392 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 393 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 394 
     | 
    
         
            +
                 - 10
         
     | 
| 
      
 395 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 396 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 397 
     | 
    
         
            +
                 - 15
         
     | 
| 
      
 398 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 399 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 400 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 401 
     | 
    
         
            +
                 - 8
         
     | 
| 
      
 402 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 403 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 404 
     | 
    
         
            +
                 - 8
         
     | 
| 
      
 405 
     | 
    
         
            +
             
     | 
| 
      
 406 
     | 
    
         
            +
            Here is the result with drilldown. Each group has sum:
         
     | 
| 
      
 407 
     | 
    
         
            +
             
     | 
| 
      
 408 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 409 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 410 
     | 
    
         
            +
             
     | 
| 
      
 411 
     | 
    
         
            +
               * - Group No.
         
     | 
| 
      
 412 
     | 
    
         
            +
                 - Target values
         
     | 
| 
      
 413 
     | 
    
         
            +
                 - Sum result
         
     | 
| 
      
 414 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 415 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 416 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 417 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 418 
     | 
    
         
            +
                 - 10, 15
         
     | 
| 
      
 419 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 420 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 421 
     | 
    
         
            +
                 - 3, 5
         
     | 
| 
      
 422 
     | 
    
         
            +
                 - 8
         
     | 
| 
      
 423 
     | 
    
         
            +
             
     | 
| 
      
 424 
     | 
    
         
            +
            Window function is useful for data analysis.
         
     | 
| 
      
 425 
     | 
    
         
            +
             
     | 
| 
      
 426 
     | 
    
         
            +
            Here is an example that sums ``Entries.n_likes`` per
         
     | 
| 
      
 427 
     | 
    
         
            +
            ``Entries.tag``:
         
     | 
| 
      
 428 
     | 
    
         
            +
             
     | 
| 
      
 429 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 430 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/usage_window_function.log
         
     | 
| 
      
 431 
     | 
    
         
            +
            .. plugin_register functions/number
         
     | 
| 
      
 432 
     | 
    
         
            +
            .. select \
         
     | 
| 
      
 433 
     | 
    
         
            +
            ..   --table Entries \
         
     | 
| 
      
 434 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].stage initial \
         
     | 
| 
      
 435 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].type UInt32 \
         
     | 
| 
      
 436 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].value 'window_sum(n_likes)' \
         
     | 
| 
      
 437 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].window.group_keys tag \
         
     | 
| 
      
 438 
     | 
    
         
            +
            ..   --output_columns tag,n_likes,n_likes_sum_per_tag
         
     | 
| 
      
 439 
     | 
    
         
            +
             
     | 
| 
      
 440 
     | 
    
         
            +
            See :ref:`select-window-function-related-parameters` for details.
         
     | 
| 
      
 441 
     | 
    
         
            +
             
     | 
| 
       294 
442 
     | 
    
         
             
            Parameters
         
     | 
| 
       295 
443 
     | 
    
         
             
            ----------
         
     | 
| 
       296 
444 
     | 
    
         | 
| 
         @@ -852,7 +1000,7 @@ record. 
     | 
|
| 
       852 
1000 
     | 
    
         | 
| 
       853 
1001 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       854 
1002 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/offset_simple.log
         
     | 
| 
       855 
     | 
    
         
            -
            .. select Entries -- 
     | 
| 
      
 1003 
     | 
    
         
            +
            .. select Entries --sort_keys _id --offset 3 --output_columns _key
         
     | 
| 
       856 
1004 
     | 
    
         | 
| 
       857 
1005 
     | 
    
         
             
            The ``select`` command outputs from the 4th record.
         
     | 
| 
       858 
1006 
     | 
    
         | 
| 
         @@ -864,7 +1012,7 @@ record. 
     | 
|
| 
       864 
1012 
     | 
    
         | 
| 
       865 
1013 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       866 
1014 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/offset_negative.log
         
     | 
| 
       867 
     | 
    
         
            -
            .. select Entries -- 
     | 
| 
      
 1015 
     | 
    
         
            +
            .. select Entries --sort_keys _id --offset -2 --output_columns _key
         
     | 
| 
       868 
1016 
     | 
    
         | 
| 
       869 
1017 
     | 
    
         
             
            The ``select`` command outputs from the 4th record because the total
         
     | 
| 
       870 
1018 
     | 
    
         
             
            number of records is ``5``.
         
     | 
| 
         @@ -883,7 +1031,7 @@ Here is a simple ``limit`` usage example. 
     | 
|
| 
       883 
1031 
     | 
    
         | 
| 
       884 
1032 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       885 
1033 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/limit_simple.log
         
     | 
| 
       886 
     | 
    
         
            -
            .. select Entries -- 
     | 
| 
      
 1034 
     | 
    
         
            +
            .. select Entries --sort_keys _id --offset 2 --limit 3 --output_columns _key
         
     | 
| 
       887 
1035 
     | 
    
         | 
| 
       888 
1036 
     | 
    
         
             
            The ``select`` command outputs the 3rd, the 4th and the 5th records.
         
     | 
| 
       889 
1037 
     | 
    
         | 
| 
         @@ -912,6 +1060,476 @@ TODO: write in English and add example. 
     | 
|
| 
       912 
1060 
     | 
    
         | 
| 
       913 
1061 
     | 
    
         
             
            scorerは、検索処理が完了し、ソート処理が実行される前に呼び出されます。従って、各レコードのスコアを操作する式を指定しておけば、検索結果のソート順序をカスタマイズできるようになります。
         
     | 
| 
       914 
1062 
     | 
    
         | 
| 
      
 1063 
     | 
    
         
            +
            .. _select-dynamic-column-related-parameters:
         
     | 
| 
      
 1064 
     | 
    
         
            +
             
     | 
| 
      
 1065 
     | 
    
         
            +
            Dynamic column related parameters
         
     | 
| 
      
 1066 
     | 
    
         
            +
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         
     | 
| 
      
 1067 
     | 
    
         
            +
             
     | 
| 
      
 1068 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1069 
     | 
    
         
            +
             
     | 
| 
      
 1070 
     | 
    
         
            +
            This section describes dynamic column related parameters. You can use
         
     | 
| 
      
 1071 
     | 
    
         
            +
            dynamic column for window function but this section doesn't describe
         
     | 
| 
      
 1072 
     | 
    
         
            +
            window function. See :ref:`select-window-function-related-parameters`
         
     | 
| 
      
 1073 
     | 
    
         
            +
            for window function.
         
     | 
| 
      
 1074 
     | 
    
         
            +
             
     | 
| 
      
 1075 
     | 
    
         
            +
            You can create zero or more columns and fill values into these columns
         
     | 
| 
      
 1076 
     | 
    
         
            +
            while a ``select`` execution. These columns are called as "dynamic
         
     | 
| 
      
 1077 
     | 
    
         
            +
            columns". You can use dynamic columns as same as normal columns after
         
     | 
| 
      
 1078 
     | 
    
         
            +
            dynamic columns are created.
         
     | 
| 
      
 1079 
     | 
    
         
            +
             
     | 
| 
      
 1080 
     | 
    
         
            +
            Dynamic column has performance merit because its values are computed
         
     | 
| 
      
 1081 
     | 
    
         
            +
            at once and reused computed values.
         
     | 
| 
      
 1082 
     | 
    
         
            +
             
     | 
| 
      
 1083 
     | 
    
         
            +
            Dynamic column increases memory usage because its values are kept
         
     | 
| 
      
 1084 
     | 
    
         
            +
            while the ``select`` execution.
         
     | 
| 
      
 1085 
     | 
    
         
            +
             
     | 
| 
      
 1086 
     | 
    
         
            +
            You need to use dynamic column in the following cases:
         
     | 
| 
      
 1087 
     | 
    
         
            +
             
     | 
| 
      
 1088 
     | 
    
         
            +
              * You want to name values like ``AS`` in SQL.
         
     | 
| 
      
 1089 
     | 
    
         
            +
             
     | 
| 
      
 1090 
     | 
    
         
            +
              * You want to use computed values for drilldown. Groonga doesn't
         
     | 
| 
      
 1091 
     | 
    
         
            +
                support drilldown target value computation in drilldown.
         
     | 
| 
      
 1092 
     | 
    
         
            +
             
     | 
| 
      
 1093 
     | 
    
         
            +
              * You want to use window function.
         
     | 
| 
      
 1094 
     | 
    
         
            +
             
     | 
| 
      
 1095 
     | 
    
         
            +
            There are some points to create dynamic columns. You must specify
         
     | 
| 
      
 1096 
     | 
    
         
            +
            ``stage`` to each dynamic column to control dynamic columns creation
         
     | 
| 
      
 1097 
     | 
    
         
            +
            points. It's important that you choose proper point to get better
         
     | 
| 
      
 1098 
     | 
    
         
            +
            performance.
         
     | 
| 
      
 1099 
     | 
    
         
            +
             
     | 
| 
      
 1100 
     | 
    
         
            +
            For example, it's not a good idea that you create a dynamic column
         
     | 
| 
      
 1101 
     | 
    
         
            +
            that is only used for output for all records. The number of output
         
     | 
| 
      
 1102 
     | 
    
         
            +
            records will be a little even if there are many records in a
         
     | 
| 
      
 1103 
     | 
    
         
            +
            table. Because you will filter, sort and limit all records and output
         
     | 
| 
      
 1104 
     | 
    
         
            +
            only the limited records in many cases.
         
     | 
| 
      
 1105 
     | 
    
         
            +
             
     | 
| 
      
 1106 
     | 
    
         
            +
            See :ref:`select-columns-name-stage` for ``stage`` detail.
         
     | 
| 
      
 1107 
     | 
    
         
            +
             
     | 
| 
      
 1108 
     | 
    
         
            +
            Here are parameters for dynamic column. They don't include window
         
     | 
| 
      
 1109 
     | 
    
         
            +
            function related parameters. See
         
     | 
| 
      
 1110 
     | 
    
         
            +
            :ref:`select-window-function-related-parameters` for window function
         
     | 
| 
      
 1111 
     | 
    
         
            +
            related parameters:
         
     | 
| 
      
 1112 
     | 
    
         
            +
             
     | 
| 
      
 1113 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1114 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1115 
     | 
    
         
            +
             
     | 
| 
      
 1116 
     | 
    
         
            +
               * - Name
         
     | 
| 
      
 1117 
     | 
    
         
            +
                 - Default value
         
     | 
| 
      
 1118 
     | 
    
         
            +
                 - Required or optional
         
     | 
| 
      
 1119 
     | 
    
         
            +
               * - ``columns[${NAME}].stage``
         
     | 
| 
      
 1120 
     | 
    
         
            +
                 - ``null``
         
     | 
| 
      
 1121 
     | 
    
         
            +
                 - Required
         
     | 
| 
      
 1122 
     | 
    
         
            +
               * - ``columns[${NAME}].flags``
         
     | 
| 
      
 1123 
     | 
    
         
            +
                 - ``COLUMN_SCALAR``
         
     | 
| 
      
 1124 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 1125 
     | 
    
         
            +
               * - ``columns[${NAME}].type``
         
     | 
| 
      
 1126 
     | 
    
         
            +
                 - ``null``
         
     | 
| 
      
 1127 
     | 
    
         
            +
                 - Required
         
     | 
| 
      
 1128 
     | 
    
         
            +
               * - ``columns[${NAME}].value``
         
     | 
| 
      
 1129 
     | 
    
         
            +
                 - ``null``
         
     | 
| 
      
 1130 
     | 
    
         
            +
                 - Required
         
     | 
| 
      
 1131 
     | 
    
         
            +
             
     | 
| 
      
 1132 
     | 
    
         
            +
            You need to specify multiple parameters for a dynamic
         
     | 
| 
      
 1133 
     | 
    
         
            +
            column. ``${NAME}`` is the name for each dynamic column. Parameters
         
     | 
| 
      
 1134 
     | 
    
         
            +
            that use the same ``${NAME}`` are treated as parameters for the same
         
     | 
| 
      
 1135 
     | 
    
         
            +
            dynamic column. Here is an example to specify parameters for 2 dynamic
         
     | 
| 
      
 1136 
     | 
    
         
            +
            columns (``name1`` and ``name2``)::
         
     | 
| 
      
 1137 
     | 
    
         
            +
             
     | 
| 
      
 1138 
     | 
    
         
            +
                --columns[name1].stage initial
         
     | 
| 
      
 1139 
     | 
    
         
            +
                --columns[name1].type UInt32
         
     | 
| 
      
 1140 
     | 
    
         
            +
                --columns[name1].value 29
         
     | 
| 
      
 1141 
     | 
    
         
            +
             
     | 
| 
      
 1142 
     | 
    
         
            +
                --columns[name2].stage filtered
         
     | 
| 
      
 1143 
     | 
    
         
            +
                --columns[name2].type ShortText
         
     | 
| 
      
 1144 
     | 
    
         
            +
                --columns[name2].value "29"
         
     | 
| 
      
 1145 
     | 
    
         
            +
             
     | 
| 
      
 1146 
     | 
    
         
            +
            .. _select-columns-name-stage:
         
     | 
| 
      
 1147 
     | 
    
         
            +
             
     | 
| 
      
 1148 
     | 
    
         
            +
            ``columns[${NAME}].stage``
         
     | 
| 
      
 1149 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 1150 
     | 
    
         
            +
             
     | 
| 
      
 1151 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1152 
     | 
    
         
            +
             
     | 
| 
      
 1153 
     | 
    
         
            +
            Specifies when the dynamic column is created. This is a required
         
     | 
| 
      
 1154 
     | 
    
         
            +
            parameter to create a dynamic column.
         
     | 
| 
      
 1155 
     | 
    
         
            +
             
     | 
| 
      
 1156 
     | 
    
         
            +
            Here are available stages:
         
     | 
| 
      
 1157 
     | 
    
         
            +
             
     | 
| 
      
 1158 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1159 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1160 
     | 
    
         
            +
             
     | 
| 
      
 1161 
     | 
    
         
            +
               * - Name
         
     | 
| 
      
 1162 
     | 
    
         
            +
                 - Description
         
     | 
| 
      
 1163 
     | 
    
         
            +
               * - ``initial``
         
     | 
| 
      
 1164 
     | 
    
         
            +
                 - Dynamic column is created at first.
         
     | 
| 
      
 1165 
     | 
    
         
            +
               * - ``filtered``
         
     | 
| 
      
 1166 
     | 
    
         
            +
                 - Dynamic column is created after :ref:`select-query` and
         
     | 
| 
      
 1167 
     | 
    
         
            +
                   :ref:`select-filter` are evaluated.
         
     | 
| 
      
 1168 
     | 
    
         
            +
               * - ``output``
         
     | 
| 
      
 1169 
     | 
    
         
            +
                 - Dynamic column is created before :ref:`select-output-columns`
         
     | 
| 
      
 1170 
     | 
    
         
            +
                   is evaluated.
         
     | 
| 
      
 1171 
     | 
    
         
            +
             
     | 
| 
      
 1172 
     | 
    
         
            +
            Here is the ``select`` process flow with dynamic column creation
         
     | 
| 
      
 1173 
     | 
    
         
            +
            points. You should choose stage as late as possible:
         
     | 
| 
      
 1174 
     | 
    
         
            +
             
     | 
| 
      
 1175 
     | 
    
         
            +
              #. Creates dynamic columns for ``initial`` stage. All records have
         
     | 
| 
      
 1176 
     | 
    
         
            +
                 these dynamic columns.
         
     | 
| 
      
 1177 
     | 
    
         
            +
             
     | 
| 
      
 1178 
     | 
    
         
            +
              #. Evaluates :ref:`select-query` and :ref:`select-filter`. You can
         
     | 
| 
      
 1179 
     | 
    
         
            +
                 use dynamic columns created in ``initial`` stage.
         
     | 
| 
      
 1180 
     | 
    
         
            +
             
     | 
| 
      
 1181 
     | 
    
         
            +
              #. Creates dynamic columns for ``filtered`` stage. Only filtered
         
     | 
| 
      
 1182 
     | 
    
         
            +
                 records have these dynamic columns.
         
     | 
| 
      
 1183 
     | 
    
         
            +
             
     | 
| 
      
 1184 
     | 
    
         
            +
              #. Evaluates :ref:`select-adjuster`. You can use dynamic columns
         
     | 
| 
      
 1185 
     | 
    
         
            +
                 created in ``initial`` stage and ``filtered`` stage.
         
     | 
| 
      
 1186 
     | 
    
         
            +
             
     | 
| 
      
 1187 
     | 
    
         
            +
              #. Evaluates :ref:`select-scorer`. You can use dynamic columns
         
     | 
| 
      
 1188 
     | 
    
         
            +
                 created in ``initial`` stage and ``filtered`` stage.
         
     | 
| 
      
 1189 
     | 
    
         
            +
             
     | 
| 
      
 1190 
     | 
    
         
            +
              #. Evaluates :ref:`select-sort-keys`, :ref:`select-offset` and
         
     | 
| 
      
 1191 
     | 
    
         
            +
                 :ref:`select-limit`. You can use dynamic columns created in
         
     | 
| 
      
 1192 
     | 
    
         
            +
                 ``initial`` stage and ``filtered`` stage.
         
     | 
| 
      
 1193 
     | 
    
         
            +
             
     | 
| 
      
 1194 
     | 
    
         
            +
              #. Evaluates :ref:`select-slice-related-parameters`. You can use
         
     | 
| 
      
 1195 
     | 
    
         
            +
                 dynamic columns created in ``initial`` stage and ``filtered`` stage.
         
     | 
| 
      
 1196 
     | 
    
         
            +
             
     | 
| 
      
 1197 
     | 
    
         
            +
              #. Evaluates :ref:`select-drilldown-related-parameters` and
         
     | 
| 
      
 1198 
     | 
    
         
            +
                 :ref:`select-advanced-drilldown-related-parameters`. You can use
         
     | 
| 
      
 1199 
     | 
    
         
            +
                 dynamic columns created in ``initial`` stage and ``filtered`` stage.
         
     | 
| 
      
 1200 
     | 
    
         
            +
                 Note that you can create dynamic columns in each drilldown.
         
     | 
| 
      
 1201 
     | 
    
         
            +
             
     | 
| 
      
 1202 
     | 
    
         
            +
              #. Creates dynamic columns for ``output`` stage. Only
         
     | 
| 
      
 1203 
     | 
    
         
            +
                 :ref:`select-limit` records have these dynamic columns.
         
     | 
| 
      
 1204 
     | 
    
         
            +
             
     | 
| 
      
 1205 
     | 
    
         
            +
              #. Evaluates :ref:`select-output-columns`. You can use dynamic
         
     | 
| 
      
 1206 
     | 
    
         
            +
                 columns created in ``initial`` stage, ``filtered`` stage and
         
     | 
| 
      
 1207 
     | 
    
         
            +
                 ``output`` stage.
         
     | 
| 
      
 1208 
     | 
    
         
            +
             
     | 
| 
      
 1209 
     | 
    
         
            +
            Here is an example that creates ``is_popular`` column at ``initial``
         
     | 
| 
      
 1210 
     | 
    
         
            +
            stage. You can use ``is_popular`` in all parameters such as ``filter``
         
     | 
| 
      
 1211 
     | 
    
         
            +
            and ``output_columns``:
         
     | 
| 
      
 1212 
     | 
    
         
            +
             
     | 
| 
      
 1213 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1214 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_stage.log
         
     | 
| 
      
 1215 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 1216 
     | 
    
         
            +
            ..   --columns[is_popular].stage initial \
         
     | 
| 
      
 1217 
     | 
    
         
            +
            ..   --columns[is_popular].type Bool \
         
     | 
| 
      
 1218 
     | 
    
         
            +
            ..   --columns[is_popular].value 'n_likes >= 10' \
         
     | 
| 
      
 1219 
     | 
    
         
            +
            ..   --filter is_popular \
         
     | 
| 
      
 1220 
     | 
    
         
            +
            ..   --output_columns _id,is_popular,n_likes
         
     | 
| 
      
 1221 
     | 
    
         
            +
             
     | 
| 
      
 1222 
     | 
    
         
            +
            .. _select-columns-name-flags:
         
     | 
| 
      
 1223 
     | 
    
         
            +
             
     | 
| 
      
 1224 
     | 
    
         
            +
            ``columns[${NAME}].flags``
         
     | 
| 
      
 1225 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 1226 
     | 
    
         
            +
             
     | 
| 
      
 1227 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1228 
     | 
    
         
            +
             
     | 
| 
      
 1229 
     | 
    
         
            +
            Specifies flags for the dynamic column. It's the same as ``flags``
         
     | 
| 
      
 1230 
     | 
    
         
            +
            parameter for :doc:`column_create`. See :ref:`column-create-flags` for
         
     | 
| 
      
 1231 
     | 
    
         
            +
            available flags.
         
     | 
| 
      
 1232 
     | 
    
         
            +
             
     | 
| 
      
 1233 
     | 
    
         
            +
            The default value is ``COLUMN_SCALAR``.
         
     | 
| 
      
 1234 
     | 
    
         
            +
             
     | 
| 
      
 1235 
     | 
    
         
            +
            Here is a ``columns[${NAME}].flags`` example. It creates a vector
         
     | 
| 
      
 1236 
     | 
    
         
            +
            column by ``COLUMN_VECTOR`` flags. ``plugin_register
         
     | 
| 
      
 1237 
     | 
    
         
            +
            functions/vector`` is for using :doc:`/reference/functions/vector_new`
         
     | 
| 
      
 1238 
     | 
    
         
            +
            function:
         
     | 
| 
      
 1239 
     | 
    
         
            +
             
     | 
| 
      
 1240 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1241 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_flags.log
         
     | 
| 
      
 1242 
     | 
    
         
            +
            .. plugin_register functions/vector
         
     | 
| 
      
 1243 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 1244 
     | 
    
         
            +
            ..   --columns[vector].stage initial \
         
     | 
| 
      
 1245 
     | 
    
         
            +
            ..   --columns[vector].flags COLUMN_VECTOR \
         
     | 
| 
      
 1246 
     | 
    
         
            +
            ..   --columns[vector].type UInt32 \
         
     | 
| 
      
 1247 
     | 
    
         
            +
            ..   --columns[vector].value 'vector_new(1, 2, 3)' \
         
     | 
| 
      
 1248 
     | 
    
         
            +
            ..   --output_columns _id,vector
         
     | 
| 
      
 1249 
     | 
    
         
            +
             
     | 
| 
      
 1250 
     | 
    
         
            +
            .. _select-columns-name-type:
         
     | 
| 
      
 1251 
     | 
    
         
            +
             
     | 
| 
      
 1252 
     | 
    
         
            +
            ``columns[${NAME}].type``
         
     | 
| 
      
 1253 
     | 
    
         
            +
            """""""""""""""""""""""""
         
     | 
| 
      
 1254 
     | 
    
         
            +
             
     | 
| 
      
 1255 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1256 
     | 
    
         
            +
             
     | 
| 
      
 1257 
     | 
    
         
            +
            Specifies value type for the dynamic column. It's the same as ``type``
         
     | 
| 
      
 1258 
     | 
    
         
            +
            parameter for :doc:`column_create`. See :ref:`column-create-type` for
         
     | 
| 
      
 1259 
     | 
    
         
            +
            available types.
         
     | 
| 
      
 1260 
     | 
    
         
            +
             
     | 
| 
      
 1261 
     | 
    
         
            +
            This is a required parameter.
         
     | 
| 
      
 1262 
     | 
    
         
            +
             
     | 
| 
      
 1263 
     | 
    
         
            +
            Here is an example that creates a ``ShortText`` type column. Stored
         
     | 
| 
      
 1264 
     | 
    
         
            +
            value is casted to ``ShortText`` automatically. In this example,
         
     | 
| 
      
 1265 
     | 
    
         
            +
            number is casted to ``ShortText``:
         
     | 
| 
      
 1266 
     | 
    
         
            +
             
     | 
| 
      
 1267 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1268 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_type.log
         
     | 
| 
      
 1269 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 1270 
     | 
    
         
            +
            ..   --columns[n_likes_string].stage initial \
         
     | 
| 
      
 1271 
     | 
    
         
            +
            ..   --columns[n_likes_string].type ShortText \
         
     | 
| 
      
 1272 
     | 
    
         
            +
            ..   --columns[n_likes_string].value n_likes \
         
     | 
| 
      
 1273 
     | 
    
         
            +
            ..   --output_columns _id,n_likes,n_likes_string
         
     | 
| 
      
 1274 
     | 
    
         
            +
             
     | 
| 
      
 1275 
     | 
    
         
            +
            .. _select-columns-name-value:
         
     | 
| 
      
 1276 
     | 
    
         
            +
             
     | 
| 
      
 1277 
     | 
    
         
            +
            ``columns[${NAME}].value``
         
     | 
| 
      
 1278 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 1279 
     | 
    
         
            +
             
     | 
| 
      
 1280 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1281 
     | 
    
         
            +
             
     | 
| 
      
 1282 
     | 
    
         
            +
            Specifies expression that generates values for the dynamic column. The
         
     | 
| 
      
 1283 
     | 
    
         
            +
            expression uses :doc:`/reference/grn_expr/script_syntax`. It's the
         
     | 
| 
      
 1284 
     | 
    
         
            +
            same syntax in :ref:`select-filter`. For example, ``1 + 1``,
         
     | 
| 
      
 1285 
     | 
    
         
            +
            ``string_length("Hello")``, ``column * 1.08`` and so on are valid
         
     | 
| 
      
 1286 
     | 
    
         
            +
            expressions.
         
     | 
| 
      
 1287 
     | 
    
         
            +
             
     | 
| 
      
 1288 
     | 
    
         
            +
            You need to specify :doc:`/reference/window_function` as ``value``
         
     | 
| 
      
 1289 
     | 
    
         
            +
            value and other window function related parameters when you use window
         
     | 
| 
      
 1290 
     | 
    
         
            +
            function. See :ref:`select-window-function-related-parameters` for
         
     | 
| 
      
 1291 
     | 
    
         
            +
            details.
         
     | 
| 
      
 1292 
     | 
    
         
            +
             
     | 
| 
      
 1293 
     | 
    
         
            +
            This is a required parameter.
         
     | 
| 
      
 1294 
     | 
    
         
            +
             
     | 
| 
      
 1295 
     | 
    
         
            +
            Here is an example that creates a new dynamic column that stores the
         
     | 
| 
      
 1296 
     | 
    
         
            +
            number of characters of content. This example uses
         
     | 
| 
      
 1297 
     | 
    
         
            +
            :doc:`/reference/functions/string_length` function in
         
     | 
| 
      
 1298 
     | 
    
         
            +
            ``functions/string`` plugin to compute the number of characters in a
         
     | 
| 
      
 1299 
     | 
    
         
            +
            string. :doc:`plugin_register` is used to register
         
     | 
| 
      
 1300 
     | 
    
         
            +
            ``functions/string`` plugin:
         
     | 
| 
      
 1301 
     | 
    
         
            +
             
     | 
| 
      
 1302 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1303 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_value.log
         
     | 
| 
      
 1304 
     | 
    
         
            +
            .. plugin_register functions/string
         
     | 
| 
      
 1305 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 1306 
     | 
    
         
            +
            ..   --columns[content_length].stage initial \
         
     | 
| 
      
 1307 
     | 
    
         
            +
            ..   --columns[content_length].type UInt32 \
         
     | 
| 
      
 1308 
     | 
    
         
            +
            ..   --columns[content_length].value 'string_length(content)' \
         
     | 
| 
      
 1309 
     | 
    
         
            +
            ..   --output_columns _id,content,content_length
         
     | 
| 
      
 1310 
     | 
    
         
            +
             
     | 
| 
      
 1311 
     | 
    
         
            +
            .. _select-window-function-related-parameters:
         
     | 
| 
      
 1312 
     | 
    
         
            +
             
     | 
| 
      
 1313 
     | 
    
         
            +
            Window function related parameters
         
     | 
| 
      
 1314 
     | 
    
         
            +
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         
     | 
| 
      
 1315 
     | 
    
         
            +
             
     | 
| 
      
 1316 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1317 
     | 
    
         
            +
             
     | 
| 
      
 1318 
     | 
    
         
            +
            This section describes window function related parameters. You need to
         
     | 
| 
      
 1319 
     | 
    
         
            +
            use dynamic column for using window function. See
         
     | 
| 
      
 1320 
     | 
    
         
            +
            :ref:`select-dynamic-column-related-parameters` for dynamic column.
         
     | 
| 
      
 1321 
     | 
    
         
            +
             
     | 
| 
      
 1322 
     | 
    
         
            +
            Window function in Groonga is similar to window function in
         
     | 
| 
      
 1323 
     | 
    
         
            +
            SQL. Normal function computes its result with only the current
         
     | 
| 
      
 1324 
     | 
    
         
            +
            record. On the other hand, window function computes its result with
         
     | 
| 
      
 1325 
     | 
    
         
            +
            multiple records. Window function is useful to data analysis because
         
     | 
| 
      
 1326 
     | 
    
         
            +
            it can process multiple records.
         
     | 
| 
      
 1327 
     | 
    
         
            +
             
     | 
| 
      
 1328 
     | 
    
         
            +
            You can find supported window functions at
         
     | 
| 
      
 1329 
     | 
    
         
            +
            :doc:`/reference/window_function`. For example,
         
     | 
| 
      
 1330 
     | 
    
         
            +
            :doc:`/reference/window_functions/window_sum` is a window function. It
         
     | 
| 
      
 1331 
     | 
    
         
            +
            sums numbers in the target records.
         
     | 
| 
      
 1332 
     | 
    
         
            +
             
     | 
| 
      
 1333 
     | 
    
         
            +
            Window function processes records that are grouped by the specified
         
     | 
| 
      
 1334 
     | 
    
         
            +
            group keys. For example, window function processes three groups
         
     | 
| 
      
 1335 
     | 
    
         
            +
            (``Hello`` group, ``Groonga`` group and ``Senna`` group) in the
         
     | 
| 
      
 1336 
     | 
    
         
            +
            following case. :doc:`/reference/window_functions/window_sum` sums
         
     | 
| 
      
 1337 
     | 
    
         
            +
            ``n_likes`` values in each group:
         
     | 
| 
      
 1338 
     | 
    
         
            +
             
     | 
| 
      
 1339 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1340 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1341 
     | 
    
         
            +
             
     | 
| 
      
 1342 
     | 
    
         
            +
               * - Group No.
         
     | 
| 
      
 1343 
     | 
    
         
            +
                 - Group key value
         
     | 
| 
      
 1344 
     | 
    
         
            +
                 - ``n_likes`` value
         
     | 
| 
      
 1345 
     | 
    
         
            +
                 - :doc:`/reference/window_functions/window_sum` result
         
     | 
| 
      
 1346 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1347 
     | 
    
         
            +
                 - ``Hello``
         
     | 
| 
      
 1348 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1349 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1350 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 1351 
     | 
    
         
            +
                 - ``Groonga``
         
     | 
| 
      
 1352 
     | 
    
         
            +
                 - 10
         
     | 
| 
      
 1353 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 1354 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 1355 
     | 
    
         
            +
                 - ``Groonga``
         
     | 
| 
      
 1356 
     | 
    
         
            +
                 - 15
         
     | 
| 
      
 1357 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 1358 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 1359 
     | 
    
         
            +
                 - ``Senna``
         
     | 
| 
      
 1360 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 1361 
     | 
    
         
            +
                 - 6
         
     | 
| 
      
 1362 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 1363 
     | 
    
         
            +
                 - ``Senna``
         
     | 
| 
      
 1364 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 1365 
     | 
    
         
            +
                 - 6
         
     | 
| 
      
 1366 
     | 
    
         
            +
             
     | 
| 
      
 1367 
     | 
    
         
            +
            You can specify no group keys. In the case, window function processes
         
     | 
| 
      
 1368 
     | 
    
         
            +
            only one group that includes all
         
     | 
| 
      
 1369 
     | 
    
         
            +
            records. :doc:`/reference/window_functions/window_sum` sums all
         
     | 
| 
      
 1370 
     | 
    
         
            +
            ``n_likes`` values in the following case:
         
     | 
| 
      
 1371 
     | 
    
         
            +
             
     | 
| 
      
 1372 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1373 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1374 
     | 
    
         
            +
             
     | 
| 
      
 1375 
     | 
    
         
            +
               * - Group No.
         
     | 
| 
      
 1376 
     | 
    
         
            +
                 - ``n_likes`` value
         
     | 
| 
      
 1377 
     | 
    
         
            +
                 - :doc:`/reference/window_functions/window_sum` result
         
     | 
| 
      
 1378 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1379 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1380 
     | 
    
         
            +
                 - 36
         
     | 
| 
      
 1381 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1382 
     | 
    
         
            +
                 - 10
         
     | 
| 
      
 1383 
     | 
    
         
            +
                 - 36
         
     | 
| 
      
 1384 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1385 
     | 
    
         
            +
                 - 15
         
     | 
| 
      
 1386 
     | 
    
         
            +
                 - 36
         
     | 
| 
      
 1387 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1388 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 1389 
     | 
    
         
            +
                 - 36
         
     | 
| 
      
 1390 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1391 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 1392 
     | 
    
         
            +
                 - 36
         
     | 
| 
      
 1393 
     | 
    
         
            +
             
     | 
| 
      
 1394 
     | 
    
         
            +
            Window function processes records in each group in the specified
         
     | 
| 
      
 1395 
     | 
    
         
            +
            order. You can specify no sort keys like the above group keys
         
     | 
| 
      
 1396 
     | 
    
         
            +
            example.
         
     | 
| 
      
 1397 
     | 
    
         
            +
             
     | 
| 
      
 1398 
     | 
    
         
            +
            The behavior when you specify no sort keys depends on each window
         
     | 
| 
      
 1399 
     | 
    
         
            +
            function specification. For example,
         
     | 
| 
      
 1400 
     | 
    
         
            +
            :doc:`/reference/window_functions/window_sum` uses different behavior
         
     | 
| 
      
 1401 
     | 
    
         
            +
            whether sort keys are specified or not. If you specify not sort keys,
         
     | 
| 
      
 1402 
     | 
    
         
            +
            :doc:`/reference/window_functions/window_sum` sums values of all
         
     | 
| 
      
 1403 
     | 
    
         
            +
            records in the group and puts it to all target records like the above
         
     | 
| 
      
 1404 
     | 
    
         
            +
            group keys example. If you specify sort keys,
         
     | 
| 
      
 1405 
     | 
    
         
            +
            :doc:`/reference/window_functions/window_sum` behaves as cumulative
         
     | 
| 
      
 1406 
     | 
    
         
            +
            sum. :doc:`/reference/window_functions/window_sum` sums values of all
         
     | 
| 
      
 1407 
     | 
    
         
            +
            records in the group in sequence and puts the current sum to the
         
     | 
| 
      
 1408 
     | 
    
         
            +
            current record like the following:
         
     | 
| 
      
 1409 
     | 
    
         
            +
             
     | 
| 
      
 1410 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1411 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1412 
     | 
    
         
            +
             
     | 
| 
      
 1413 
     | 
    
         
            +
               * - Group No.
         
     | 
| 
      
 1414 
     | 
    
         
            +
                 - Group key value
         
     | 
| 
      
 1415 
     | 
    
         
            +
                 - Sort key value
         
     | 
| 
      
 1416 
     | 
    
         
            +
                 - ``n_likes`` value
         
     | 
| 
      
 1417 
     | 
    
         
            +
                 - :doc:`/reference/window_functions/window_sum` result
         
     | 
| 
      
 1418 
     | 
    
         
            +
                 - Note
         
     | 
| 
      
 1419 
     | 
    
         
            +
               * - 1
         
     | 
| 
      
 1420 
     | 
    
         
            +
                 - ``Hello``
         
     | 
| 
      
 1421 
     | 
    
         
            +
                 - 1
         
     | 
| 
      
 1422 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1423 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1424 
     | 
    
         
            +
                 - The first record in group No. 1. (``5 = 5``)
         
     | 
| 
      
 1425 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 1426 
     | 
    
         
            +
                 - ``Groonga``
         
     | 
| 
      
 1427 
     | 
    
         
            +
                 - 90
         
     | 
| 
      
 1428 
     | 
    
         
            +
                 - 10
         
     | 
| 
      
 1429 
     | 
    
         
            +
                 - 10
         
     | 
| 
      
 1430 
     | 
    
         
            +
                 - The first record in group No. 2. (``10 = 10``)
         
     | 
| 
      
 1431 
     | 
    
         
            +
               * - 2
         
     | 
| 
      
 1432 
     | 
    
         
            +
                 - ``Groonga``
         
     | 
| 
      
 1433 
     | 
    
         
            +
                 - 91
         
     | 
| 
      
 1434 
     | 
    
         
            +
                 - 15
         
     | 
| 
      
 1435 
     | 
    
         
            +
                 - 25
         
     | 
| 
      
 1436 
     | 
    
         
            +
                 - The second record in group No. 2. (``10 + 15 = 25``)
         
     | 
| 
      
 1437 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 1438 
     | 
    
         
            +
                 - ``Senna``
         
     | 
| 
      
 1439 
     | 
    
         
            +
                 - 200
         
     | 
| 
      
 1440 
     | 
    
         
            +
                 - 3
         
     | 
| 
      
 1441 
     | 
    
         
            +
                 - 8
         
     | 
| 
      
 1442 
     | 
    
         
            +
                 - The second record in group No. 3. (``5 + 3 = 8``)
         
     | 
| 
      
 1443 
     | 
    
         
            +
               * - 3
         
     | 
| 
      
 1444 
     | 
    
         
            +
                 - ``Senna``
         
     | 
| 
      
 1445 
     | 
    
         
            +
                 - 100
         
     | 
| 
      
 1446 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1447 
     | 
    
         
            +
                 - 5
         
     | 
| 
      
 1448 
     | 
    
         
            +
                 - The first record in group No. 3. (``5 = 5``)
         
     | 
| 
      
 1449 
     | 
    
         
            +
             
     | 
| 
      
 1450 
     | 
    
         
            +
            Here are parameters for window function. You need to specify both
         
     | 
| 
      
 1451 
     | 
    
         
            +
            window function related parameters and required dynamic columns
         
     | 
| 
      
 1452 
     | 
    
         
            +
            parameters. Because window function is implemented based on dynamic
         
     | 
| 
      
 1453 
     | 
    
         
            +
            column. See :ref:`select-dynamic-column-related-parameters` for
         
     | 
| 
      
 1454 
     | 
    
         
            +
            dynamic column related parameters:
         
     | 
| 
      
 1455 
     | 
    
         
            +
             
     | 
| 
      
 1456 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 1457 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 1458 
     | 
    
         
            +
             
     | 
| 
      
 1459 
     | 
    
         
            +
               * - Name
         
     | 
| 
      
 1460 
     | 
    
         
            +
                 - Required or optional
         
     | 
| 
      
 1461 
     | 
    
         
            +
                 - Note
         
     | 
| 
      
 1462 
     | 
    
         
            +
               * - ``columns[${NAME}].value``
         
     | 
| 
      
 1463 
     | 
    
         
            +
                 - Required
         
     | 
| 
      
 1464 
     | 
    
         
            +
                 - Use :doc:`/reference/window_function`.
         
     | 
| 
      
 1465 
     | 
    
         
            +
               * - ``columns[${NAME}].window.sort_keys``
         
     | 
| 
      
 1466 
     | 
    
         
            +
                 - Required if ``columns[${NAME}].window.group_keys`` isn't specified.
         
     | 
| 
      
 1467 
     | 
    
         
            +
                 -
         
     | 
| 
      
 1468 
     | 
    
         
            +
               * - ``columns[${NAME}].window.group_keys``
         
     | 
| 
      
 1469 
     | 
    
         
            +
                 - Required if ``columns[${NAME}].window.sort_keys`` isn't specified.
         
     | 
| 
      
 1470 
     | 
    
         
            +
                 -
         
     | 
| 
      
 1471 
     | 
    
         
            +
             
     | 
| 
      
 1472 
     | 
    
         
            +
            .. _select-columns-name-window-sort-keys:
         
     | 
| 
      
 1473 
     | 
    
         
            +
             
     | 
| 
      
 1474 
     | 
    
         
            +
            ``columns[${NAME}].window.sort_keys``
         
     | 
| 
      
 1475 
     | 
    
         
            +
            """""""""""""""""""""""""""""""""""""
         
     | 
| 
      
 1476 
     | 
    
         
            +
             
     | 
| 
      
 1477 
     | 
    
         
            +
            .. versionadded:: 6.0.6
         
     | 
| 
      
 1478 
     | 
    
         
            +
             
     | 
| 
      
 1479 
     | 
    
         
            +
            Specifies sort keys in each group. Window function processes records
         
     | 
| 
      
 1480 
     | 
    
         
            +
            in each group in the specified order.
         
     | 
| 
      
 1481 
     | 
    
         
            +
             
     | 
| 
      
 1482 
     | 
    
         
            +
            Sort keys are separated by ``,``. Each sort key is column name. It's
         
     | 
| 
      
 1483 
     | 
    
         
            +
            the same as :ref:`select-sort-keys`.
         
     | 
| 
      
 1484 
     | 
    
         
            +
             
     | 
| 
      
 1485 
     | 
    
         
            +
            You must specify :ref:`select-columns-name-window-sort-keys` or
         
     | 
| 
      
 1486 
     | 
    
         
            +
            :ref:`select-columns-name-window-group-keys` to use window function.
         
     | 
| 
      
 1487 
     | 
    
         
            +
             
     | 
| 
      
 1488 
     | 
    
         
            +
            Here is an example that computes cumulative sum per
         
     | 
| 
      
 1489 
     | 
    
         
            +
            ``Entries.tag``. Each group is sorted by ``Entries._key``:
         
     | 
| 
      
 1490 
     | 
    
         
            +
             
     | 
| 
      
 1491 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1492 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_window_sort_keys.log
         
     | 
| 
      
 1493 
     | 
    
         
            +
            .. select \
         
     | 
| 
      
 1494 
     | 
    
         
            +
            ..   --table Entries \
         
     | 
| 
      
 1495 
     | 
    
         
            +
            ..   --columns[n_likes_cumulative_sum_per_tag].stage initial \
         
     | 
| 
      
 1496 
     | 
    
         
            +
            ..   --columns[n_likes_cumulative_sum_per_tag].type UInt32 \
         
     | 
| 
      
 1497 
     | 
    
         
            +
            ..   --columns[n_likes_cumulative_sum_per_tag].value 'window_sum(n_likes)' \
         
     | 
| 
      
 1498 
     | 
    
         
            +
            ..   --columns[n_likes_cumulative_sum_per_tag].window.sort_keys _key \
         
     | 
| 
      
 1499 
     | 
    
         
            +
            ..   --columns[n_likes_cumulative_sum_per_tag].window.group_keys tag \
         
     | 
| 
      
 1500 
     | 
    
         
            +
            ..   --sort_keys _key \
         
     | 
| 
      
 1501 
     | 
    
         
            +
            ..   --output_columns tag,_key,n_likes,n_likes_cumulative_sum_per_tag
         
     | 
| 
      
 1502 
     | 
    
         
            +
             
     | 
| 
      
 1503 
     | 
    
         
            +
            .. _select-columns-name-window-group-keys:
         
     | 
| 
      
 1504 
     | 
    
         
            +
             
     | 
| 
      
 1505 
     | 
    
         
            +
            ``columns[${NAME}].window.group_keys``
         
     | 
| 
      
 1506 
     | 
    
         
            +
            """"""""""""""""""""""""""""""""""""""
         
     | 
| 
      
 1507 
     | 
    
         
            +
             
     | 
| 
      
 1508 
     | 
    
         
            +
            .. versionadded:: 7.0.0
         
     | 
| 
      
 1509 
     | 
    
         
            +
             
     | 
| 
      
 1510 
     | 
    
         
            +
            Specifies group keys. Window function processes records in each
         
     | 
| 
      
 1511 
     | 
    
         
            +
            group. If you specify no group keys, window function processes one
         
     | 
| 
      
 1512 
     | 
    
         
            +
            group that includes all records.
         
     | 
| 
      
 1513 
     | 
    
         
            +
             
     | 
| 
      
 1514 
     | 
    
         
            +
            Group keys are separated by ``,``. Each group key is column name. It's
         
     | 
| 
      
 1515 
     | 
    
         
            +
            the same as :ref:`select-drilldown`.
         
     | 
| 
      
 1516 
     | 
    
         
            +
             
     | 
| 
      
 1517 
     | 
    
         
            +
            You must specify :ref:`select-columns-name-window-sort-keys` or
         
     | 
| 
      
 1518 
     | 
    
         
            +
            :ref:`select-columns-name-window-group-keys` to use window function.
         
     | 
| 
      
 1519 
     | 
    
         
            +
             
     | 
| 
      
 1520 
     | 
    
         
            +
            Here is an example that computes sum per ``Entries.tag``:
         
     | 
| 
      
 1521 
     | 
    
         
            +
             
     | 
| 
      
 1522 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 1523 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/columns_name_window_group_keys.log
         
     | 
| 
      
 1524 
     | 
    
         
            +
            .. select \
         
     | 
| 
      
 1525 
     | 
    
         
            +
            ..   --table Entries \
         
     | 
| 
      
 1526 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].stage initial \
         
     | 
| 
      
 1527 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].type UInt32 \
         
     | 
| 
      
 1528 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].value 'window_sum(n_likes)' \
         
     | 
| 
      
 1529 
     | 
    
         
            +
            ..   --columns[n_likes_sum_per_tag].window.group_keys tag \
         
     | 
| 
      
 1530 
     | 
    
         
            +
            ..   --sort_keys _key \
         
     | 
| 
      
 1531 
     | 
    
         
            +
            ..   --output_columns tag,_key,n_likes,n_likes_sum_per_tag
         
     | 
| 
      
 1532 
     | 
    
         
            +
             
     | 
| 
       915 
1533 
     | 
    
         
             
            .. _select-drilldown-related-parameters:
         
     | 
| 
       916 
1534 
     | 
    
         | 
| 
       917 
1535 
     | 
    
         
             
            Drilldown related parameters
         
     | 
| 
         @@ -948,7 +1566,7 @@ The ``select`` command outputs the following information: 
     | 
|
| 
       948 
1566 
     | 
    
         
             
            Here is a ``drilldown`` with search condition example:
         
     | 
| 
       949 
1567 
     | 
    
         | 
| 
       950 
1568 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       951 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 1569 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldown_with_filter.log
         
     | 
| 
       952 
1570 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       953 
1571 
     | 
    
         
             
            ..   --output_columns _key,tag \
         
     | 
| 
       954 
1572 
     | 
    
         
             
            ..   --filter 'n_likes >= 5' \
         
     | 
| 
         @@ -967,7 +1585,7 @@ Here is a ``drilldown`` with multiple group keys example: 
     | 
|
| 
       967 
1585 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_multiple.log
         
     | 
| 
       968 
1586 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       969 
1587 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       970 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1588 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       971 
1589 
     | 
    
         
             
            ..   --drilldown tag,n_likes
         
     | 
| 
       972 
1590 
     | 
    
         | 
| 
       973 
1591 
     | 
    
         
             
            The ``select`` command outputs the following information:
         
     | 
| 
         @@ -1003,15 +1621,15 @@ sort key is column name. 
     | 
|
| 
       1003 
1621 
     | 
    
         
             
            You can refer the number of grouped records by ``_nsubrecs``
         
     | 
| 
       1004 
1622 
     | 
    
         
             
            :doc:`/reference/columns/pseudo`.
         
     | 
| 
       1005 
1623 
     | 
    
         | 
| 
       1006 
     | 
    
         
            -
            Here is a simple `` 
     | 
| 
      
 1624 
     | 
    
         
            +
            Here is a simple ``drilldown_sort_keys`` example:
         
     | 
| 
       1007 
1625 
     | 
    
         | 
| 
       1008 
1626 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       1009 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 1627 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldown_sort_keys_simple.log
         
     | 
| 
       1010 
1628 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1011 
1629 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1012 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1630 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1013 
1631 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1014 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1632 
     | 
    
         
            +
            ..   --drilldown_sort_keys '-_nsubrecs, _key'
         
     | 
| 
       1015 
1633 
     | 
    
         | 
| 
       1016 
1634 
     | 
    
         
             
            Drilldown result is sorted by the number of grouped records (=
         
     | 
| 
       1017 
1635 
     | 
    
         
             
            ``_nsubrecs`` ) in descending order. If there are grouped results that
         
     | 
| 
         @@ -1021,12 +1639,12 @@ are sorted by grouped key (= ``_key`` ) in ascending order. 
     | 
|
| 
       1021 
1639 
     | 
    
         
             
            The sort keys are used in all group keys specified in ``drilldown``:
         
     | 
| 
       1022 
1640 
     | 
    
         | 
| 
       1023 
1641 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       1024 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 1642 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldown_sort_keys_simple.log
         
     | 
| 
       1025 
1643 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1026 
1644 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1027 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1645 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1028 
1646 
     | 
    
         
             
            ..   --drilldown 'tag, n_likes' \
         
     | 
| 
       1029 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1647 
     | 
    
         
            +
            ..   --drilldown_sort_keys '-_nsubrecs, _key'
         
     | 
| 
       1030 
1648 
     | 
    
         | 
| 
       1031 
1649 
     | 
    
         
             
            The same sort keys are used in ``tag`` drilldown and ``n_likes``
         
     | 
| 
       1032 
1650 
     | 
    
         
             
            drilldown.
         
     | 
| 
         @@ -1047,7 +1665,7 @@ Here is a ``drilldown_output_columns`` example: 
     | 
|
| 
       1047 
1665 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_output_columns_simple.log
         
     | 
| 
       1048 
1666 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1049 
1667 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1050 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1668 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1051 
1669 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1052 
1670 
     | 
    
         
             
            ..   --drilldown_output_columns _key
         
     | 
| 
       1053 
1671 
     | 
    
         | 
| 
         @@ -1092,7 +1710,7 @@ You can refer ``Tags.label`` by ``label`` in 
     | 
|
| 
       1092 
1710 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_output_columns_referenced_type_column_label.log
         
     | 
| 
       1093 
1711 
     | 
    
         
             
            .. select Items \
         
     | 
| 
       1094 
1712 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1095 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1713 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1096 
1714 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1097 
1715 
     | 
    
         
             
            ..   --drilldown_output_columns '_key, label'
         
     | 
| 
       1098 
1716 
     | 
    
         | 
| 
         @@ -1102,7 +1720,7 @@ You can use ``*`` to refer all columns in referenced table (= ``Tags``): 
     | 
|
| 
       1102 
1720 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_output_columns_referenced_type_column_asterisk.log
         
     | 
| 
       1103 
1721 
     | 
    
         
             
            .. select Items \
         
     | 
| 
       1104 
1722 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1105 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1723 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1106 
1724 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1107 
1725 
     | 
    
         
             
            ..   --drilldown_output_columns '_key, *'
         
     | 
| 
       1108 
1726 
     | 
    
         | 
| 
         @@ -1132,9 +1750,9 @@ Here is a ``drilldown_offset`` example: 
     | 
|
| 
       1132 
1750 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_offset_simple.log
         
     | 
| 
       1133 
1751 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1134 
1752 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1135 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1753 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1136 
1754 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1137 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1755 
     | 
    
         
            +
            ..   --drilldown_sort_keys _key \
         
     | 
| 
       1138 
1756 
     | 
    
         
             
            ..   --drilldown_offset 1
         
     | 
| 
       1139 
1757 
     | 
    
         | 
| 
       1140 
1758 
     | 
    
         
             
            The ``select`` command outputs from the 2nd record.
         
     | 
| 
         @@ -1149,9 +1767,9 @@ grouped result to the 3rd grouped result. 
     | 
|
| 
       1149 
1767 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_offset_negative.log
         
     | 
| 
       1150 
1768 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1151 
1769 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1152 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1770 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1153 
1771 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1154 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1772 
     | 
    
         
            +
            ..   --drilldown_sort_keys _key \
         
     | 
| 
       1155 
1773 
     | 
    
         
             
            ..   --drilldown_offset -2
         
     | 
| 
       1156 
1774 
     | 
    
         | 
| 
       1157 
1775 
     | 
    
         
             
            The ``select`` command outputs from the 2nd grouped result because the
         
     | 
| 
         @@ -1173,9 +1791,9 @@ Here is a ``drilldown_limit`` example: 
     | 
|
| 
       1173 
1791 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_limit_simple.log
         
     | 
| 
       1174 
1792 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1175 
1793 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1176 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1794 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1177 
1795 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1178 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1796 
     | 
    
         
            +
            ..   --drilldown_sort_keys _key \
         
     | 
| 
       1179 
1797 
     | 
    
         
             
            ..   --drilldown_offset 1 \
         
     | 
| 
       1180 
1798 
     | 
    
         
             
            ..   --drilldown_limit 2
         
     | 
| 
       1181 
1799 
     | 
    
         | 
| 
         @@ -1191,9 +1809,9 @@ Here is a negative ``drilldown_limit`` value example. 
     | 
|
| 
       1191 
1809 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_limit_negative.log
         
     | 
| 
       1192 
1810 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1193 
1811 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1194 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1812 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1195 
1813 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1196 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1814 
     | 
    
         
            +
            ..   --drilldown_sort_keys _key \
         
     | 
| 
       1197 
1815 
     | 
    
         
             
            ..   --drilldown_limit -1
         
     | 
| 
       1198 
1816 
     | 
    
         | 
| 
       1199 
1817 
     | 
    
         
             
            The ``select`` command outputs all groups.
         
     | 
| 
         @@ -1259,7 +1877,7 @@ Here is a ``MAX`` example: 
     | 
|
| 
       1259 
1877 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_calc_types_max.log
         
     | 
| 
       1260 
1878 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1261 
1879 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1262 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1880 
     | 
    
         
            +
            ..   --output_columns _id,n_likes \
         
     | 
| 
       1263 
1881 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1264 
1882 
     | 
    
         
             
            ..   --drilldown_calc_types MAX \
         
     | 
| 
       1265 
1883 
     | 
    
         
             
            ..   --drilldown_calc_target n_likes \
         
     | 
| 
         @@ -1277,7 +1895,7 @@ Here is a ``MIN`` example: 
     | 
|
| 
       1277 
1895 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_calc_types_min.log
         
     | 
| 
       1278 
1896 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1279 
1897 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1280 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1898 
     | 
    
         
            +
            ..   --output_columns _id,n_likes \
         
     | 
| 
       1281 
1899 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1282 
1900 
     | 
    
         
             
            ..   --drilldown_calc_types MIN \
         
     | 
| 
       1283 
1901 
     | 
    
         
             
            ..   --drilldown_calc_target n_likes \
         
     | 
| 
         @@ -1295,7 +1913,7 @@ Here is a ``SUM`` example: 
     | 
|
| 
       1295 
1913 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_calc_types_sum.log
         
     | 
| 
       1296 
1914 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1297 
1915 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1298 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1916 
     | 
    
         
            +
            ..   --output_columns _id,n_likes \
         
     | 
| 
       1299 
1917 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1300 
1918 
     | 
    
         
             
            ..   --drilldown_calc_types SUM \
         
     | 
| 
       1301 
1919 
     | 
    
         
             
            ..   --drilldown_calc_target n_likes \
         
     | 
| 
         @@ -1313,7 +1931,7 @@ Here is a ``AVG`` example: 
     | 
|
| 
       1313 
1931 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_calc_types_avg.log
         
     | 
| 
       1314 
1932 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1315 
1933 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1316 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1934 
     | 
    
         
            +
            ..   --output_columns _id,n_likes \
         
     | 
| 
       1317 
1935 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1318 
1936 
     | 
    
         
             
            ..   --drilldown_calc_types AVG \
         
     | 
| 
       1319 
1937 
     | 
    
         
             
            ..   --drilldown_calc_target n_likes \
         
     | 
| 
         @@ -1331,7 +1949,7 @@ Here is an example that uses all calculation types: 
     | 
|
| 
       1331 
1949 
     | 
    
         
             
            .. include:: ../../example/reference/commands/select/drilldown_calc_types_all.log
         
     | 
| 
       1332 
1950 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1333 
1951 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1334 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 1952 
     | 
    
         
            +
            ..   --output_columns _id,n_likes \
         
     | 
| 
       1335 
1953 
     | 
    
         
             
            ..   --drilldown tag \
         
     | 
| 
       1336 
1954 
     | 
    
         
             
            ..   --drilldown_calc_types MAX,MIN,SUM,AVG \
         
     | 
| 
       1337 
1955 
     | 
    
         
             
            ..   --drilldown_calc_target n_likes \
         
     | 
| 
         @@ -1352,6 +1970,8 @@ that only ``COUNT`` is enabled. Because ``NONE`` is just ignored and 
     | 
|
| 
       1352 
1970 
     | 
    
         
             
            ``drilldown_calc_target``
         
     | 
| 
       1353 
1971 
     | 
    
         
             
            """""""""""""""""""""""""
         
     | 
| 
       1354 
1972 
     | 
    
         | 
| 
      
 1973 
     | 
    
         
            +
            .. versionadded:: 6.0.3
         
     | 
| 
      
 1974 
     | 
    
         
            +
             
     | 
| 
       1355 
1975 
     | 
    
         
             
            Specifies the target column for :ref:`select-drilldown-calc-types`.
         
     | 
| 
       1356 
1976 
     | 
    
         | 
| 
       1357 
1977 
     | 
    
         
             
            If you specify a calculation type that needs a target column such as
         
     | 
| 
         @@ -1372,11 +1992,36 @@ See :ref:`select-drilldown-calc-types` to know how to use 
     | 
|
| 
       1372 
1992 
     | 
    
         
             
            The default value of ``drilldown_calc_target`` is ``null``. It means
         
     | 
| 
       1373 
1993 
     | 
    
         
             
            that no calculation target column is specified.
         
     | 
| 
       1374 
1994 
     | 
    
         | 
| 
      
 1995 
     | 
    
         
            +
            .. _select-drilldown-filter:
         
     | 
| 
      
 1996 
     | 
    
         
            +
             
     | 
| 
      
 1997 
     | 
    
         
            +
            ``drilldown_filter``
         
     | 
| 
      
 1998 
     | 
    
         
            +
            """"""""""""""""""""
         
     | 
| 
      
 1999 
     | 
    
         
            +
             
     | 
| 
      
 2000 
     | 
    
         
            +
            .. versionadded:: 6.0.3
         
     | 
| 
      
 2001 
     | 
    
         
            +
             
     | 
| 
      
 2002 
     | 
    
         
            +
            Specifies the filter condition against the drilled down result.
         
     | 
| 
      
 2003 
     | 
    
         
            +
             
     | 
| 
      
 2004 
     | 
    
         
            +
            The syntax is :doc:`/reference/grn_expr/script_syntax`. It's the same
         
     | 
| 
      
 2005 
     | 
    
         
            +
            as :ref:`select-filter`.
         
     | 
| 
      
 2006 
     | 
    
         
            +
             
     | 
| 
      
 2007 
     | 
    
         
            +
            Here is an example to suppress tags that are occurred only once:
         
     | 
| 
      
 2008 
     | 
    
         
            +
             
     | 
| 
      
 2009 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 2010 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldown_filter.log
         
     | 
| 
      
 2011 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 2012 
     | 
    
         
            +
            ..   --limit -1 \
         
     | 
| 
      
 2013 
     | 
    
         
            +
            ..   --output_columns _id,tag \
         
     | 
| 
      
 2014 
     | 
    
         
            +
            ..   --drilldown tag \
         
     | 
| 
      
 2015 
     | 
    
         
            +
            ..   --drilldown_filter '_nsubrecs > 1' \
         
     | 
| 
      
 2016 
     | 
    
         
            +
            ..   --drilldown_output_columns _key,_nsubrecs
         
     | 
| 
      
 2017 
     | 
    
         
            +
             
     | 
| 
       1375 
2018 
     | 
    
         
             
            .. _select-advanced-drilldown-related-parameters:
         
     | 
| 
       1376 
2019 
     | 
    
         | 
| 
       1377 
2020 
     | 
    
         
             
            Advanced drilldown related parameters
         
     | 
| 
       1378 
2021 
     | 
    
         
             
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         
     | 
| 
       1379 
2022 
     | 
    
         | 
| 
      
 2023 
     | 
    
         
            +
            .. versionadded:: 4.0.8
         
     | 
| 
      
 2024 
     | 
    
         
            +
             
     | 
| 
       1380 
2025 
     | 
    
         
             
            You can get multiple drilldown results by specifying multiple group
         
     | 
| 
       1381 
2026 
     | 
    
         
             
            keys by :ref:`select-drilldown`. But you need to use the same
         
     | 
| 
       1382 
2027 
     | 
    
         
             
            configuration for all drilldowns. For example,
         
     | 
| 
         @@ -1386,12 +2031,19 @@ You can use a configuration for each drilldown by the following 
     | 
|
| 
       1386 
2031 
     | 
    
         
             
            parameters:
         
     | 
| 
       1387 
2032 
     | 
    
         | 
| 
       1388 
2033 
     | 
    
         
             
              * ``drilldowns[${LABEL}].keys``
         
     | 
| 
       1389 
     | 
    
         
            -
              * ``drilldowns[${LABEL}]. 
     | 
| 
      
 2034 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].sort_keys``
         
     | 
| 
       1390 
2035 
     | 
    
         
             
              * ``drilldowns[${LABEL}].output_columns``
         
     | 
| 
       1391 
2036 
     | 
    
         
             
              * ``drilldowns[${LABEL}].offset``
         
     | 
| 
       1392 
2037 
     | 
    
         
             
              * ``drilldowns[${LABEL}].limit``
         
     | 
| 
       1393 
2038 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_types``
         
     | 
| 
       1394 
2039 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_target``
         
     | 
| 
      
 2040 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].filter``
         
     | 
| 
      
 2041 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].stage=null``
         
     | 
| 
      
 2042 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].flags=COLUMN_SCALAR``
         
     | 
| 
      
 2043 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].type=null``
         
     | 
| 
      
 2044 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].value=null``
         
     | 
| 
      
 2045 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.sort_keys=null``
         
     | 
| 
      
 2046 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.group_keys=null``
         
     | 
| 
       1395 
2047 
     | 
    
         | 
| 
       1396 
2048 
     | 
    
         
             
            ``${LABEL}`` is a variable. You can use the following characters for
         
     | 
| 
       1397 
2049 
     | 
    
         
             
            ``${LABEL}``:
         
     | 
| 
         @@ -1401,6 +2053,13 @@ parameters: 
     | 
|
| 
       1401 
2053 
     | 
    
         
             
              * ``.``
         
     | 
| 
       1402 
2054 
     | 
    
         
             
              * ``_``
         
     | 
| 
       1403 
2055 
     | 
    
         | 
| 
      
 2056 
     | 
    
         
            +
            ``${NAME}`` is a variable. You can use the following characters for
         
     | 
| 
      
 2057 
     | 
    
         
            +
            ``${NAME}``:
         
     | 
| 
      
 2058 
     | 
    
         
            +
             
     | 
| 
      
 2059 
     | 
    
         
            +
              * Alphabets
         
     | 
| 
      
 2060 
     | 
    
         
            +
              * Digits
         
     | 
| 
      
 2061 
     | 
    
         
            +
              * ``_``
         
     | 
| 
      
 2062 
     | 
    
         
            +
             
     | 
| 
       1404 
2063 
     | 
    
         
             
            .. note::
         
     | 
| 
       1405 
2064 
     | 
    
         | 
| 
       1406 
2065 
     | 
    
         
             
               You can use more characters but it's better that you use only these
         
     | 
| 
         @@ -1429,24 +2088,42 @@ In ``label2`` group, ``tag`` is used for group key and 
     | 
|
| 
       1429 
2088 
     | 
    
         
             
            See document for corresponding ``drilldown_XXX`` parameter to know how
         
     | 
| 
       1430 
2089 
     | 
    
         
             
            to use it for the following parameters:
         
     | 
| 
       1431 
2090 
     | 
    
         | 
| 
       1432 
     | 
    
         
            -
              * ``drilldowns[${LABEL}]. 
     | 
| 
      
 2091 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].sort_keys``: :ref:`select-drilldown-sort-keys`
         
     | 
| 
       1433 
2092 
     | 
    
         
             
              * ``drilldowns[${LABEL}].offset``: :ref:`select-drilldown-offset`
         
     | 
| 
       1434 
2093 
     | 
    
         
             
              * ``drilldowns[${LABEL}].limit``: :ref:`select-drilldown-limit`
         
     | 
| 
       1435 
2094 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_types``: :ref:`select-drilldown-calc-types`
         
     | 
| 
       1436 
2095 
     | 
    
         
             
              * ``drilldowns[${LABEL}].calc_target``: :ref:`select-drilldown-calc-target`
         
     | 
| 
      
 2096 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].filter``: :ref:`select-drilldown-filter`
         
     | 
| 
      
 2097 
     | 
    
         
            +
             
     | 
| 
      
 2098 
     | 
    
         
            +
            See document for corresponding ``columns[${NAME}].XXX`` parameter to
         
     | 
| 
      
 2099 
     | 
    
         
            +
            know how to use it for the following parameters:
         
     | 
| 
      
 2100 
     | 
    
         
            +
             
     | 
| 
      
 2101 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].flags=COLUMN_SCALAR``:
         
     | 
| 
      
 2102 
     | 
    
         
            +
                :ref:`select-columns-name-flags`
         
     | 
| 
      
 2103 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].type=null``:
         
     | 
| 
      
 2104 
     | 
    
         
            +
                :ref:`select-columns-name-type`
         
     | 
| 
      
 2105 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].value=null``:
         
     | 
| 
      
 2106 
     | 
    
         
            +
                :ref:`select-columns-name-value`
         
     | 
| 
      
 2107 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.sort_keys=null``:
         
     | 
| 
      
 2108 
     | 
    
         
            +
                :ref:`select-columns-name-window-sort-keys`
         
     | 
| 
      
 2109 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].window.group_keys=null``:
         
     | 
| 
      
 2110 
     | 
    
         
            +
                :ref:`select-columns-name-window-group-keys`
         
     | 
| 
       1437 
2111 
     | 
    
         | 
| 
       1438 
2112 
     | 
    
         
             
            The following parameters are needed more description:
         
     | 
| 
       1439 
2113 
     | 
    
         | 
| 
       1440 
2114 
     | 
    
         
             
              * ``drilldowns[${LABEL}].keys``
         
     | 
| 
       1441 
2115 
     | 
    
         
             
              * ``drilldowns[${LABEL}].output_columns``
         
     | 
| 
      
 2116 
     | 
    
         
            +
              * ``drilldowns[${LABEL}].columns[${NAME}].stage=null``
         
     | 
| 
       1442 
2117 
     | 
    
         | 
| 
       1443 
2118 
     | 
    
         
             
            Output format is different a bit. It's also needed more description.
         
     | 
| 
       1444 
2119 
     | 
    
         | 
| 
       1445 
     | 
    
         
            -
            .. _select- 
     | 
| 
      
 2120 
     | 
    
         
            +
            .. _select-drilldowns-label-keys:
         
     | 
| 
       1446 
2121 
     | 
    
         | 
| 
       1447 
2122 
     | 
    
         
             
            ``drilldowns[${LABEL}].keys``
         
     | 
| 
       1448 
2123 
     | 
    
         
             
            """""""""""""""""""""""""""""
         
     | 
| 
       1449 
2124 
     | 
    
         | 
| 
      
 2125 
     | 
    
         
            +
            .. versionadded:: 4.0.8
         
     | 
| 
      
 2126 
     | 
    
         
            +
             
     | 
| 
       1450 
2127 
     | 
    
         
             
            :ref:`select-drilldown` can specify multiple keys for multiple
         
     | 
| 
       1451 
2128 
     | 
    
         
             
            drilldowns. But it can't specify multiple keys for one drilldown.
         
     | 
| 
       1452 
2129 
     | 
    
         | 
| 
         @@ -1459,16 +2136,16 @@ Here is an example to group by multiple keys, ``tag`` and ``n_likes`` 
     | 
|
| 
       1459 
2136 
     | 
    
         
             
            column values:
         
     | 
| 
       1460 
2137 
     | 
    
         | 
| 
       1461 
2138 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       1462 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 2139 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldowns_label_keys_multiple.log
         
     | 
| 
       1463 
2140 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1464 
2141 
     | 
    
         
             
            ..   --limit -1 \
         
     | 
| 
       1465 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 2142 
     | 
    
         
            +
            ..   --output_columns tag,n_likes \
         
     | 
| 
       1466 
2143 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].keys tag,n_likes \
         
     | 
| 
       1467 
2144 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].output_columns _value.tag,_value.n_likes,_nsubrecs
         
     | 
| 
       1468 
2145 
     | 
    
         | 
| 
       1469 
2146 
     | 
    
         
             
            ``tag.n_likes`` is used as the label for the drilldown parameters
         
     | 
| 
       1470 
2147 
     | 
    
         
             
            group. You can refer grouped keys by ``_value.${KEY_NAME}`` syntax in
         
     | 
| 
       1471 
     | 
    
         
            -
            :ref:`select- 
     | 
| 
      
 2148 
     | 
    
         
            +
            :ref:`select-drilldowns-label-output-columns`. ``${KEY_NAME}`` is a
         
     | 
| 
       1472 
2149 
     | 
    
         
             
            column name to be used by group key. ``tag`` and ``n_likes`` are
         
     | 
| 
       1473 
2150 
     | 
    
         
             
            ``${KEY_NAME}`` in this case.
         
     | 
| 
       1474 
2151 
     | 
    
         | 
| 
         @@ -1477,11 +2154,13 @@ specify one key as ``drilldowns[${LABEL}].keys`` like ``--drilldowns[tag].keys 
     | 
|
| 
       1477 
2154 
     | 
    
         
             
            tag``. You should use ``_key`` for the case. It's the same rule in
         
     | 
| 
       1478 
2155 
     | 
    
         
             
            :ref:`select-drilldown-output-columns`.
         
     | 
| 
       1479 
2156 
     | 
    
         | 
| 
       1480 
     | 
    
         
            -
            .. _select- 
     | 
| 
      
 2157 
     | 
    
         
            +
            .. _select-drilldowns-label-output-columns:
         
     | 
| 
       1481 
2158 
     | 
    
         | 
| 
       1482 
2159 
     | 
    
         
             
            ``drilldowns[${LABEL}].output_columns``
         
     | 
| 
       1483 
2160 
     | 
    
         
             
            """""""""""""""""""""""""""""""""""""""
         
     | 
| 
       1484 
2161 
     | 
    
         | 
| 
      
 2162 
     | 
    
         
            +
            .. versionadded:: 4.0.8
         
     | 
| 
      
 2163 
     | 
    
         
            +
             
     | 
| 
       1485 
2164 
     | 
    
         
             
            It's almost same as :ref:`select-drilldown-output-columns`. The
         
     | 
| 
       1486 
2165 
     | 
    
         
             
            difference between :ref:`select-drilldown-output-columns` and
         
     | 
| 
       1487 
2166 
     | 
    
         
             
            ``drilldowns[${LABEL}].output_columns`` is how to refer group keys.
         
     | 
| 
         @@ -1490,16 +2169,16 @@ difference between :ref:`select-drilldown-output-columns` and 
     | 
|
| 
       1490 
2169 
     | 
    
         
             
            :doc:`/reference/columns/pseudo` to refer group
         
     | 
| 
       1491 
2170 
     | 
    
         
             
            key. ``drilldowns[${LABEL}].output_columns`` also uses ``_key``
         
     | 
| 
       1492 
2171 
     | 
    
         
             
            :doc:`/reference/columns/pseudo` to refer group key when you specify
         
     | 
| 
       1493 
     | 
    
         
            -
            only one group key by :ref:`select- 
     | 
| 
      
 2172 
     | 
    
         
            +
            only one group key by :ref:`select-drilldowns-label-keys`.
         
     | 
| 
       1494 
2173 
     | 
    
         | 
| 
       1495 
2174 
     | 
    
         
             
            Here is an example to refer single group key by ``_key``
         
     | 
| 
       1496 
2175 
     | 
    
         
             
            :doc:`/reference/columns/pseudo`:
         
     | 
| 
       1497 
2176 
     | 
    
         | 
| 
       1498 
2177 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       1499 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 2178 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldowns_label_output_columns_single_group_key.log
         
     | 
| 
       1500 
2179 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1501 
2180 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1502 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 2181 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1503 
2182 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].keys tag \
         
     | 
| 
       1504 
2183 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].output_columns _key
         
     | 
| 
       1505 
2184 
     | 
    
         | 
| 
         @@ -1507,16 +2186,16 @@ But you can't refer each group key by ``_key`` 
     | 
|
| 
       1507 
2186 
     | 
    
         
             
            :doc:`/reference/columns/pseudo` in
         
     | 
| 
       1508 
2187 
     | 
    
         
             
            ``drilldowns[${LABEL}].output_columns``. You need to use
         
     | 
| 
       1509 
2188 
     | 
    
         
             
            ``_value.${KEY_NAME}`` syntax. ``${KEY_NAME}`` is a column name that is
         
     | 
| 
       1510 
     | 
    
         
            -
            used for group key in :ref:`select- 
     | 
| 
      
 2189 
     | 
    
         
            +
            used for group key in :ref:`select-drilldowns-label-keys`.
         
     | 
| 
       1511 
2190 
     | 
    
         | 
| 
       1512 
2191 
     | 
    
         
             
            Here is an example to refer each group key in multiple group keys by
         
     | 
| 
       1513 
2192 
     | 
    
         
             
            ``_value.${KEY_NAME}`` syntax:
         
     | 
| 
       1514 
2193 
     | 
    
         | 
| 
       1515 
2194 
     | 
    
         
             
            .. groonga-command
         
     | 
| 
       1516 
     | 
    
         
            -
            .. include:: ../../example/reference/commands/select/ 
     | 
| 
      
 2195 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldowns_label_output_columns_single_group_key.log
         
     | 
| 
       1517 
2196 
     | 
    
         
             
            .. select Entries \
         
     | 
| 
       1518 
2197 
     | 
    
         
             
            ..   --limit 0 \
         
     | 
| 
       1519 
     | 
    
         
            -
            ..   -- 
     | 
| 
      
 2198 
     | 
    
         
            +
            ..   --output_columns _id \
         
     | 
| 
       1520 
2199 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].keys tag,n_likes \
         
     | 
| 
       1521 
2200 
     | 
    
         
             
            ..   --drilldowns[tag.n_likes].output_columns _value.tag,_value.n_likes
         
     | 
| 
       1522 
2201 
     | 
    
         | 
| 
         @@ -1530,23 +2209,82 @@ Here is an example to refer each group key in multiple group keys by 
     | 
|
| 
       1530 
2209 
     | 
    
         | 
| 
       1531 
2210 
     | 
    
         
             
               There is one grouped record in ``_value`` to refer each grouped
         
     | 
| 
       1532 
2211 
     | 
    
         
             
               values when you specify multiple group keys to
         
     | 
| 
       1533 
     | 
    
         
            -
               :ref:`select- 
     | 
| 
      
 2212 
     | 
    
         
            +
               :ref:`select-drilldowns-label-keys`. So you can refer each group key
         
     | 
| 
       1534 
2213 
     | 
    
         
             
               by ``_value.${KEY_NAME}`` syntax.
         
     | 
| 
       1535 
2214 
     | 
    
         | 
| 
       1536 
2215 
     | 
    
         
             
               On the other hand, there is no grouped record in ``_value`` when
         
     | 
| 
       1537 
2216 
     | 
    
         
             
               you specify only one group key to
         
     | 
| 
       1538 
     | 
    
         
            -
               :ref:`select- 
     | 
| 
      
 2217 
     | 
    
         
            +
               :ref:`select-drilldowns-label-keys`. So you can't refer group key by
         
     | 
| 
       1539 
2218 
     | 
    
         
             
               ``_value.${KEY_NAME}`` syntax.
         
     | 
| 
       1540 
2219 
     | 
    
         | 
| 
       1541 
     | 
    
         
            -
            .. _select- 
     | 
| 
      
 2220 
     | 
    
         
            +
            .. _select-drilldowns-label-columns-name-stage:
         
     | 
| 
      
 2221 
     | 
    
         
            +
             
     | 
| 
      
 2222 
     | 
    
         
            +
            ``drilldowns[${LABEL}].columns[${NAME}].stage``
         
     | 
| 
      
 2223 
     | 
    
         
            +
            """""""""""""""""""""""""""""""""""""""""""""""
         
     | 
| 
      
 2224 
     | 
    
         
            +
             
     | 
| 
      
 2225 
     | 
    
         
            +
            .. versionadded:: 6.0.5
         
     | 
| 
      
 2226 
     | 
    
         
            +
             
     | 
| 
      
 2227 
     | 
    
         
            +
            Specifies when the dynamic column is created. This is a required
         
     | 
| 
      
 2228 
     | 
    
         
            +
            parameter to create a dynamic column.
         
     | 
| 
      
 2229 
     | 
    
         
            +
             
     | 
| 
      
 2230 
     | 
    
         
            +
            Here are available stages:
         
     | 
| 
      
 2231 
     | 
    
         
            +
             
     | 
| 
      
 2232 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 2233 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 2234 
     | 
    
         
            +
             
     | 
| 
      
 2235 
     | 
    
         
            +
               * - Name
         
     | 
| 
      
 2236 
     | 
    
         
            +
                 - Description
         
     | 
| 
      
 2237 
     | 
    
         
            +
               * - ``initial``
         
     | 
| 
      
 2238 
     | 
    
         
            +
                 - Dynamic column is created at first.
         
     | 
| 
      
 2239 
     | 
    
         
            +
             
     | 
| 
      
 2240 
     | 
    
         
            +
            Here is one drilldown process flow with dynamic column creation
         
     | 
| 
      
 2241 
     | 
    
         
            +
            points. You should choose stage as late as possible:
         
     | 
| 
      
 2242 
     | 
    
         
            +
             
     | 
| 
      
 2243 
     | 
    
         
            +
              #. Evaluates :ref:`select-drilldowns-label-keys`,
         
     | 
| 
      
 2244 
     | 
    
         
            +
                 ``drilldowns[${LABEL}].calc_types`` and
         
     | 
| 
      
 2245 
     | 
    
         
            +
                 ``drilldowns[${LABEL}].calc_target``.
         
     | 
| 
      
 2246 
     | 
    
         
            +
             
     | 
| 
      
 2247 
     | 
    
         
            +
              #. Creates dynamic columns for ``initial`` stage. All drilldown
         
     | 
| 
      
 2248 
     | 
    
         
            +
                 result records have these dynamic columns.
         
     | 
| 
      
 2249 
     | 
    
         
            +
             
     | 
| 
      
 2250 
     | 
    
         
            +
              #. Evaluates ``drilldowns[${LABEL}].filter``. You can use dynamic
         
     | 
| 
      
 2251 
     | 
    
         
            +
                 columns created in ``initial`` stage.
         
     | 
| 
      
 2252 
     | 
    
         
            +
             
     | 
| 
      
 2253 
     | 
    
         
            +
              #. Evaluates ``drilldowns[${LABEL}].sort_keys``,
         
     | 
| 
      
 2254 
     | 
    
         
            +
                 ``drilldowns[${LABEL}].offset`` and
         
     | 
| 
      
 2255 
     | 
    
         
            +
                 ``drilldowns[${LABEL}].limit``. You can use dynamic columns
         
     | 
| 
      
 2256 
     | 
    
         
            +
                 created in ``initial`` stage.
         
     | 
| 
      
 2257 
     | 
    
         
            +
             
     | 
| 
      
 2258 
     | 
    
         
            +
              #. Evaluates :ref:`select-drilldowns-label-output-columns`. You can
         
     | 
| 
      
 2259 
     | 
    
         
            +
                 use dynamic columns created in ``initial`` stage.
         
     | 
| 
      
 2260 
     | 
    
         
            +
             
     | 
| 
      
 2261 
     | 
    
         
            +
            Here is a ``drilldowns[${LABEL}].columns[${NAME}].stage`` example. It
         
     | 
| 
      
 2262 
     | 
    
         
            +
            creates ``is_popular`` column at ``initial`` stage. You can use
         
     | 
| 
      
 2263 
     | 
    
         
            +
            ``is_popular`` in all parameters such as
         
     | 
| 
      
 2264 
     | 
    
         
            +
            ``drilldowns[${LABEL}].filter`` and
         
     | 
| 
      
 2265 
     | 
    
         
            +
            ``drilldowns[${LABEL}].output_columns``:
         
     | 
| 
      
 2266 
     | 
    
         
            +
             
     | 
| 
      
 2267 
     | 
    
         
            +
            .. groonga-command
         
     | 
| 
      
 2268 
     | 
    
         
            +
            .. include:: ../../example/reference/commands/select/drilldowns_label_columns_name_stage.log
         
     | 
| 
      
 2269 
     | 
    
         
            +
            .. select Entries \
         
     | 
| 
      
 2270 
     | 
    
         
            +
            ..   --drilldowns[tag].keys tag \
         
     | 
| 
      
 2271 
     | 
    
         
            +
            ..   --drilldowns[tag].columns[is_popular].stage initial \
         
     | 
| 
      
 2272 
     | 
    
         
            +
            ..   --drilldowns[tag].columns[is_popular].type Bool \
         
     | 
| 
      
 2273 
     | 
    
         
            +
            ..   --drilldowns[tag].columns[is_popular].value '_nsubrecs > 1' \
         
     | 
| 
      
 2274 
     | 
    
         
            +
            ..   --drilldowns[tag].filter is_popular \
         
     | 
| 
      
 2275 
     | 
    
         
            +
            ..   --drilldowns[tag].output_columns _key,is_popular,_nsubrecs
         
     | 
| 
      
 2276 
     | 
    
         
            +
             
     | 
| 
      
 2277 
     | 
    
         
            +
            .. versionadded:: 4.0.8
         
     | 
| 
      
 2278 
     | 
    
         
            +
             
     | 
| 
      
 2279 
     | 
    
         
            +
            .. _select-drilldowns-label-output-format:
         
     | 
| 
       1542 
2280 
     | 
    
         | 
| 
       1543 
2281 
     | 
    
         
             
            Output format for ``drilldowns[${LABEL}]`` style
         
     | 
| 
       1544 
2282 
     | 
    
         
             
            """"""""""""""""""""""""""""""""""""""""""""""""
         
     | 
| 
       1545 
2283 
     | 
    
         | 
| 
       1546 
2284 
     | 
    
         
             
            There is a difference in output format between :ref:`select-drilldown`
         
     | 
| 
       1547 
     | 
    
         
            -
            and :ref:`select- 
     | 
| 
      
 2285 
     | 
    
         
            +
            and :ref:`select-drilldowns-label-keys`. :ref:`select-drilldown` uses
         
     | 
| 
       1548 
2286 
     | 
    
         
             
            array to output multiple drilldown results.
         
     | 
| 
       1549 
     | 
    
         
            -
            :ref:`select- 
     | 
| 
      
 2287 
     | 
    
         
            +
            :ref:`select-drilldowns-label-keys` uses pairs of label and drilldown
         
     | 
| 
       1550 
2288 
     | 
    
         
             
            result.
         
     | 
| 
       1551 
2289 
     | 
    
         | 
| 
       1552 
2290 
     | 
    
         
             
            :ref:`select-drilldown` uses the following output format::
         
     | 
| 
         @@ -1561,7 +2299,7 @@ result. 
     | 
|
| 
       1561 
2299 
     | 
    
         
             
                ]
         
     | 
| 
       1562 
2300 
     | 
    
         
             
              ]
         
     | 
| 
       1563 
2301 
     | 
    
         | 
| 
       1564 
     | 
    
         
            -
            :ref:`select- 
     | 
| 
      
 2302 
     | 
    
         
            +
            :ref:`select-drilldowns-label-keys` uses the following output format::
         
     | 
| 
       1565 
2303 
     | 
    
         | 
| 
       1566 
2304 
     | 
    
         
             
              [
         
     | 
| 
       1567 
2305 
     | 
    
         
             
                HEADER,
         
     | 
| 
         @@ -1575,6 +2313,115 @@ result. 
     | 
|
| 
       1575 
2313 
     | 
    
         
             
                ]
         
     | 
| 
       1576 
2314 
     | 
    
         
             
              ]
         
     | 
| 
       1577 
2315 
     | 
    
         | 
| 
      
 2316 
     | 
    
         
            +
            .. _select-slice-related-parameters:
         
     | 
| 
      
 2317 
     | 
    
         
            +
             
     | 
| 
      
 2318 
     | 
    
         
            +
            Slice related parameters
         
     | 
| 
      
 2319 
     | 
    
         
            +
            ^^^^^^^^^^^^^^^^^^^^^^^^
         
     | 
| 
      
 2320 
     | 
    
         
            +
             
     | 
| 
      
 2321 
     | 
    
         
            +
            .. versionadded:: 6.0.3
         
     | 
| 
      
 2322 
     | 
    
         
            +
             
     | 
| 
      
 2323 
     | 
    
         
            +
            This section describes slice related parameters.
         
     | 
| 
      
 2324 
     | 
    
         
            +
             
     | 
| 
      
 2325 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2326 
     | 
    
         
            +
             
     | 
| 
      
 2327 
     | 
    
         
            +
            Here are parameters for slice:
         
     | 
| 
      
 2328 
     | 
    
         
            +
             
     | 
| 
      
 2329 
     | 
    
         
            +
            .. list-table::
         
     | 
| 
      
 2330 
     | 
    
         
            +
               :header-rows: 1
         
     | 
| 
      
 2331 
     | 
    
         
            +
             
     | 
| 
      
 2332 
     | 
    
         
            +
               * - Name
         
     | 
| 
      
 2333 
     | 
    
         
            +
                 - Required
         
     | 
| 
      
 2334 
     | 
    
         
            +
               * - ``--slices[${LABEL}].match_columns``
         
     | 
| 
      
 2335 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2336 
     | 
    
         
            +
               * - ``--slices[${LABEL}].query``
         
     | 
| 
      
 2337 
     | 
    
         
            +
                 - Required if ``--slices[${LABEL}].filter`` isn't specified.
         
     | 
| 
      
 2338 
     | 
    
         
            +
               * - ``--slices[${LABEL}].filter``
         
     | 
| 
      
 2339 
     | 
    
         
            +
                 - Required if ``--slices[${LABEL}].query`` isn't specified.
         
     | 
| 
      
 2340 
     | 
    
         
            +
               * - ``--slices[${LABEL}].query_expander``
         
     | 
| 
      
 2341 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2342 
     | 
    
         
            +
               * - ``--slices[${LABEL}].query_flags``
         
     | 
| 
      
 2343 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2344 
     | 
    
         
            +
               * - ``--slices[${LABEL}].sort_keys``
         
     | 
| 
      
 2345 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2346 
     | 
    
         
            +
               * - ``--slices[${LABEL}].output_columns``
         
     | 
| 
      
 2347 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2348 
     | 
    
         
            +
               * - ``--slices[${LABEL}].offset``
         
     | 
| 
      
 2349 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2350 
     | 
    
         
            +
               * - ``--slices[${LABEL}].limit``
         
     | 
| 
      
 2351 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2352 
     | 
    
         
            +
               * - ``--slices[${LABEL}].table``
         
     | 
| 
      
 2353 
     | 
    
         
            +
                 - Optional
         
     | 
| 
      
 2354 
     | 
    
         
            +
             
     | 
| 
      
 2355 
     | 
    
         
            +
            .. _select-slices-label-match-columns:
         
     | 
| 
      
 2356 
     | 
    
         
            +
             
     | 
| 
      
 2357 
     | 
    
         
            +
            ``slices[${LABEL}].match_columns``
         
     | 
| 
      
 2358 
     | 
    
         
            +
            """"""""""""""""""""""""""""""""""
         
     | 
| 
      
 2359 
     | 
    
         
            +
             
     | 
| 
      
 2360 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2361 
     | 
    
         
            +
             
     | 
| 
      
 2362 
     | 
    
         
            +
            .. _select-slices-label-query:
         
     | 
| 
      
 2363 
     | 
    
         
            +
             
     | 
| 
      
 2364 
     | 
    
         
            +
            ``slices[${LABEL}].query``
         
     | 
| 
      
 2365 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 2366 
     | 
    
         
            +
             
     | 
| 
      
 2367 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2368 
     | 
    
         
            +
             
     | 
| 
      
 2369 
     | 
    
         
            +
            .. _select-slices-label-filter:
         
     | 
| 
      
 2370 
     | 
    
         
            +
             
     | 
| 
      
 2371 
     | 
    
         
            +
            ``slices[${LABEL}].filter``
         
     | 
| 
      
 2372 
     | 
    
         
            +
            """""""""""""""""""""""""""
         
     | 
| 
      
 2373 
     | 
    
         
            +
             
     | 
| 
      
 2374 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2375 
     | 
    
         
            +
             
     | 
| 
      
 2376 
     | 
    
         
            +
            .. _select-slices-label-query-expander:
         
     | 
| 
      
 2377 
     | 
    
         
            +
             
     | 
| 
      
 2378 
     | 
    
         
            +
            ``slices[${LABEL}].query_expander``
         
     | 
| 
      
 2379 
     | 
    
         
            +
            """""""""""""""""""""""""""""""""""
         
     | 
| 
      
 2380 
     | 
    
         
            +
             
     | 
| 
      
 2381 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2382 
     | 
    
         
            +
             
     | 
| 
      
 2383 
     | 
    
         
            +
            .. _select-slices-label-query-flags:
         
     | 
| 
      
 2384 
     | 
    
         
            +
             
     | 
| 
      
 2385 
     | 
    
         
            +
            ``slices[${LABEL}].query_flags``
         
     | 
| 
      
 2386 
     | 
    
         
            +
            """"""""""""""""""""""""""""""""
         
     | 
| 
      
 2387 
     | 
    
         
            +
             
     | 
| 
      
 2388 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2389 
     | 
    
         
            +
             
     | 
| 
      
 2390 
     | 
    
         
            +
            .. _select-slices-label-sort-keys:
         
     | 
| 
      
 2391 
     | 
    
         
            +
             
     | 
| 
      
 2392 
     | 
    
         
            +
            ``slices[${LABEL}].sort_keys``
         
     | 
| 
      
 2393 
     | 
    
         
            +
            """"""""""""""""""""""""""""""
         
     | 
| 
      
 2394 
     | 
    
         
            +
             
     | 
| 
      
 2395 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2396 
     | 
    
         
            +
             
     | 
| 
      
 2397 
     | 
    
         
            +
            .. _select-slices-label-output-columns:
         
     | 
| 
      
 2398 
     | 
    
         
            +
             
     | 
| 
      
 2399 
     | 
    
         
            +
            ``slices[${LABEL}].output_columns``
         
     | 
| 
      
 2400 
     | 
    
         
            +
            """""""""""""""""""""""""""""""""""
         
     | 
| 
      
 2401 
     | 
    
         
            +
             
     | 
| 
      
 2402 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2403 
     | 
    
         
            +
             
     | 
| 
      
 2404 
     | 
    
         
            +
            .. _select-slices-label-offset:
         
     | 
| 
      
 2405 
     | 
    
         
            +
             
     | 
| 
      
 2406 
     | 
    
         
            +
            ``slices[${LABEL}].offset``
         
     | 
| 
      
 2407 
     | 
    
         
            +
            """""""""""""""""""""""""""
         
     | 
| 
      
 2408 
     | 
    
         
            +
             
     | 
| 
      
 2409 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2410 
     | 
    
         
            +
             
     | 
| 
      
 2411 
     | 
    
         
            +
            .. _select-slices-label-limit:
         
     | 
| 
      
 2412 
     | 
    
         
            +
             
     | 
| 
      
 2413 
     | 
    
         
            +
            ``slices[${LABEL}].limit``
         
     | 
| 
      
 2414 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 2415 
     | 
    
         
            +
             
     | 
| 
      
 2416 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2417 
     | 
    
         
            +
             
     | 
| 
      
 2418 
     | 
    
         
            +
            .. _select-slices-label-table:
         
     | 
| 
      
 2419 
     | 
    
         
            +
             
     | 
| 
      
 2420 
     | 
    
         
            +
            ``slices[${LABEL}].table``
         
     | 
| 
      
 2421 
     | 
    
         
            +
            """"""""""""""""""""""""""
         
     | 
| 
      
 2422 
     | 
    
         
            +
             
     | 
| 
      
 2423 
     | 
    
         
            +
            TODO
         
     | 
| 
      
 2424 
     | 
    
         
            +
             
     | 
| 
       1578 
2425 
     | 
    
         
             
            Cache related parameter
         
     | 
| 
       1579 
2426 
     | 
    
         
             
            ^^^^^^^^^^^^^^^^^^^^^^^
         
     | 
| 
       1580 
2427 
     | 
    
         | 
| 
         @@ -1918,7 +2765,7 @@ The following value part is the same format as ``SEARCH_RESULT``:: 
     | 
|
| 
       1918 
2765 
     | 
    
         
             
                RECORDS
         
     | 
| 
       1919 
2766 
     | 
    
         
             
              ]
         
     | 
| 
       1920 
2767 
     | 
    
         | 
| 
       1921 
     | 
    
         
            -
            See also :ref:`select- 
     | 
| 
      
 2768 
     | 
    
         
            +
            See also :ref:`select-drilldowns-label-output-format` for
         
     | 
| 
       1922 
2769 
     | 
    
         
             
            ``drilldowns[${LABEL}]`` style drilldown output format.
         
     | 
| 
       1923 
2770 
     | 
    
         | 
| 
       1924 
2771 
     | 
    
         |