rroonga 6.1.3-x64-mingw32 → 7.0.2-x64-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
 
| 
         @@ -1,16 +1,23 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Groonga
         
     | 
| 
       2 
2 
     | 
    
         
             
              module Sharding
         
     | 
| 
       3 
3 
     | 
    
         
             
                class RangeExpressionBuilder
         
     | 
| 
       4 
     | 
    
         
            -
                   
     | 
| 
      
 4 
     | 
    
         
            +
                  attr_reader :match_columns_expression
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
                  attr_writer :match_columns
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attr_writer :query
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attr_writer :filter
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  def initialize(key, target_range)
         
     | 
| 
       5 
11 
     | 
    
         
             
                    @key = key
         
     | 
| 
       6 
12 
     | 
    
         
             
                    @target_range = target_range
         
     | 
| 
       7 
     | 
    
         
            -
                    @ 
     | 
| 
      
 13 
     | 
    
         
            +
                    @match_columns_expression = nil
         
     | 
| 
      
 14 
     | 
    
         
            +
                    @match_columns = nil
         
     | 
| 
      
 15 
     | 
    
         
            +
                    @query = nil
         
     | 
| 
      
 16 
     | 
    
         
            +
                    @filter = nil
         
     | 
| 
       8 
17 
     | 
    
         
             
                  end
         
     | 
| 
       9 
18 
     | 
    
         | 
| 
       10 
19 
     | 
    
         
             
                  def build_all(expression)
         
     | 
| 
       11 
     | 
    
         
            -
                     
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                    expression.parse(@filter)
         
     | 
| 
      
 20 
     | 
    
         
            +
                    build_condition(expression)
         
     | 
| 
       14 
21 
     | 
    
         
             
                  end
         
     | 
| 
       15 
22 
     | 
    
         | 
| 
       16 
23 
     | 
    
         
             
                  def build_partial_min(expression)
         
     | 
| 
         @@ -22,10 +29,7 @@ module Groonga 
     | 
|
| 
       22 
29 
     | 
    
         
             
                    else
         
     | 
| 
       23 
30 
     | 
    
         
             
                      expression.append_operator(Operator::GREATER, 2)
         
     | 
| 
       24 
31 
     | 
    
         
             
                    end
         
     | 
| 
       25 
     | 
    
         
            -
                     
     | 
| 
       26 
     | 
    
         
            -
                      expression.parse(@filter)
         
     | 
| 
       27 
     | 
    
         
            -
                      expression.append_operator(Operator::AND, 2)
         
     | 
| 
       28 
     | 
    
         
            -
                    end
         
     | 
| 
      
 32 
     | 
    
         
            +
                    build_condition(expression)
         
     | 
| 
       29 
33 
     | 
    
         
             
                  end
         
     | 
| 
       30 
34 
     | 
    
         | 
| 
       31 
35 
     | 
    
         
             
                  def build_partial_max(expression)
         
     | 
| 
         @@ -37,10 +41,7 @@ module Groonga 
     | 
|
| 
       37 
41 
     | 
    
         
             
                    else
         
     | 
| 
       38 
42 
     | 
    
         
             
                      expression.append_operator(Operator::LESS, 2)
         
     | 
| 
       39 
43 
     | 
    
         
             
                    end
         
     | 
| 
       40 
     | 
    
         
            -
                     
     | 
| 
       41 
     | 
    
         
            -
                      expression.parse(@filter)
         
     | 
| 
       42 
     | 
    
         
            -
                      expression.append_operator(Operator::AND, 2)
         
     | 
| 
       43 
     | 
    
         
            -
                    end
         
     | 
| 
      
 44 
     | 
    
         
            +
                    build_condition(expression)
         
     | 
| 
       44 
45 
     | 
    
         
             
                  end
         
     | 
| 
       45 
46 
     | 
    
         | 
| 
       46 
47 
     | 
    
         
             
                  def build_partial_min_and_max(expression)
         
     | 
| 
         @@ -55,9 +56,31 @@ module Groonga 
     | 
|
| 
       55 
56 
     | 
    
         
             
                    expression.append_constant(@target_range.max_border,
         
     | 
| 
       56 
57 
     | 
    
         
             
                                               Operator::PUSH, 1)
         
     | 
| 
       57 
58 
     | 
    
         
             
                    expression.append_operator(Operator::CALL, 5)
         
     | 
| 
      
 59 
     | 
    
         
            +
                    build_condition(expression)
         
     | 
| 
      
 60 
     | 
    
         
            +
                  end
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
                  private
         
     | 
| 
      
 63 
     | 
    
         
            +
                  def build_condition(expression)
         
     | 
| 
      
 64 
     | 
    
         
            +
                    if @query
         
     | 
| 
      
 65 
     | 
    
         
            +
                      is_empty = expression.empty?
         
     | 
| 
      
 66 
     | 
    
         
            +
                      if @match_columns
         
     | 
| 
      
 67 
     | 
    
         
            +
                        table = Context.instance[expression[0].domain]
         
     | 
| 
      
 68 
     | 
    
         
            +
                        @match_columns_expression = Expression.create(table)
         
     | 
| 
      
 69 
     | 
    
         
            +
                        @match_columns_expression.parse(@match_columns)
         
     | 
| 
      
 70 
     | 
    
         
            +
                      end
         
     | 
| 
      
 71 
     | 
    
         
            +
                      flags = Expression::SYNTAX_QUERY |
         
     | 
| 
      
 72 
     | 
    
         
            +
                        Expression::ALLOW_PRAGMA |
         
     | 
| 
      
 73 
     | 
    
         
            +
                        Expression::ALLOW_COLUMN
         
     | 
| 
      
 74 
     | 
    
         
            +
                      expression.parse(@query,
         
     | 
| 
      
 75 
     | 
    
         
            +
                                       default_column: @match_columns_expression,
         
     | 
| 
      
 76 
     | 
    
         
            +
                                       flags: flags)
         
     | 
| 
      
 77 
     | 
    
         
            +
                      expression.append_operator(Operator::AND, 2) unless is_empty
         
     | 
| 
      
 78 
     | 
    
         
            +
                    end
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
       58 
80 
     | 
    
         
             
                    if @filter
         
     | 
| 
      
 81 
     | 
    
         
            +
                      is_empty = expression.empty?
         
     | 
| 
       59 
82 
     | 
    
         
             
                      expression.parse(@filter)
         
     | 
| 
       60 
     | 
    
         
            -
                      expression.append_operator(Operator::AND, 2)
         
     | 
| 
      
 83 
     | 
    
         
            +
                      expression.append_operator(Operator::AND, 2) unless is_empty
         
     | 
| 
       61 
84 
     | 
    
         
             
                    end
         
     | 
| 
       62 
85 
     | 
    
         
             
                  end
         
     | 
| 
       63 
86 
     | 
    
         
             
                end
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -17,7 +17,7 @@ old_library='suggest.a' 
     | 
|
| 
       17 
17 
     | 
    
         
             
            inherited_linker_flags=''
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
            # Libraries that this one depends upon.
         
     | 
| 
       20 
     | 
    
         
            -
            dependency_libs=' -L/ 
     | 
| 
      
 20 
     | 
    
         
            +
            dependency_libs=' -L/build/dist-x64/lib /build/dist-x64/lib/libgroonga.la /build/dist-x64/lib/libonigmo.la -llz4 -lz -lws2_32 -lmsgpackc'
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            # Names of additional weak libraries provided by this library
         
     | 
| 
       23 
23 
     | 
    
         
             
            weak_library_names=''
         
     | 
| 
         @@ -38,4 +38,4 @@ dlopen='' 
     | 
|
| 
       38 
38 
     | 
    
         
             
            dlpreopen=''
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
            # Directory that this library needs to be installed in:
         
     | 
| 
       41 
     | 
    
         
            -
            libdir='/ 
     | 
| 
      
 41 
     | 
    
         
            +
            libdir='/build/dist-x64/lib/groonga/plugins/suggest'
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -17,7 +17,7 @@ old_library='stop_word.a' 
     | 
|
| 
       17 
17 
     | 
    
         
             
            inherited_linker_flags=''
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
            # Libraries that this one depends upon.
         
     | 
| 
       20 
     | 
    
         
            -
            dependency_libs=' -L/ 
     | 
| 
      
 20 
     | 
    
         
            +
            dependency_libs=' -L/build/dist-x64/lib /build/dist-x64/lib/libgroonga.la -lmsgpackc /build/dist-x64/lib/libonigmo.la -llz4 -lz -lws2_32'
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            # Names of additional weak libraries provided by this library
         
     | 
| 
       23 
23 
     | 
    
         
             
            weak_library_names=''
         
     | 
| 
         @@ -38,4 +38,4 @@ dlopen='' 
     | 
|
| 
       38 
38 
     | 
    
         
             
            dlpreopen=''
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
            # Directory that this library needs to be installed in:
         
     | 
| 
       41 
     | 
    
         
            -
            libdir='/ 
     | 
| 
      
 41 
     | 
    
         
            +
            libdir='/build/dist-x64/lib/groonga/plugins/token_filters'
         
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         Binary file 
     | 
| 
         @@ -17,7 +17,7 @@ old_library='mecab.a' 
     | 
|
| 
       17 
17 
     | 
    
         
             
            inherited_linker_flags=''
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
            # Libraries that this one depends upon.
         
     | 
| 
       20 
     | 
    
         
            -
            dependency_libs=' -L/ 
     | 
| 
      
 20 
     | 
    
         
            +
            dependency_libs=' -L/build/dist-x64/lib /build/dist-x64/lib/libmecab.la /build/dist-x64/lib/libgroonga.la -lmsgpackc /build/dist-x64/lib/libonigmo.la -llz4 -lz -lws2_32'
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            # Names of additional weak libraries provided by this library
         
     | 
| 
       23 
23 
     | 
    
         
             
            weak_library_names=''
         
     | 
| 
         @@ -38,4 +38,4 @@ dlopen='' 
     | 
|
| 
       38 
38 
     | 
    
         
             
            dlpreopen=''
         
     | 
| 
       39 
39 
     | 
    
         | 
| 
       40 
40 
     | 
    
         
             
            # Directory that this library needs to be installed in:
         
     | 
| 
       41 
     | 
    
         
            -
            libdir='/ 
     | 
| 
      
 41 
     | 
    
         
            +
            libdir='/build/dist-x64/lib/groonga/plugins/tokenizers'
         
     | 
| 
         @@ -31,7 +31,8 @@ module Groonga 
     | 
|
| 
       31 
31 
     | 
    
         
             
                        current_size = 0
         
     | 
| 
       32 
32 
     | 
    
         
             
                      end
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
       34 
     | 
    
         
            -
                       
     | 
| 
      
 34 
     | 
    
         
            +
                      estimator = ScanInfoDataSizeEstimator.new(data, @table)
         
     | 
| 
      
 35 
     | 
    
         
            +
                      size = estimator.estimate
         
     | 
| 
       35 
36 
     | 
    
         
             
                      case data.logical_op
         
     | 
| 
       36 
37 
     | 
    
         
             
                      when Operator::AND
         
     | 
| 
       37 
38 
     | 
    
         
             
                        current_size = size if size < current_size
         
     | 
| 
         @@ -49,140 +50,5 @@ module Groonga 
     | 
|
| 
       49 
50 
     | 
    
         
             
                  end
         
     | 
| 
       50 
51 
     | 
    
         
             
                  current_size
         
     | 
| 
       51 
52 
     | 
    
         
             
                end
         
     | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
                private
         
     | 
| 
       54 
     | 
    
         
            -
                def estimate_data(data)
         
     | 
| 
       55 
     | 
    
         
            -
                  search_index = data.search_indexes.first
         
     | 
| 
       56 
     | 
    
         
            -
                  return @table_size if search_index.nil?
         
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
       58 
     | 
    
         
            -
                  index_column = resolve_index_column(search_index.index_column,
         
     | 
| 
       59 
     | 
    
         
            -
                                                      data.op)
         
     | 
| 
       60 
     | 
    
         
            -
                  return @table_size if index_column.nil?
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                  size = nil
         
     | 
| 
       63 
     | 
    
         
            -
                  case data.op
         
     | 
| 
       64 
     | 
    
         
            -
                  when Operator::MATCH,
         
     | 
| 
       65 
     | 
    
         
            -
                       Operator::FUZZY
         
     | 
| 
       66 
     | 
    
         
            -
                    size = estimate_match(data, index_column)
         
     | 
| 
       67 
     | 
    
         
            -
                  when Operator::REGEXP
         
     | 
| 
       68 
     | 
    
         
            -
                    size = estimate_regexp(data, index_column)
         
     | 
| 
       69 
     | 
    
         
            -
                  when Operator::EQUAL
         
     | 
| 
       70 
     | 
    
         
            -
                    size = estimate_equal(data, index_column)
         
     | 
| 
       71 
     | 
    
         
            -
                  when Operator::LESS,
         
     | 
| 
       72 
     | 
    
         
            -
                       Operator::LESS_EQUAL,
         
     | 
| 
       73 
     | 
    
         
            -
                       Operator::GREATER,
         
     | 
| 
       74 
     | 
    
         
            -
                       Operator::GREATER_EQUAL
         
     | 
| 
       75 
     | 
    
         
            -
                    size = estimate_range(data, index_column)
         
     | 
| 
       76 
     | 
    
         
            -
                  when Operator::PREFIX
         
     | 
| 
       77 
     | 
    
         
            -
                    size = estimate_prefix(data, index_column)
         
     | 
| 
       78 
     | 
    
         
            -
                  when Operator::CALL
         
     | 
| 
       79 
     | 
    
         
            -
                    size = estimate_call(data, index_column)
         
     | 
| 
       80 
     | 
    
         
            -
                  end
         
     | 
| 
       81 
     | 
    
         
            -
                  size || @table_size
         
     | 
| 
       82 
     | 
    
         
            -
                end
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                def resolve_index_column(index_column, operator)
         
     | 
| 
       85 
     | 
    
         
            -
                  while index_column.is_a?(Accessor)
         
     | 
| 
       86 
     | 
    
         
            -
                    index_info = index_column.find_index(operator)
         
     | 
| 
       87 
     | 
    
         
            -
                    return nil if index_info.nil?
         
     | 
| 
       88 
     | 
    
         
            -
                    index_column = index_info.index
         
     | 
| 
       89 
     | 
    
         
            -
                  end
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
                  index_column
         
     | 
| 
       92 
     | 
    
         
            -
                end
         
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
       94 
     | 
    
         
            -
                def sampling_cursor_limit(n_terms)
         
     | 
| 
       95 
     | 
    
         
            -
                  limit = n_terms * 0.01
         
     | 
| 
       96 
     | 
    
         
            -
                  if limit < 10
         
     | 
| 
       97 
     | 
    
         
            -
                    10
         
     | 
| 
       98 
     | 
    
         
            -
                  elsif limit > 1000
         
     | 
| 
       99 
     | 
    
         
            -
                    1000
         
     | 
| 
       100 
     | 
    
         
            -
                  else
         
     | 
| 
       101 
     | 
    
         
            -
                    limit.to_i
         
     | 
| 
       102 
     | 
    
         
            -
                  end
         
     | 
| 
       103 
     | 
    
         
            -
                end
         
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
                def estimate_match(data, index_column)
         
     | 
| 
       106 
     | 
    
         
            -
                  index_column.estimate_size(:query => data.query.value)
         
     | 
| 
       107 
     | 
    
         
            -
                end
         
     | 
| 
       108 
     | 
    
         
            -
             
     | 
| 
       109 
     | 
    
         
            -
                def estimate_regexp(data, index_column)
         
     | 
| 
       110 
     | 
    
         
            -
                  index_column.estimate_size(:query => data.query.value,
         
     | 
| 
       111 
     | 
    
         
            -
                                             :mode => data.op)
         
     | 
| 
       112 
     | 
    
         
            -
                end
         
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
                def estimate_equal(data, index_column)
         
     | 
| 
       115 
     | 
    
         
            -
                  lexicon = index_column.lexicon
         
     | 
| 
       116 
     | 
    
         
            -
                  query = data.query
         
     | 
| 
       117 
     | 
    
         
            -
                  if query.domain == lexicon.id
         
     | 
| 
       118 
     | 
    
         
            -
                    term_id = query.value
         
     | 
| 
       119 
     | 
    
         
            -
                  else
         
     | 
| 
       120 
     | 
    
         
            -
                    term_id = lexicon[query]
         
     | 
| 
       121 
     | 
    
         
            -
                  end
         
     | 
| 
       122 
     | 
    
         
            -
                  return 0 if term_id.nil?
         
     | 
| 
       123 
     | 
    
         
            -
             
     | 
| 
       124 
     | 
    
         
            -
                  index_column.estimate_size(:term_id => term_id)
         
     | 
| 
       125 
     | 
    
         
            -
                end
         
     | 
| 
       126 
     | 
    
         
            -
             
     | 
| 
       127 
     | 
    
         
            -
                def estimate_range(data, index_column)
         
     | 
| 
       128 
     | 
    
         
            -
                  lexicon = index_column.lexicon
         
     | 
| 
       129 
     | 
    
         
            -
                  n_terms = lexicon.size
         
     | 
| 
       130 
     | 
    
         
            -
                  return 0 if n_terms.zero?
         
     | 
| 
       131 
     | 
    
         
            -
             
     | 
| 
       132 
     | 
    
         
            -
                  value = data.query.value
         
     | 
| 
       133 
     | 
    
         
            -
                  options = {
         
     | 
| 
       134 
     | 
    
         
            -
                    :limit => sampling_cursor_limit(n_terms),
         
     | 
| 
       135 
     | 
    
         
            -
                  }
         
     | 
| 
       136 
     | 
    
         
            -
                  case data.op
         
     | 
| 
       137 
     | 
    
         
            -
                  when Operator::LESS
         
     | 
| 
       138 
     | 
    
         
            -
                    options[:max] = value
         
     | 
| 
       139 
     | 
    
         
            -
                    options[:flags] = TableCursorFlags::LT
         
     | 
| 
       140 
     | 
    
         
            -
                  when Operator::LESS_EQUAL
         
     | 
| 
       141 
     | 
    
         
            -
                    options[:max] = value
         
     | 
| 
       142 
     | 
    
         
            -
                    options[:flags] = TableCursorFlags::LE
         
     | 
| 
       143 
     | 
    
         
            -
                  when Operator::GREATER
         
     | 
| 
       144 
     | 
    
         
            -
                    options[:min] = value
         
     | 
| 
       145 
     | 
    
         
            -
                    options[:flags] = TableCursorFlags::GT
         
     | 
| 
       146 
     | 
    
         
            -
                  when Operator::GREATER_EQUAL
         
     | 
| 
       147 
     | 
    
         
            -
                    options[:min] = value
         
     | 
| 
       148 
     | 
    
         
            -
                    options[:flags] = TableCursorFlags::GE
         
     | 
| 
       149 
     | 
    
         
            -
                  end
         
     | 
| 
       150 
     | 
    
         
            -
                  TableCursor.open(lexicon, options) do |cursor|
         
     | 
| 
       151 
     | 
    
         
            -
                    size = index_column.estimate_size(:lexicon_cursor => cursor)
         
     | 
| 
       152 
     | 
    
         
            -
                    size += 1 if cursor.next != ID::NIL
         
     | 
| 
       153 
     | 
    
         
            -
                    size
         
     | 
| 
       154 
     | 
    
         
            -
                  end
         
     | 
| 
       155 
     | 
    
         
            -
                end
         
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
                def estimate_prefix(data, index_column)
         
     | 
| 
       158 
     | 
    
         
            -
                  lexicon = index_column.lexicon
         
     | 
| 
       159 
     | 
    
         
            -
                  n_terms = lexicon.size
         
     | 
| 
       160 
     | 
    
         
            -
                  return 0 if n_terms.zero?
         
     | 
| 
       161 
     | 
    
         
            -
             
     | 
| 
       162 
     | 
    
         
            -
                  value = data.query.value
         
     | 
| 
       163 
     | 
    
         
            -
                  options = {
         
     | 
| 
       164 
     | 
    
         
            -
                    :min => value,
         
     | 
| 
       165 
     | 
    
         
            -
                    :limit => sampling_cursor_limit(n_terms),
         
     | 
| 
       166 
     | 
    
         
            -
                    :flags => TableCursorFlags::PREFIX,
         
     | 
| 
       167 
     | 
    
         
            -
                  }
         
     | 
| 
       168 
     | 
    
         
            -
                  TableCursor.open(lexicon, options) do |cursor|
         
     | 
| 
       169 
     | 
    
         
            -
                    size = index_column.estimate_size(:lexicon_cursor => cursor)
         
     | 
| 
       170 
     | 
    
         
            -
                    size += 1 if cursor.next != ID::NIL
         
     | 
| 
       171 
     | 
    
         
            -
                    size
         
     | 
| 
       172 
     | 
    
         
            -
                  end
         
     | 
| 
       173 
     | 
    
         
            -
                end
         
     | 
| 
       174 
     | 
    
         
            -
             
     | 
| 
       175 
     | 
    
         
            -
                def estimate_call(data, index_column)
         
     | 
| 
       176 
     | 
    
         
            -
                  procedure = data.args[0]
         
     | 
| 
       177 
     | 
    
         
            -
                  arguments = data.args[1..-1].collect do |arg|
         
     | 
| 
       178 
     | 
    
         
            -
                    if arg.is_a?(::Groonga::Object)
         
     | 
| 
       179 
     | 
    
         
            -
                      ExpressionTree::Variable.new(arg)
         
     | 
| 
       180 
     | 
    
         
            -
                    else
         
     | 
| 
       181 
     | 
    
         
            -
                      ExpressionTree::Constant.new(arg)
         
     | 
| 
       182 
     | 
    
         
            -
                    end
         
     | 
| 
       183 
     | 
    
         
            -
                  end
         
     | 
| 
       184 
     | 
    
         
            -
                  node = ExpressionTree::FunctionCall.new(procedure, arguments)
         
     | 
| 
       185 
     | 
    
         
            -
                  node.estimate_size(@table)
         
     | 
| 
       186 
     | 
    
         
            -
                end
         
     | 
| 
       187 
53 
     | 
    
         
             
              end
         
     | 
| 
       188 
54 
     | 
    
         
             
            end
         
     | 
| 
         @@ -20,10 +20,21 @@ module Groonga 
     | 
|
| 
       20 
20 
     | 
    
         
             
                    return table.size unless @procedure.name == "between"
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                    column, min, min_border, max, max_border = @arguments
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
       23 
24 
     | 
    
         
             
                    index_info = column.column.find_index(Operator::CALL)
         
     | 
| 
       24 
25 
     | 
    
         
             
                    return table.size if index_info.nil?
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
26 
     | 
    
         
             
                    index_column = index_info.index
         
     | 
| 
      
 27 
     | 
    
         
            +
                    while index_column.is_a?(Groonga::Accessor)
         
     | 
| 
      
 28 
     | 
    
         
            +
                      if index_column.have_next?
         
     | 
| 
      
 29 
     | 
    
         
            +
                        index_column = index_column.next
         
     | 
| 
      
 30 
     | 
    
         
            +
                      else
         
     | 
| 
      
 31 
     | 
    
         
            +
                        index_column = index_column.object
         
     | 
| 
      
 32 
     | 
    
         
            +
                        index_info = index_column.find_index(Operator::CALL)
         
     | 
| 
      
 33 
     | 
    
         
            +
                        return table.size if index_info.nil?
         
     | 
| 
      
 34 
     | 
    
         
            +
                        index_column = index_info.index
         
     | 
| 
      
 35 
     | 
    
         
            +
                      end
         
     | 
| 
      
 36 
     | 
    
         
            +
                    end
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
       27 
38 
     | 
    
         
             
                    lexicon = index_column.lexicon
         
     | 
| 
       28 
39 
     | 
    
         
             
                    options = {
         
     | 
| 
       29 
40 
     | 
    
         
             
                      :min => min.value,
         
     | 
| 
         @@ -9,12 +9,12 @@ module Groonga 
     | 
|
| 
       9 
9 
     | 
    
         
             
                    message = "#{error.class}: #{error.message}"
         
     | 
| 
       10 
10 
     | 
    
         
             
                  end
         
     | 
| 
       11 
11 
     | 
    
         
             
                  backtrace = error.backtrace
         
     | 
| 
       12 
     | 
    
         
            -
                   
     | 
| 
       13 
     | 
    
         
            -
                  if  
     | 
| 
       14 
     | 
    
         
            -
                     
     | 
| 
       15 
     | 
    
         
            -
                    file =  
     | 
| 
       16 
     | 
    
         
            -
                    line =  
     | 
| 
       17 
     | 
    
         
            -
                    method =  
     | 
| 
      
 12 
     | 
    
         
            +
                  first_raw_entry = backtrace.first
         
     | 
| 
      
 13 
     | 
    
         
            +
                  if first_raw_entry
         
     | 
| 
      
 14 
     | 
    
         
            +
                    first_entry = BacktraceEntry.parse(first_raw_entry)
         
     | 
| 
      
 15 
     | 
    
         
            +
                    file = first_entry.file
         
     | 
| 
      
 16 
     | 
    
         
            +
                    line = first_entry.line
         
     | 
| 
      
 17 
     | 
    
         
            +
                    method = first_entry.method
         
     | 
| 
       18 
18 
     | 
    
         
             
                    # message = "#{file}:#{line}:#{method}: #{message}"
         
     | 
| 
       19 
19 
     | 
    
         
             
                  else
         
     | 
| 
       20 
20 
     | 
    
         
             
                    file = ""
         
     | 
| 
         @@ -23,8 +23,7 @@ module Groonga 
     | 
|
| 
       23 
23 
     | 
    
         
             
                  end
         
     | 
| 
       24 
24 
     | 
    
         
             
                  log(log_level, file, line, method, message)
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
     | 
    
         
            -
                  backtrace. 
     | 
| 
       27 
     | 
    
         
            -
                    next if i == 0
         
     | 
| 
      
 26 
     | 
    
         
            +
                  backtrace.each_with_index do |raw_entry, i|
         
     | 
| 
       28 
27 
     | 
    
         
             
                    entry = BacktraceEntry.parse(raw_entry)
         
     | 
| 
       29 
28 
     | 
    
         
             
                    message = entry.message
         
     | 
| 
       30 
29 
     | 
    
         
             
                    message = raw_entry if message.empty?
         
     | 
| 
         @@ -2,19 +2,13 @@ require "scan_info_data" 
     | 
|
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Groonga
         
     | 
| 
       4 
4 
     | 
    
         
             
              class ScanInfoBuilder
         
     | 
| 
       5 
     | 
    
         
            -
                module Status
         
     | 
| 
       6 
     | 
    
         
            -
                  START = 0
         
     | 
| 
       7 
     | 
    
         
            -
                  VAR = 1
         
     | 
| 
       8 
     | 
    
         
            -
                  COL1 = 2
         
     | 
| 
       9 
     | 
    
         
            -
                  COL2 = 3
         
     | 
| 
       10 
     | 
    
         
            -
                  CONST = 4
         
     | 
| 
       11 
     | 
    
         
            -
                end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
5 
     | 
    
         
             
                def initialize(expression, operator, record_exist)
         
     | 
| 
       14 
6 
     | 
    
         
             
                  @data_list = []
         
     | 
| 
       15 
7 
     | 
    
         
             
                  @expression = expression
         
     | 
| 
       16 
8 
     | 
    
         
             
                  @operator = operator
         
     | 
| 
       17 
9 
     | 
    
         
             
                  @record_exist = record_exist
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @variable = @expression[0]
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @table = Context.instance[@variable.domain]
         
     | 
| 
       18 
12 
     | 
    
         
             
                end
         
     | 
| 
       19 
13 
     | 
    
         | 
| 
       20 
14 
     | 
    
         
             
                RELATION_OPERATORS = [
         
     | 
| 
         @@ -61,89 +55,106 @@ module Groonga 
     | 
|
| 
       61 
55 
     | 
    
         
             
                def build
         
     | 
| 
       62 
56 
     | 
    
         
             
                  return nil unless valid?
         
     | 
| 
       63 
57 
     | 
    
         | 
| 
       64 
     | 
    
         
            -
                   
     | 
| 
       65 
     | 
    
         
            -
                   
     | 
| 
       66 
     | 
    
         
            -
                   
     | 
| 
       67 
     | 
    
         
            -
             
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
             
     | 
| 
       70 
     | 
    
         
            -
                     
     | 
| 
      
 58 
     | 
    
         
            +
                  context = BuildContext.new(@expression)
         
     | 
| 
      
 59 
     | 
    
         
            +
                  codes = context.codes
         
     | 
| 
      
 60 
     | 
    
         
            +
                  while context.have_next?
         
     | 
| 
      
 61 
     | 
    
         
            +
                    code = context.code
         
     | 
| 
      
 62 
     | 
    
         
            +
                    code_op = context.code_op
         
     | 
| 
      
 63 
     | 
    
         
            +
                    i = context.i
         
     | 
| 
      
 64 
     | 
    
         
            +
                    context.next
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                    case code_op
         
     | 
| 
       71 
67 
     | 
    
         
             
                    when *RELATION_OPERATORS
         
     | 
| 
       72 
     | 
    
         
            -
                      status =  
     | 
| 
       73 
     | 
    
         
            -
                      data 
     | 
| 
      
 68 
     | 
    
         
            +
                      context.status = :start
         
     | 
| 
      
 69 
     | 
    
         
            +
                      data = context.data
         
     | 
| 
      
 70 
     | 
    
         
            +
                      data.op = code_op
         
     | 
| 
       74 
71 
     | 
    
         
             
                      data.end = i
         
     | 
| 
       75 
72 
     | 
    
         
             
                      data.match_resolve_index
         
     | 
| 
       76 
73 
     | 
    
         
             
                      @data_list << data
         
     | 
| 
       77 
     | 
    
         
            -
                      data = nil
         
     | 
| 
      
 74 
     | 
    
         
            +
                      context.data = nil
         
     | 
| 
       78 
75 
     | 
    
         
             
                    when *LOGICAL_OPERATORS
         
     | 
| 
       79 
     | 
    
         
            -
                      if status ==  
     | 
| 
      
 76 
     | 
    
         
            +
                      if context.status == :const
         
     | 
| 
      
 77 
     | 
    
         
            +
                        data = context.data
         
     | 
| 
       80 
78 
     | 
    
         
             
                        data.op = Operator::PUSH
         
     | 
| 
       81 
79 
     | 
    
         
             
                        data.end = data.start
         
     | 
| 
       82 
80 
     | 
    
         
             
                        @data_list << data
         
     | 
| 
       83 
     | 
    
         
            -
                        data = nil
         
     | 
| 
      
 81 
     | 
    
         
            +
                        context.data = nil
         
     | 
| 
       84 
82 
     | 
    
         
             
                      end
         
     | 
| 
       85 
     | 
    
         
            -
                      put_logical_op( 
     | 
| 
      
 83 
     | 
    
         
            +
                      put_logical_op(code_op, i)
         
     | 
| 
       86 
84 
     | 
    
         
             
                      # TODO: rescue and return nil
         
     | 
| 
       87 
     | 
    
         
            -
                      status =  
     | 
| 
      
 85 
     | 
    
         
            +
                      context.status = :start
         
     | 
| 
       88 
86 
     | 
    
         
             
                    when Operator::PUSH
         
     | 
| 
       89 
     | 
    
         
            -
                      data ||= ScanInfoData.new(i)
         
     | 
| 
       90 
     | 
    
         
            -
                       
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
      
 87 
     | 
    
         
            +
                      context.data ||= ScanInfoData.new(i)
         
     | 
| 
      
 88 
     | 
    
         
            +
                      data = context.data
         
     | 
| 
      
 89 
     | 
    
         
            +
                      if code.value == @variable
         
     | 
| 
      
 90 
     | 
    
         
            +
                        context.status = :var
         
     | 
| 
       92 
91 
     | 
    
         
             
                      else
         
     | 
| 
       93 
92 
     | 
    
         
             
                        data.args << code.value
         
     | 
| 
       94 
     | 
    
         
            -
                        if status ==  
     | 
| 
      
 93 
     | 
    
         
            +
                        if context.status == :start
         
     | 
| 
       95 
94 
     | 
    
         
             
                          data.flags |= ScanInfo::Flags::PRE_CONST
         
     | 
| 
       96 
95 
     | 
    
         
             
                        end
         
     | 
| 
       97 
     | 
    
         
            -
                        status =  
     | 
| 
      
 96 
     | 
    
         
            +
                        context.status = :const
         
     | 
| 
       98 
97 
     | 
    
         
             
                      end
         
     | 
| 
       99 
98 
     | 
    
         
             
                      if code.modify > 0 and
         
     | 
| 
       100 
99 
     | 
    
         
             
                          LOGICAL_OPERATORS.include?(codes[i + code.modify].op)
         
     | 
| 
       101 
100 
     | 
    
         
             
                        data.op = Operator::PUSH
         
     | 
| 
       102 
101 
     | 
    
         
             
                        data.end = data.start
         
     | 
| 
       103 
102 
     | 
    
         
             
                        @data_list << data
         
     | 
| 
       104 
     | 
    
         
            -
                        data = nil
         
     | 
| 
       105 
     | 
    
         
            -
                        status =  
     | 
| 
      
 103 
     | 
    
         
            +
                        context.data = nil
         
     | 
| 
      
 104 
     | 
    
         
            +
                        context.status = :start
         
     | 
| 
       106 
105 
     | 
    
         
             
                      end
         
     | 
| 
       107 
106 
     | 
    
         
             
                    when Operator::GET_VALUE
         
     | 
| 
       108 
     | 
    
         
            -
                      case status
         
     | 
| 
       109 
     | 
    
         
            -
                      when  
     | 
| 
       110 
     | 
    
         
            -
                        data ||= ScanInfoData.new(i)
         
     | 
| 
       111 
     | 
    
         
            -
                         
     | 
| 
      
 107 
     | 
    
         
            +
                      case context.status
         
     | 
| 
      
 108 
     | 
    
         
            +
                      when :start
         
     | 
| 
      
 109 
     | 
    
         
            +
                        context.data ||= ScanInfoData.new(i)
         
     | 
| 
      
 110 
     | 
    
         
            +
                        data = context.data
         
     | 
| 
      
 111 
     | 
    
         
            +
                        context.status = :column1
         
     | 
| 
       112 
112 
     | 
    
         
             
                        data.args << code.value
         
     | 
| 
       113 
     | 
    
         
            -
                      when  
     | 
| 
       114 
     | 
    
         
            -
                        status =  
     | 
| 
      
 113 
     | 
    
         
            +
                      when :const, :var
         
     | 
| 
      
 114 
     | 
    
         
            +
                        context.status = :column1
         
     | 
| 
       115 
115 
     | 
    
         
             
                        data.args << code.value
         
     | 
| 
       116 
     | 
    
         
            -
                      when  
     | 
| 
       117 
     | 
    
         
            -
                         
     | 
| 
       118 
     | 
    
         
            -
                         
     | 
| 
       119 
     | 
    
         
            -
             
     | 
| 
      
 116 
     | 
    
         
            +
                      when :column1
         
     | 
| 
      
 117 
     | 
    
         
            +
                        message = "invalid expression: can't use column as a value: "
         
     | 
| 
      
 118 
     | 
    
         
            +
                        message << "<#{code.value.name}>: <#{@expression.grn_inspect}>"
         
     | 
| 
      
 119 
     | 
    
         
            +
                        raise ErrorMessage, message
         
     | 
| 
      
 120 
     | 
    
         
            +
                      when :column2
         
     | 
| 
       120 
121 
     | 
    
         
             
                        # Do nothing
         
     | 
| 
      
 122 
     | 
    
         
            +
                      else
         
     | 
| 
      
 123 
     | 
    
         
            +
                        message = "internal expression parsing error: unknown status: "
         
     | 
| 
      
 124 
     | 
    
         
            +
                        message << "<#{context.status.inspect}>: "
         
     | 
| 
      
 125 
     | 
    
         
            +
                        message << "<#{@expression.grn_inspect}>"
         
     | 
| 
      
 126 
     | 
    
         
            +
                        raise ErrorMessage, message
         
     | 
| 
       121 
127 
     | 
    
         
             
                      end
         
     | 
| 
       122 
128 
     | 
    
         
             
                    when Operator::CALL
         
     | 
| 
       123 
     | 
    
         
            -
                      data ||= ScanInfoData.new(i)
         
     | 
| 
      
 129 
     | 
    
         
            +
                      context.data ||= ScanInfoData.new(i)
         
     | 
| 
      
 130 
     | 
    
         
            +
                      data = context.data
         
     | 
| 
       124 
131 
     | 
    
         
             
                      if (code.flags & ExpressionCode::Flags::RELATIONAL_EXPRESSION) != 0 or
         
     | 
| 
       125 
     | 
    
         
            -
                          ( 
     | 
| 
       126 
     | 
    
         
            -
                        status =  
     | 
| 
       127 
     | 
    
         
            -
                        data.op =  
     | 
| 
      
 132 
     | 
    
         
            +
                          (not context.have_next?)
         
     | 
| 
      
 133 
     | 
    
         
            +
                        context.status = :start
         
     | 
| 
      
 134 
     | 
    
         
            +
                        data.op = code_op
         
     | 
| 
       128 
135 
     | 
    
         
             
                        data.end = i
         
     | 
| 
       129 
136 
     | 
    
         
             
                        data.call_relational_resolve_indexes
         
     | 
| 
       130 
137 
     | 
    
         
             
                        @data_list << data
         
     | 
| 
       131 
     | 
    
         
            -
                        data = nil
         
     | 
| 
      
 138 
     | 
    
         
            +
                        context.data = nil
         
     | 
| 
       132 
139 
     | 
    
         
             
                      else
         
     | 
| 
       133 
     | 
    
         
            -
                        status =  
     | 
| 
      
 140 
     | 
    
         
            +
                        context.status = :column2
         
     | 
| 
       134 
141 
     | 
    
         
             
                      end
         
     | 
| 
       135 
142 
     | 
    
         
             
                    when Operator::GET_REF
         
     | 
| 
       136 
     | 
    
         
            -
                      data ||= ScanInfoData.new(i)
         
     | 
| 
       137 
     | 
    
         
            -
                      case status
         
     | 
| 
       138 
     | 
    
         
            -
                      when  
     | 
| 
       139 
     | 
    
         
            -
                        data  
     | 
| 
       140 
     | 
    
         
            -
                        status =  
     | 
| 
      
 143 
     | 
    
         
            +
                      context.data ||= ScanInfoData.new(i)
         
     | 
| 
      
 144 
     | 
    
         
            +
                      case context.status
         
     | 
| 
      
 145 
     | 
    
         
            +
                      when :start
         
     | 
| 
      
 146 
     | 
    
         
            +
                        data = context.data
         
     | 
| 
      
 147 
     | 
    
         
            +
                        context.status = :column1
         
     | 
| 
       141 
148 
     | 
    
         
             
                        data.args << code.value
         
     | 
| 
       142 
149 
     | 
    
         
             
                      end
         
     | 
| 
       143 
150 
     | 
    
         
             
                    when Operator::GET_MEMBER
         
     | 
| 
      
 151 
     | 
    
         
            +
                      data = context.data
         
     | 
| 
       144 
152 
     | 
    
         
             
                      index = data.args.pop
         
     | 
| 
       145 
153 
     | 
    
         
             
                      data.start_position = index.value
         
     | 
| 
       146 
     | 
    
         
            -
                      status =  
     | 
| 
      
 154 
     | 
    
         
            +
                      context.status = :column1
         
     | 
| 
      
 155 
     | 
    
         
            +
                    when Operator::NOT
         
     | 
| 
      
 156 
     | 
    
         
            +
                      success = build_not(context, code, i)
         
     | 
| 
      
 157 
     | 
    
         
            +
                      return nil unless success
         
     | 
| 
       147 
158 
     | 
    
         
             
                    end
         
     | 
| 
       148 
159 
     | 
    
         
             
                  end
         
     | 
| 
       149 
160 
     | 
    
         | 
| 
         @@ -157,7 +168,7 @@ module Groonga 
     | 
|
| 
       157 
168 
     | 
    
         
             
                      first_data.logical_op = @operator
         
     | 
| 
       158 
169 
     | 
    
         
             
                    end
         
     | 
| 
       159 
170 
     | 
    
         
             
                  else
         
     | 
| 
       160 
     | 
    
         
            -
                    put_logical_op(@operator, n_codes)
         
     | 
| 
      
 171 
     | 
    
         
            +
                    put_logical_op(@operator, context.n_codes)
         
     | 
| 
       161 
172 
     | 
    
         
             
                  end
         
     | 
| 
       162 
173 
     | 
    
         | 
| 
       163 
174 
     | 
    
         
             
                  optimize
         
     | 
| 
         @@ -167,31 +178,32 @@ module Groonga 
     | 
|
| 
       167 
178 
     | 
    
         
             
                def valid?
         
     | 
| 
       168 
179 
     | 
    
         
             
                  n_relation_expressions = 0
         
     | 
| 
       169 
180 
     | 
    
         
             
                  n_logical_expressions = 0
         
     | 
| 
       170 
     | 
    
         
            -
                  status =  
     | 
| 
       171 
     | 
    
         
            -
                  variable = @expression[0]
         
     | 
| 
      
 181 
     | 
    
         
            +
                  status = :start
         
     | 
| 
       172 
182 
     | 
    
         
             
                  codes = @expression.codes
         
     | 
| 
       173 
183 
     | 
    
         
             
                  codes.each_with_index do |code, i|
         
     | 
| 
       174 
184 
     | 
    
         
             
                    case code.op
         
     | 
| 
       175 
185 
     | 
    
         
             
                    when *RELATION_OPERATORS
         
     | 
| 
       176 
     | 
    
         
            -
                       
     | 
| 
       177 
     | 
    
         
            -
             
     | 
| 
       178 
     | 
    
         
            -
                       
     | 
| 
      
 186 
     | 
    
         
            +
                      if status == :start || status == :var
         
     | 
| 
      
 187 
     | 
    
         
            +
                        return false
         
     | 
| 
      
 188 
     | 
    
         
            +
                      end
         
     | 
| 
      
 189 
     | 
    
         
            +
                      status = :start
         
     | 
| 
       179 
190 
     | 
    
         
             
                      n_relation_expressions += 1
         
     | 
| 
       180 
191 
     | 
    
         
             
                    when *ARITHMETIC_OPERATORS
         
     | 
| 
       181 
     | 
    
         
            -
                       
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
                       
     | 
| 
      
 192 
     | 
    
         
            +
                      if status == :start || status == :var
         
     | 
| 
      
 193 
     | 
    
         
            +
                        return false
         
     | 
| 
      
 194 
     | 
    
         
            +
                      end
         
     | 
| 
      
 195 
     | 
    
         
            +
                      status = :start
         
     | 
| 
       184 
196 
     | 
    
         
             
                      return false if n_relation_expressions != (n_logical_expressions + 1)
         
     | 
| 
       185 
197 
     | 
    
         
             
                    when *LOGICAL_OPERATORS
         
     | 
| 
       186 
198 
     | 
    
         
             
                      case status
         
     | 
| 
       187 
     | 
    
         
            -
                      when  
     | 
| 
      
 199 
     | 
    
         
            +
                      when :start
         
     | 
| 
       188 
200 
     | 
    
         
             
                        n_logical_expressions += 1
         
     | 
| 
       189 
201 
     | 
    
         
             
                        return false if n_logical_expressions >= n_relation_expressions
         
     | 
| 
       190 
     | 
    
         
            -
                      when  
     | 
| 
      
 202 
     | 
    
         
            +
                      when :const
         
     | 
| 
       191 
203 
     | 
    
         
             
                        n_logical_expressions += 1
         
     | 
| 
       192 
204 
     | 
    
         
             
                        n_relation_expressions += 1
         
     | 
| 
       193 
205 
     | 
    
         
             
                        return false if n_logical_expressions >= n_relation_expressions
         
     | 
| 
       194 
     | 
    
         
            -
                        status =  
     | 
| 
      
 206 
     | 
    
         
            +
                        status = :start
         
     | 
| 
       195 
207 
     | 
    
         
             
                      else
         
     | 
| 
       196 
208 
     | 
    
         
             
                        return false
         
     | 
| 
       197 
209 
     | 
    
         
             
                      end
         
     | 
| 
         @@ -199,21 +211,21 @@ module Groonga 
     | 
|
| 
       199 
211 
     | 
    
         
             
                      if code.modify > 0 and
         
     | 
| 
       200 
212 
     | 
    
         
             
                          LOGICAL_OPERATORS.include?(codes[i + code.modify].op)
         
     | 
| 
       201 
213 
     | 
    
         
             
                        n_relation_expressions += 1
         
     | 
| 
       202 
     | 
    
         
            -
                        status =  
     | 
| 
      
 214 
     | 
    
         
            +
                        status = :start
         
     | 
| 
       203 
215 
     | 
    
         
             
                      else
         
     | 
| 
       204 
     | 
    
         
            -
                        if code.value == variable
         
     | 
| 
       205 
     | 
    
         
            -
                          status =  
     | 
| 
      
 216 
     | 
    
         
            +
                        if code.value == @variable
         
     | 
| 
      
 217 
     | 
    
         
            +
                          status = :var
         
     | 
| 
       206 
218 
     | 
    
         
             
                        else
         
     | 
| 
       207 
     | 
    
         
            -
                          status =  
     | 
| 
      
 219 
     | 
    
         
            +
                          status = :const
         
     | 
| 
       208 
220 
     | 
    
         
             
                        end
         
     | 
| 
       209 
221 
     | 
    
         
             
                      end
         
     | 
| 
       210 
222 
     | 
    
         
             
                    when Operator::GET_VALUE
         
     | 
| 
       211 
223 
     | 
    
         
             
                      case status
         
     | 
| 
       212 
     | 
    
         
            -
                      when  
     | 
| 
       213 
     | 
    
         
            -
                        status =  
     | 
| 
       214 
     | 
    
         
            -
                      when  
     | 
| 
       215 
     | 
    
         
            -
                        status =  
     | 
| 
       216 
     | 
    
         
            -
                      when  
     | 
| 
      
 224 
     | 
    
         
            +
                      when :start, :const, :var
         
     | 
| 
      
 225 
     | 
    
         
            +
                        status = :column1
         
     | 
| 
      
 226 
     | 
    
         
            +
                      when :column1
         
     | 
| 
      
 227 
     | 
    
         
            +
                        status = :column2
         
     | 
| 
      
 228 
     | 
    
         
            +
                      when :column2
         
     | 
| 
       217 
229 
     | 
    
         
             
                        # Do nothing
         
     | 
| 
       218 
230 
     | 
    
         
             
                      else
         
     | 
| 
       219 
231 
     | 
    
         
             
                        return false
         
     | 
| 
         @@ -221,32 +233,34 @@ module Groonga 
     | 
|
| 
       221 
233 
     | 
    
         
             
                    when Operator::CALL
         
     | 
| 
       222 
234 
     | 
    
         
             
                      if (code.flags & ExpressionCode::Flags::RELATIONAL_EXPRESSION) != 0 or
         
     | 
| 
       223 
235 
     | 
    
         
             
                          code == codes.last
         
     | 
| 
       224 
     | 
    
         
            -
                        status =  
     | 
| 
      
 236 
     | 
    
         
            +
                        status = :start
         
     | 
| 
       225 
237 
     | 
    
         
             
                        n_relation_expressions += 1
         
     | 
| 
       226 
238 
     | 
    
         
             
                      else
         
     | 
| 
       227 
     | 
    
         
            -
                        status =  
     | 
| 
      
 239 
     | 
    
         
            +
                        status = :column2
         
     | 
| 
       228 
240 
     | 
    
         
             
                      end
         
     | 
| 
       229 
241 
     | 
    
         
             
                    when Operator::GET_REF
         
     | 
| 
       230 
242 
     | 
    
         
             
                      case status
         
     | 
| 
       231 
     | 
    
         
            -
                      when  
     | 
| 
       232 
     | 
    
         
            -
                        status =  
     | 
| 
      
 243 
     | 
    
         
            +
                      when :start
         
     | 
| 
      
 244 
     | 
    
         
            +
                        status = :column1
         
     | 
| 
       233 
245 
     | 
    
         
             
                      else
         
     | 
| 
       234 
246 
     | 
    
         
             
                        return false
         
     | 
| 
       235 
247 
     | 
    
         
             
                      end
         
     | 
| 
       236 
248 
     | 
    
         
             
                    when Operator::GET_MEMBER
         
     | 
| 
       237 
249 
     | 
    
         
             
                      case status
         
     | 
| 
       238 
     | 
    
         
            -
                      when  
     | 
| 
      
 250 
     | 
    
         
            +
                      when :const
         
     | 
| 
       239 
251 
     | 
    
         
             
                        return false unless codes[i - 1].value.value.is_a?(Integer)
         
     | 
| 
       240 
     | 
    
         
            -
                        status =  
     | 
| 
      
 252 
     | 
    
         
            +
                        status = :column1
         
     | 
| 
       241 
253 
     | 
    
         
             
                      else
         
     | 
| 
       242 
254 
     | 
    
         
             
                        return false
         
     | 
| 
       243 
255 
     | 
    
         
             
                      end
         
     | 
| 
      
 256 
     | 
    
         
            +
                    when Operator::NOT
         
     | 
| 
      
 257 
     | 
    
         
            +
                      # Do nothing
         
     | 
| 
       244 
258 
     | 
    
         
             
                    else
         
     | 
| 
       245 
259 
     | 
    
         
             
                      return false
         
     | 
| 
       246 
260 
     | 
    
         
             
                    end
         
     | 
| 
       247 
261 
     | 
    
         
             
                  end
         
     | 
| 
       248 
262 
     | 
    
         | 
| 
       249 
     | 
    
         
            -
                  return false if status !=  
     | 
| 
      
 263 
     | 
    
         
            +
                  return false if status != :start
         
     | 
| 
       250 
264 
     | 
    
         
             
                  return false if n_relation_expressions != (n_logical_expressions + 1)
         
     | 
| 
       251 
265 
     | 
    
         | 
| 
       252 
266 
     | 
    
         
             
                  true
         
     | 
| 
         @@ -315,6 +329,61 @@ module Groonga 
     | 
|
| 
       315 
329 
     | 
    
         
             
                  end
         
     | 
| 
       316 
330 
     | 
    
         
             
                end
         
     | 
| 
       317 
331 
     | 
    
         | 
| 
      
 332 
     | 
    
         
            +
                def build_not(context, code, i)
         
     | 
| 
      
 333 
     | 
    
         
            +
                  last_data = @data_list.last
         
     | 
| 
      
 334 
     | 
    
         
            +
                  return false if last_data.nil?
         
     | 
| 
      
 335 
     | 
    
         
            +
             
     | 
| 
      
 336 
     | 
    
         
            +
                  case last_data.op
         
     | 
| 
      
 337 
     | 
    
         
            +
                  when Operator::LESS
         
     | 
| 
      
 338 
     | 
    
         
            +
                    last_data.op = Operator::GREATER_EQUAL
         
     | 
| 
      
 339 
     | 
    
         
            +
                    last_data.end += 1
         
     | 
| 
      
 340 
     | 
    
         
            +
                  when Operator::LESS_EQUAL
         
     | 
| 
      
 341 
     | 
    
         
            +
                    last_data.op = Operator::GREATER
         
     | 
| 
      
 342 
     | 
    
         
            +
                    last_data.end += 1
         
     | 
| 
      
 343 
     | 
    
         
            +
                  when Operator::GREATER
         
     | 
| 
      
 344 
     | 
    
         
            +
                    last_data.op = Operator::LESS_EQUAL
         
     | 
| 
      
 345 
     | 
    
         
            +
                    last_data.end += 1
         
     | 
| 
      
 346 
     | 
    
         
            +
                  when Operator::GREATER_EQUAL
         
     | 
| 
      
 347 
     | 
    
         
            +
                    last_data.op = Operator::LESS
         
     | 
| 
      
 348 
     | 
    
         
            +
                    last_data.end += 1
         
     | 
| 
      
 349 
     | 
    
         
            +
                  when Operator::NOT_EQUAL
         
     | 
| 
      
 350 
     | 
    
         
            +
                    last_data.op = Operator::EQUAL
         
     | 
| 
      
 351 
     | 
    
         
            +
                    last_data.end += 1
         
     | 
| 
      
 352 
     | 
    
         
            +
                  else
         
     | 
| 
      
 353 
     | 
    
         
            +
                    if @data_list.size == 1
         
     | 
| 
      
 354 
     | 
    
         
            +
                      if last_data.search_indexes.empty?
         
     | 
| 
      
 355 
     | 
    
         
            +
                        if last_data.op == Operator::EQUAL
         
     | 
| 
      
 356 
     | 
    
         
            +
                          last_data.op = Operator::NOT_EQUAL
         
     | 
| 
      
 357 
     | 
    
         
            +
                          last_data.end += 1
         
     | 
| 
      
 358 
     | 
    
         
            +
                        else
         
     | 
| 
      
 359 
     | 
    
         
            +
                          return false
         
     | 
| 
      
 360 
     | 
    
         
            +
                        end
         
     | 
| 
      
 361 
     | 
    
         
            +
                      else
         
     | 
| 
      
 362 
     | 
    
         
            +
                        last_data.logical_op = Operator::AND_NOT
         
     | 
| 
      
 363 
     | 
    
         
            +
                        last_data.flags &= ~ScanInfo::Flags::PUSH
         
     | 
| 
      
 364 
     | 
    
         
            +
                        @data_list.unshift(create_all_match_data)
         
     | 
| 
      
 365 
     | 
    
         
            +
                      end
         
     | 
| 
      
 366 
     | 
    
         
            +
                    else
         
     | 
| 
      
 367 
     | 
    
         
            +
                      next_code = context.code
         
     | 
| 
      
 368 
     | 
    
         
            +
                      return false if next_code.nil?
         
     | 
| 
      
 369 
     | 
    
         
            +
             
     | 
| 
      
 370 
     | 
    
         
            +
                      case next_code.op
         
     | 
| 
      
 371 
     | 
    
         
            +
                      when Operator::AND
         
     | 
| 
      
 372 
     | 
    
         
            +
                        context.code_op = Operator::AND_NOT
         
     | 
| 
      
 373 
     | 
    
         
            +
                      when Operator::AND_NOT
         
     | 
| 
      
 374 
     | 
    
         
            +
                        context.code_op = Operator::AND
         
     | 
| 
      
 375 
     | 
    
         
            +
                      when Operator::OR
         
     | 
| 
      
 376 
     | 
    
         
            +
                        @data_list[-1, 0] = create_all_match_data
         
     | 
| 
      
 377 
     | 
    
         
            +
                        put_logical_op(Operator::AND_NOT, i)
         
     | 
| 
      
 378 
     | 
    
         
            +
                      else
         
     | 
| 
      
 379 
     | 
    
         
            +
                        return false
         
     | 
| 
      
 380 
     | 
    
         
            +
                      end
         
     | 
| 
      
 381 
     | 
    
         
            +
                    end
         
     | 
| 
      
 382 
     | 
    
         
            +
                  end
         
     | 
| 
      
 383 
     | 
    
         
            +
             
     | 
| 
      
 384 
     | 
    
         
            +
                  true
         
     | 
| 
      
 385 
     | 
    
         
            +
                end
         
     | 
| 
      
 386 
     | 
    
         
            +
             
     | 
| 
       318 
387 
     | 
    
         
             
                def optimize
         
     | 
| 
       319 
388 
     | 
    
         
             
                  optimized_data_list = []
         
     | 
| 
       320 
389 
     | 
    
         
             
                  i = 0
         
     | 
| 
         @@ -335,7 +404,45 @@ module Groonga 
     | 
|
| 
       335 
404 
     | 
    
         
             
                    end
         
     | 
| 
       336 
405 
     | 
    
         
             
                    optimized_data_list << data
         
     | 
| 
       337 
406 
     | 
    
         
             
                  end
         
     | 
| 
       338 
     | 
    
         
            -
             
     | 
| 
      
 407 
     | 
    
         
            +
             
     | 
| 
      
 408 
     | 
    
         
            +
                  optimize_by_estimated_size(optimized_data_list)
         
     | 
| 
      
 409 
     | 
    
         
            +
                end
         
     | 
| 
      
 410 
     | 
    
         
            +
             
     | 
| 
      
 411 
     | 
    
         
            +
                def optimize_by_estimated_size(data_list)
         
     | 
| 
      
 412 
     | 
    
         
            +
                  return data_list unless Groonga::ORDER_BY_ESTIMATED_SIZE
         
     | 
| 
      
 413 
     | 
    
         
            +
             
     | 
| 
      
 414 
     | 
    
         
            +
                  start_index = nil
         
     | 
| 
      
 415 
     | 
    
         
            +
                  data_list.size.times do |i|
         
     | 
| 
      
 416 
     | 
    
         
            +
                    data = data_list[i]
         
     | 
| 
      
 417 
     | 
    
         
            +
                    if data.logical_op != Operator::AND
         
     | 
| 
      
 418 
     | 
    
         
            +
                      if start_index.nil?
         
     | 
| 
      
 419 
     | 
    
         
            +
                        start_index = i
         
     | 
| 
      
 420 
     | 
    
         
            +
                      else
         
     | 
| 
      
 421 
     | 
    
         
            +
                        sort_by_estimated_size!(data_list, start_index...i)
         
     | 
| 
      
 422 
     | 
    
         
            +
                        start_index = nil
         
     | 
| 
      
 423 
     | 
    
         
            +
                      end
         
     | 
| 
      
 424 
     | 
    
         
            +
                    end
         
     | 
| 
      
 425 
     | 
    
         
            +
                  end
         
     | 
| 
      
 426 
     | 
    
         
            +
                  unless start_index.nil?
         
     | 
| 
      
 427 
     | 
    
         
            +
                    sort_by_estimated_size!(data_list, start_index...data_list.size)
         
     | 
| 
      
 428 
     | 
    
         
            +
                  end
         
     | 
| 
      
 429 
     | 
    
         
            +
                  data_list
         
     | 
| 
      
 430 
     | 
    
         
            +
                end
         
     | 
| 
      
 431 
     | 
    
         
            +
             
     | 
| 
      
 432 
     | 
    
         
            +
                def sort_by_estimated_size!(data_list, range)
         
     | 
| 
      
 433 
     | 
    
         
            +
                  target_data_list = data_list[range]
         
     | 
| 
      
 434 
     | 
    
         
            +
                  return if target_data_list.size < 2
         
     | 
| 
      
 435 
     | 
    
         
            +
             
     | 
| 
      
 436 
     | 
    
         
            +
                  start_logical_op = target_data_list.first.logical_op
         
     | 
| 
      
 437 
     | 
    
         
            +
                  sorted_data_list = target_data_list.sort_by do |data|
         
     | 
| 
      
 438 
     | 
    
         
            +
                    estimator = ScanInfoDataSizeEstimator.new(data, @table)
         
     | 
| 
      
 439 
     | 
    
         
            +
                    estimator.estimate
         
     | 
| 
      
 440 
     | 
    
         
            +
                  end
         
     | 
| 
      
 441 
     | 
    
         
            +
                  sorted_data_list.each do |sorted_data|
         
     | 
| 
      
 442 
     | 
    
         
            +
                    sorted_data.logical_op = Operator::AND
         
     | 
| 
      
 443 
     | 
    
         
            +
                  end
         
     | 
| 
      
 444 
     | 
    
         
            +
                  sorted_data_list.first.logical_op = start_logical_op
         
     | 
| 
      
 445 
     | 
    
         
            +
                  data_list[range] = sorted_data_list
         
     | 
| 
       339 
446 
     | 
    
         
             
                end
         
     | 
| 
       340 
447 
     | 
    
         | 
| 
       341 
448 
     | 
    
         
             
                def range_operations?(data, next_data)
         
     | 
| 
         @@ -371,6 +478,17 @@ module Groonga 
     | 
|
| 
       371 
478 
     | 
    
         
             
                  end
         
     | 
| 
       372 
479 
     | 
    
         
             
                end
         
     | 
| 
       373 
480 
     | 
    
         | 
| 
      
 481 
     | 
    
         
            +
                def create_all_match_data
         
     | 
| 
      
 482 
     | 
    
         
            +
                  data = ScanInfoData.new(0)
         
     | 
| 
      
 483 
     | 
    
         
            +
                  data.end = 0
         
     | 
| 
      
 484 
     | 
    
         
            +
                  data.flags = ScanInfo::Flags::PUSH
         
     | 
| 
      
 485 
     | 
    
         
            +
                  data.op = Operator::CALL
         
     | 
| 
      
 486 
     | 
    
         
            +
                  data.logical_op = Operator::OR
         
     | 
| 
      
 487 
     | 
    
         
            +
                  data.args = [Context.instance["all_records"]]
         
     | 
| 
      
 488 
     | 
    
         
            +
                  data.search_indexes = []
         
     | 
| 
      
 489 
     | 
    
         
            +
                  data
         
     | 
| 
      
 490 
     | 
    
         
            +
                end
         
     | 
| 
      
 491 
     | 
    
         
            +
             
     | 
| 
       374 
492 
     | 
    
         
             
                def create_between_data(data, next_data)
         
     | 
| 
       375 
493 
     | 
    
         
             
                  between_data = ScanInfoData.new(data.start)
         
     | 
| 
       376 
494 
     | 
    
         
             
                  between_data.end = next_data.end + 1
         
     | 
| 
         @@ -418,5 +536,41 @@ module Groonga 
     | 
|
| 
       418 
536 
     | 
    
         
             
                    @expression.allocate_constant(max_border),
         
     | 
| 
       419 
537 
     | 
    
         
             
                  ]
         
     | 
| 
       420 
538 
     | 
    
         
             
                end
         
     | 
| 
      
 539 
     | 
    
         
            +
             
     | 
| 
      
 540 
     | 
    
         
            +
                class BuildContext
         
     | 
| 
      
 541 
     | 
    
         
            +
                  attr_accessor :status
         
     | 
| 
      
 542 
     | 
    
         
            +
                  attr_reader :codes
         
     | 
| 
      
 543 
     | 
    
         
            +
                  attr_reader :n_codes
         
     | 
| 
      
 544 
     | 
    
         
            +
                  attr_reader :i
         
     | 
| 
      
 545 
     | 
    
         
            +
                  attr_writer :code_op
         
     | 
| 
      
 546 
     | 
    
         
            +
                  attr_accessor :data
         
     | 
| 
      
 547 
     | 
    
         
            +
                  def initialize(expression)
         
     | 
| 
      
 548 
     | 
    
         
            +
                    @expression = expression
         
     | 
| 
      
 549 
     | 
    
         
            +
                    @status = :start
         
     | 
| 
      
 550 
     | 
    
         
            +
                    @current_data = nil
         
     | 
| 
      
 551 
     | 
    
         
            +
                    @codes = @expression.codes
         
     | 
| 
      
 552 
     | 
    
         
            +
                    @n_codes = @codes.size
         
     | 
| 
      
 553 
     | 
    
         
            +
                    @i = 0
         
     | 
| 
      
 554 
     | 
    
         
            +
                    @code_op = nil
         
     | 
| 
      
 555 
     | 
    
         
            +
                    @data = nil
         
     | 
| 
      
 556 
     | 
    
         
            +
                  end
         
     | 
| 
      
 557 
     | 
    
         
            +
             
     | 
| 
      
 558 
     | 
    
         
            +
                  def have_next?
         
     | 
| 
      
 559 
     | 
    
         
            +
                    @i < @n_codes
         
     | 
| 
      
 560 
     | 
    
         
            +
                  end
         
     | 
| 
      
 561 
     | 
    
         
            +
             
     | 
| 
      
 562 
     | 
    
         
            +
                  def next
         
     | 
| 
      
 563 
     | 
    
         
            +
                    @i += 1
         
     | 
| 
      
 564 
     | 
    
         
            +
                    @code_op = nil
         
     | 
| 
      
 565 
     | 
    
         
            +
                  end
         
     | 
| 
      
 566 
     | 
    
         
            +
             
     | 
| 
      
 567 
     | 
    
         
            +
                  def code
         
     | 
| 
      
 568 
     | 
    
         
            +
                    @codes[@i]
         
     | 
| 
      
 569 
     | 
    
         
            +
                  end
         
     | 
| 
      
 570 
     | 
    
         
            +
             
     | 
| 
      
 571 
     | 
    
         
            +
                  def code_op
         
     | 
| 
      
 572 
     | 
    
         
            +
                    @code_op || code.op
         
     | 
| 
      
 573 
     | 
    
         
            +
                  end
         
     | 
| 
      
 574 
     | 
    
         
            +
                end
         
     | 
| 
       421 
575 
     | 
    
         
             
              end
         
     | 
| 
       422 
576 
     | 
    
         
             
            end
         
     |