rroonga 4.0.8-x86-mingw32 → 5.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/doc/text/news.textile +19 -0
- data/ext/groonga/rb-grn-exception.c +35 -1
- data/ext/groonga/rb-grn-normalizer.c +37 -7
- data/ext/groonga/rb-grn-table.c +106 -35
- data/ext/groonga/rb-grn.h +3 -2
- data/lib/1.9/groonga.so +0 -0
- data/lib/2.0/groonga.so +0 -0
- data/lib/2.1/groonga.so +0 -0
- data/lib/groonga/record.rb +45 -1
- data/rroonga-build.rb +6 -5
- data/test/groonga-test-utils.rb +9 -0
- data/test/test-array.rb +11 -0
- data/test/test-exception.rb +3 -1
- data/test/test-normalizer.rb +28 -0
- data/test/test-record.rb +34 -0
- data/test/test-table-group.rb +366 -0
- data/test/test-table.rb +0 -182
- data/vendor/local/bin/grndb.exe +0 -0
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/libmsgpack-3.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/libonig-5.dll +0 -0
- data/vendor/local/bin/libstdc++-6.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/onig-config +1 -1
- data/vendor/local/bin/zlib1.dll +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
- data/vendor/local/include/groonga/groonga.h +2 -1
- data/vendor/local/include/groonga/groonga/command.h +79 -0
- data/vendor/local/include/groonga/groonga/groonga.h +32 -74
- data/vendor/local/include/groonga/groonga/output.h +108 -0
- data/vendor/local/include/groonga/groonga/plugin.h +18 -3
- 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 +3 -3
- data/vendor/local/lib/groonga/plugins/ruby/eval.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/eval.la +3 -3
- data/vendor/local/lib/groonga/plugins/ruby/load.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/ruby/load.la +3 -3
- data/vendor/local/lib/groonga/plugins/sharding.rb +3 -0
- data/vendor/local/lib/groonga/plugins/sharding/logical_count.rb +157 -0
- data/vendor/local/lib/groonga/plugins/sharding/logical_enumerator.rb +170 -0
- data/vendor/local/lib/groonga/plugins/sharding/logical_range_filter.rb +50 -0
- 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 +3 -3
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +3 -3
- 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 +3 -3
- 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 +3 -3
- data/vendor/local/lib/groonga/scripts/ruby/command.rb +35 -0
- data/vendor/local/lib/groonga/scripts/ruby/{command → command_line}/grndb.rb +1 -1
- data/vendor/local/lib/groonga/scripts/ruby/context.rb +29 -8
- data/vendor/local/lib/groonga/scripts/ruby/context/rc.rb +166 -76
- data/vendor/local/lib/groonga/scripts/ruby/database.rb +16 -4
- data/vendor/local/lib/groonga/scripts/ruby/error.rb +16 -0
- data/vendor/local/lib/groonga/scripts/ruby/index_cursor.rb +18 -0
- data/vendor/local/lib/groonga/scripts/ruby/initialize/post.rb +10 -0
- data/vendor/local/lib/groonga/scripts/ruby/logger.rb +5 -1
- data/vendor/local/lib/groonga/scripts/ruby/plugin_loader.rb +14 -0
- data/vendor/local/lib/groonga/scripts/ruby/require.rb +1 -1
- data/vendor/local/lib/groonga/scripts/ruby/scan_info_builder.rb +3 -3
- data/vendor/local/lib/groonga/scripts/ruby/scan_info_data.rb +4 -2
- data/vendor/local/lib/groonga/scripts/ruby/table_cursor.rb +15 -0
- data/vendor/local/lib/groonga/scripts/ruby/writer.rb +21 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +3 -3
- 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/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +2 -2
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +2 -2
- data/vendor/local/lib/libonig.a +0 -0
- data/vendor/local/lib/libonig.dll.a +0 -0
- data/vendor/local/lib/libonig.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/msgpack.pc +1 -1
- data/vendor/local/lib/pkgconfig/oniguruma.pc +6 -6
- data/vendor/local/lib/pkgconfig/zlib.pc +3 -3
- 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/sbin/groonga-httpd-restart +1 -1
- data/vendor/local/sbin/groonga-httpd.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +5 -5
- 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 +4 -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 +16 -570
- data/vendor/local/share/doc/groonga/en/html/_sources/news/2.x.txt +5 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/news/3.x.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/news/4.x.txt +686 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +0 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ctx.txt +3 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/column.txt +12 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/index.txt +19 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/pseudo.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/scalar.txt +19 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +734 -29
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/html_untag.txt +2 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/query_syntax.txt +8 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/script_syntax.txt +50 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/suggest/completion.txt +25 -23
- data/vendor/local/share/doc/groonga/en/html/_sources/server/http.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +68 -6
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +26 -1
- data/vendor/local/share/doc/groonga/en/html/_static/down-pressed.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/down.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/file.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/jquery-1.11.1.js +10308 -0
- data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +4 -2
- data/vendor/local/share/doc/groonga/en/html/_static/minus.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/plus.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +2 -2
- data/vendor/local/share/doc/groonga/en/html/_static/underscore-1.3.1.js +999 -0
- data/vendor/local/share/doc/groonga/en/html/_static/up-pressed.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/up.png +0 -0
- data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +15 -15
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/client.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/community.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/introduction.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/development.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/genindex.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/index.html +86 -78
- data/vendor/local/share/doc/groonga/en/html/install.html +36 -34
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +31 -29
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +28 -26
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +33 -30
- data/vendor/local/share/doc/groonga/en/html/install/others.html +90 -88
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +25 -23
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +28 -26
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +33 -31
- data/vendor/local/share/doc/groonga/en/html/limitations.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/news.html +99 -641
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +35 -33
- data/vendor/local/share/doc/groonga/en/html/news/1.3.x.html +30 -28
- data/vendor/local/share/doc/groonga/en/html/news/2.x.html +103 -100
- data/vendor/local/share/doc/groonga/en/html/news/3.x.html +72 -70
- data/vendor/local/share/doc/groonga/en/html/news/4.x.html +873 -0
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +83 -75
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +40 -38
- data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +34 -32
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +46 -44
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +68 -66
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +30 -28
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_content_type.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +66 -62
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +36 -34
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +31 -29
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +67 -65
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +29 -27
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +32 -30
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +30 -28
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +29 -27
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +29 -27
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +28 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +77 -75
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +32 -30
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +63 -61
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +52 -50
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +28 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +25 -23
- data/vendor/local/share/doc/groonga/en/html/reference/api/plugin.html +43 -41
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/column.html +35 -33
- data/vendor/local/share/doc/groonga/en/html/reference/columns/index.html +152 -0
- data/vendor/local/share/doc/groonga/en/html/reference/columns/pseudo.html +56 -29
- data/vendor/local/share/doc/groonga/en/html/reference/columns/scalar.html +152 -0
- data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +121 -94
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +55 -53
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +56 -54
- data/vendor/local/share/doc/groonga/en/html/reference/command/request_id.html +25 -23
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +97 -95
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +41 -39
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +46 -44
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +26 -24
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +42 -40
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +74 -72
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +44 -42
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +40 -38
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +36 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +25 -23
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +43 -41
- data/vendor/local/share/doc/groonga/en/html/reference/commands/lock_clear.html +34 -32
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +26 -24
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +25 -23
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +62 -60
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalizer_list.html +32 -30
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +24 -22
- data/vendor/local/share/doc/groonga/en/html/reference/commands/range_filter.html +24 -22
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +37 -35
- data/vendor/local/share/doc/groonga/en/html/reference/commands/request_cancel.html +54 -52
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +3069 -567
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +24 -22
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +66 -64
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +123 -121
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +36 -34
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +26 -24
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_tokenize.html +46 -44
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +82 -80
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenizer_list.html +32 -30
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +39 -37
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +22 -20
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grndb.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +24 -22
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +29 -27
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +76 -74
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +45 -43
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +37 -35
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +58 -56
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +43 -41
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +22 -20
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +82 -80
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +33 -31
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +23 -21
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_full.html +54 -52
- data/vendor/local/share/doc/groonga/en/html/reference/functions/highlight_html.html +42 -40
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +32 -29
- data/vendor/local/share/doc/groonga/en/html/reference/functions/in_values.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +49 -47
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +45 -43
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +42 -40
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +27 -25
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +219 -216
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +430 -381
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +22 -20
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +23 -21
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +52 -50
- data/vendor/local/share/doc/groonga/en/html/reference/operations.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/operations/geolocation_search.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +35 -33
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +58 -56
- data/vendor/local/share/doc/groonga/en/html/reference/suggest.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/completion.html +46 -41
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/correction.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/introduction.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/suggest/suggestion.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +55 -53
- data/vendor/local/share/doc/groonga/en/html/reference/token_filters.html +39 -37
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +30 -28
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/search.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/server/http.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +34 -32
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/server/package.html +34 -32
- data/vendor/local/share/doc/groonga/en/html/spec.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +128 -126
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +34 -32
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +23 -21
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +24 -22
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +53 -51
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +20 -18
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +21 -19
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +23 -21
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +37 -35
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +5 -5
- 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 +4 -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 +16 -570
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/2.x.txt +5 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/3.x.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/4.x.txt +686 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +0 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ctx.txt +3 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/column.txt +12 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/index.txt +19 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/pseudo.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/scalar.txt +19 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +734 -29
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/html_untag.txt +2 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/query_syntax.txt +8 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/script_syntax.txt +50 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/suggest/completion.txt +25 -23
- data/vendor/local/share/doc/groonga/ja/html/_sources/server/http.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +68 -6
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +26 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/down-pressed.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/down.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/file.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/jquery-1.11.1.js +10308 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +4 -2
- data/vendor/local/share/doc/groonga/ja/html/_static/minus.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/plus.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_static/underscore-1.3.1.js +999 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/up-pressed.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/up.png +0 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +15 -15
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/client.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/community.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +23 -21
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/introduction.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/development.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +23 -21
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +17 -17
- data/vendor/local/share/doc/groonga/ja/html/index.html +88 -80
- data/vendor/local/share/doc/groonga/ja/html/install.html +36 -34
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +40 -38
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +30 -29
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +81 -79
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +31 -30
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +32 -30
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/news.html +85 -677
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +36 -34
- data/vendor/local/share/doc/groonga/ja/html/news/1.3.x.html +30 -28
- data/vendor/local/share/doc/groonga/ja/html/news/2.x.html +94 -92
- data/vendor/local/share/doc/groonga/ja/html/news/3.x.html +62 -60
- data/vendor/local/share/doc/groonga/ja/html/news/4.x.html +911 -0
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +85 -77
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +40 -38
- data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +34 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +42 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +70 -68
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +30 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_content_type.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +62 -60
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +42 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +62 -60
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +29 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +32 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +30 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +29 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +29 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +28 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +78 -76
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +32 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +63 -61
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +52 -50
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +28 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +25 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/api/plugin.html +43 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/column.html +35 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/index.html +153 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/pseudo.html +56 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/scalar.html +153 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +111 -84
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +56 -54
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +50 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/command/request_id.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +100 -98
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +46 -44
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +26 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +42 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +66 -64
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +41 -39
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +40 -38
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +35 -33
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +25 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +36 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/lock_clear.html +38 -37
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +26 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +25 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +57 -55
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalizer_list.html +32 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/range_filter.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +34 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/request_cancel.html +59 -57
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +2832 -427
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +25 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +64 -62
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +99 -97
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +36 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +26 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_tokenize.html +41 -39
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +67 -65
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenizer_list.html +32 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +40 -39
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +22 -20
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grndb.html +50 -45
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +29 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +64 -62
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +45 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +37 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +58 -56
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +43 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +22 -20
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +70 -68
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +33 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +23 -21
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_full.html +44 -42
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/highlight_html.html +33 -31
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/in_values.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +42 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +34 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +24 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +119 -117
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +341 -301
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +23 -21
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +46 -44
- data/vendor/local/share/doc/groonga/ja/html/reference/operations.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/operations/geolocation_search.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +37 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/completion.html +35 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/correction.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/introduction.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/suggest/suggestion.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +45 -43
- data/vendor/local/share/doc/groonga/ja/html/reference/token_filters.html +36 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +30 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/search.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +22 -20
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +28 -26
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +35 -33
- data/vendor/local/share/doc/groonga/ja/html/spec.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +127 -125
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +25 -23
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +33 -31
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +20 -18
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +27 -25
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +50 -48
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +21 -19
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +23 -21
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +35 -33
- data/vendor/local/share/man/ja/man1/groonga.1 +6711 -3135
- data/vendor/local/share/man/man1/groonga.1 +7192 -3297
- metadata +33 -4
@@ -7,7 +7,7 @@
|
|
7
7
|
<head>
|
8
8
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
9
9
|
|
10
|
-
<title>7.11.2. Script syntax — Groonga
|
10
|
+
<title>7.11.2. Script syntax — Groonga v5.0.0 documentation</title>
|
11
11
|
|
12
12
|
<link rel="stylesheet" href="../../_static/groonga.css" type="text/css" />
|
13
13
|
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<script type="text/javascript">
|
16
16
|
var DOCUMENTATION_OPTIONS = {
|
17
17
|
URL_ROOT: '../../',
|
18
|
-
VERSION: '
|
18
|
+
VERSION: '5.0.0',
|
19
19
|
COLLAPSE_INDEX: false,
|
20
20
|
FILE_SUFFIX: '.html',
|
21
21
|
HAS_SOURCE: true
|
@@ -25,12 +25,12 @@
|
|
25
25
|
<script type="text/javascript" src="../../_static/underscore.js"></script>
|
26
26
|
<script type="text/javascript" src="../../_static/doctools.js"></script>
|
27
27
|
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
|
28
|
-
<link rel="top" title="Groonga
|
28
|
+
<link rel="top" title="Groonga v5.0.0 documentation" href="../../index.html" />
|
29
29
|
<link rel="up" title="7.11. grn_expr" href="../grn_expr.html" />
|
30
30
|
<link rel="next" title="7.12. Function" href="../function.html" />
|
31
31
|
<link rel="prev" title="7.11.1. Query syntax" href="query_syntax.html" />
|
32
32
|
</head>
|
33
|
-
<body>
|
33
|
+
<body role="document">
|
34
34
|
<div class="header">
|
35
35
|
<h1 class="title">
|
36
36
|
<a id="top-link" href="../../index.html">
|
@@ -48,7 +48,7 @@
|
|
48
48
|
</div>
|
49
49
|
|
50
50
|
|
51
|
-
<div class="related">
|
51
|
+
<div class="related" role="navigation" aria-label="related navigation">
|
52
52
|
<h3>Navigation</h3>
|
53
53
|
<ul>
|
54
54
|
<li class="right" style="margin-right: 10px">
|
@@ -60,7 +60,7 @@
|
|
60
60
|
<li class="right" >
|
61
61
|
<a href="query_syntax.html" title="7.11.1. Query syntax"
|
62
62
|
accesskey="P">previous</a> |</li>
|
63
|
-
<li><a href="../../index.html">Groonga
|
63
|
+
<li><a href="../../index.html">Groonga v5.0.0 documentation</a> »</li>
|
64
64
|
<li><a href="../../reference.html" >7. Reference manual</a> »</li>
|
65
65
|
<li><a href="../grn_expr.html" accesskey="U">7.11. grn_expr</a> »</li>
|
66
66
|
</ul>
|
@@ -69,24 +69,70 @@
|
|
69
69
|
<div class="document">
|
70
70
|
<div class="documentwrapper">
|
71
71
|
<div class="bodywrapper">
|
72
|
-
<div class="body">
|
72
|
+
<div class="body" role="main">
|
73
73
|
|
74
74
|
<div class="section" id="script-syntax">
|
75
75
|
<h1>7.11.2. Script syntax<a class="headerlink" href="#script-syntax" title="Permalink to this headline">¶</a></h1>
|
76
76
|
<p>Script syntax is a syntax to specify complex search condition. It is
|
77
|
-
similar to ECMAScript. For example, <
|
78
|
-
groonga searches records that <
|
77
|
+
similar to ECMAScript. For example, <code class="docutils literal"><span class="pre">_key</span> <span class="pre">==</span> <span class="pre">"book"</span></code> means that
|
78
|
+
groonga searches records that <code class="docutils literal"><span class="pre">_key</span></code> value is <code class="docutils literal"><span class="pre">"book"</span></code>. All values
|
79
79
|
are string in <a class="reference internal" href="query_syntax.html"><em>Query syntax</em></a> but its own type in script
|
80
|
-
syntax. For example, <
|
81
|
-
<
|
80
|
+
syntax. For example, <code class="docutils literal"><span class="pre">"book"</span></code> is string, <code class="docutils literal"><span class="pre">1</span></code> is integer,
|
81
|
+
<code class="docutils literal"><span class="pre">TokenBigram</span></code> is the object whose name is <code class="docutils literal"><span class="pre">TokenBigram</span></code> and so on.</p>
|
82
82
|
<p>Script syntax doesn't support full ECMAScript syntax. For example,
|
83
|
-
script syntax doesn't support statement such as <
|
84
|
-
statement, <
|
83
|
+
script syntax doesn't support statement such as <code class="docutils literal"><span class="pre">if</span></code> control
|
84
|
+
statement, <code class="docutils literal"><span class="pre">for</span></code> iteration statement and variable definition
|
85
85
|
statement. Function definion is not supported too. But script syntax
|
86
86
|
addes the original additional operators. They are described after
|
87
87
|
ECMAScript syntax is described.</p>
|
88
|
+
<div class="section" id="security">
|
89
|
+
<span id="script-syntax-security"></span><h2>7.11.2.1. Security<a class="headerlink" href="#security" title="Permalink to this headline">¶</a></h2>
|
90
|
+
<p>For security reason, you should not pass an input from users to
|
91
|
+
Groonga directly. If there is an evil user, the user may input a query
|
92
|
+
that retrieves records that should not be shown to the user.</p>
|
93
|
+
<p>Think about the following case.</p>
|
94
|
+
<p>A Groonga application constructs a Groonga request by the following
|
95
|
+
program:</p>
|
96
|
+
<div class="highlight-none"><div class="highlight"><pre>filter = "column @ \"#{user_input}\""
|
97
|
+
select_options = {
|
98
|
+
# ...
|
99
|
+
:filter => filter,
|
100
|
+
}
|
101
|
+
groonga_client.select(select_options)
|
102
|
+
</pre></div>
|
103
|
+
</div>
|
104
|
+
<p><code class="docutils literal"><span class="pre">user_input</span></code> is an input from user. If the input is <code class="docutils literal"><span class="pre">query</span></code>,
|
105
|
+
here is the constructed <a class="reference internal" href="../commands/select.html#select-filter"><em>filter</em></a> parameter:</p>
|
106
|
+
<div class="highlight-none"><div class="highlight"><pre>column @ "query"
|
107
|
+
</pre></div>
|
108
|
+
</div>
|
109
|
+
<p>If the input is <code class="docutils literal"><span class="pre">x"</span> <span class="pre">||</span> <span class="pre">true</span> <span class="pre">||</span> <span class="pre">"</span></code>, here is the constructed
|
110
|
+
ref:<cite>select-filter</cite> parameter:</p>
|
111
|
+
<div class="highlight-none"><div class="highlight"><pre>column @ "x" || true || ""
|
112
|
+
</pre></div>
|
113
|
+
</div>
|
114
|
+
<p>This query matches to all records. The user will get all records from
|
115
|
+
your database. The user may be evil.</p>
|
116
|
+
<p>It's better that you just receive an user input as a value. It means
|
117
|
+
that you don't accept that user input can contain operator such as
|
118
|
+
<code class="docutils literal"><span class="pre">@</span></code> and <code class="docutils literal"><span class="pre">&&</span></code>. If you accept operator, user can create evil query.</p>
|
119
|
+
<p>If user input has only value, you blocks evil query by escaping user
|
120
|
+
input value. Here is a list how to escape user input value:</p>
|
121
|
+
<blockquote>
|
122
|
+
<div><ul class="simple">
|
123
|
+
<li>True value: Convert it to <code class="docutils literal"><span class="pre">true</span></code>.</li>
|
124
|
+
<li>False value: Convert it to <code class="docutils literal"><span class="pre">false</span></code>.</li>
|
125
|
+
<li>Numerical value: Convert it to number. For example, <code class="docutils literal"><span class="pre">1.2</span></code> should
|
126
|
+
be converted to <code class="docutils literal"><span class="pre">1.2</span></code>.</li>
|
127
|
+
<li>String value: Replace <code class="docutils literal"><span class="pre">"</span></code> with <code class="docutils literal"><span class="pre">\"</span></code> and <code class="docutils literal"><span class="pre">\</span></code> with <code class="docutils literal"><span class="pre">\\</span></code> in
|
128
|
+
the string value and surround substituted string value by
|
129
|
+
<code class="docutils literal"><span class="pre">"</span></code>. For example, <code class="docutils literal"><span class="pre">double</span> <span class="pre">"</span> <span class="pre">quote</span> <span class="pre">and</span> <span class="pre">back</span> <span class="pre">\</span> <span class="pre">slash</span></code> should be
|
130
|
+
converted to <code class="docutils literal"><span class="pre">"double</span> <span class="pre">\"</span> <span class="pre">quote</span> <span class="pre">and</span> <span class="pre">back</span> <span class="pre">\\</span> <span class="pre">slash"</span></code>.</li>
|
131
|
+
</ul>
|
132
|
+
</div></blockquote>
|
133
|
+
</div>
|
88
134
|
<div class="section" id="sample-data">
|
89
|
-
<h2>7.11.2.
|
135
|
+
<h2>7.11.2.2. Sample data<a class="headerlink" href="#sample-data" title="Permalink to this headline">¶</a></h2>
|
90
136
|
<p>Here are a schema definition and sample data to show usage.</p>
|
91
137
|
<p>Execution example:</p>
|
92
138
|
<div class="highlight-none"><div class="highlight"><pre>table_create Entries TABLE_PAT_KEY ShortText
|
@@ -122,79 +168,79 @@ load --table Entries
|
|
122
168
|
# [[0, 1337566253.89858, 0.000355720520019531], 5]
|
123
169
|
</pre></div>
|
124
170
|
</div>
|
125
|
-
<p>There is a table, <
|
171
|
+
<p>There is a table, <code class="docutils literal"><span class="pre">Entries</span></code>, for blog entries. An entry has title,
|
126
172
|
content and the number of likes for the entry. Title is key of
|
127
|
-
<
|
128
|
-
number of likes is value of <
|
129
|
-
<p><
|
130
|
-
using <
|
131
|
-
<
|
173
|
+
<code class="docutils literal"><span class="pre">Entries</span></code>. Content is value of <code class="docutils literal"><span class="pre">Entries.content</span></code> column. The
|
174
|
+
number of likes is value of <code class="docutils literal"><span class="pre">Entries.n_likes</span></code> column.</p>
|
175
|
+
<p><code class="docutils literal"><span class="pre">Entries._key</span></code> column and <code class="docutils literal"><span class="pre">Entries.content</span></code> column are indexed
|
176
|
+
using <code class="docutils literal"><span class="pre">TokenBigram</span></code> tokenizer. So both <code class="docutils literal"><span class="pre">Entries._key</span></code> and
|
177
|
+
<code class="docutils literal"><span class="pre">Entries.content</span></code> are fulltext search ready.</p>
|
132
178
|
<p>OK. The schema and data for examples are ready.</p>
|
133
179
|
</div>
|
134
180
|
<div class="section" id="literals">
|
135
|
-
<h2>7.11.2.
|
181
|
+
<h2>7.11.2.3. Literals<a class="headerlink" href="#literals" title="Permalink to this headline">¶</a></h2>
|
136
182
|
<div class="section" id="integer">
|
137
|
-
<h3>7.11.2.
|
138
|
-
<p>Integer literal is sequence of <
|
139
|
-
<
|
140
|
-
<
|
183
|
+
<h3>7.11.2.3.1. Integer<a class="headerlink" href="#integer" title="Permalink to this headline">¶</a></h3>
|
184
|
+
<p>Integer literal is sequence of <code class="docutils literal"><span class="pre">0</span></code> to <code class="docutils literal"><span class="pre">9</span></code> such as
|
185
|
+
<code class="docutils literal"><span class="pre">1234567890</span></code>. <code class="docutils literal"><span class="pre">+</span></code> or <code class="docutils literal"><span class="pre">-</span></code> can be prepended as sign such as
|
186
|
+
<code class="docutils literal"><span class="pre">+29</span></code> and <code class="docutils literal"><span class="pre">-29</span></code>. Integer literal must be decimal. Octal notation,
|
141
187
|
hex and so on can't be used.</p>
|
142
|
-
<p>The maximum value of integer literal is <
|
143
|
-
<span class="pre">**</span> <span class="pre">63</span> <span class="pre">-</span> <span class="pre">1</span></
|
144
|
-
<
|
188
|
+
<p>The maximum value of integer literal is <code class="docutils literal"><span class="pre">9223372036854775807</span></code> (<code class="docutils literal"><span class="pre">=</span> <span class="pre">2</span>
|
189
|
+
<span class="pre">**</span> <span class="pre">63</span> <span class="pre">-</span> <span class="pre">1</span></code>). The minimum value of integer literal is
|
190
|
+
<code class="docutils literal"><span class="pre">-9223372036854775808</span></code> (<code class="docutils literal"><span class="pre">=</span> <span class="pre">-(2</span> <span class="pre">**</span> <span class="pre">63)</span></code>).</p>
|
145
191
|
</div>
|
146
192
|
<div class="section" id="float">
|
147
|
-
<h3>7.11.2.
|
148
|
-
<p>Float literal is sequence of <
|
149
|
-
such as <
|
150
|
-
<
|
151
|
-
<
|
152
|
-
<
|
193
|
+
<h3>7.11.2.3.2. Float<a class="headerlink" href="#float" title="Permalink to this headline">¶</a></h3>
|
194
|
+
<p>Float literal is sequence of <code class="docutils literal"><span class="pre">0</span></code> to <code class="docutils literal"><span class="pre">9</span></code>, <code class="docutils literal"><span class="pre">.</span></code> and <code class="docutils literal"><span class="pre">0</span></code> to <code class="docutils literal"><span class="pre">9</span></code>
|
195
|
+
such as <code class="docutils literal"><span class="pre">3.14</span></code>. <code class="docutils literal"><span class="pre">+</span></code> or <code class="docutils literal"><span class="pre">-</span></code> can be prepended as sign such as
|
196
|
+
<code class="docutils literal"><span class="pre">+3.14</span></code> and <code class="docutils literal"><span class="pre">-3.14</span></code>. <code class="docutils literal"><span class="pre">${RADIX}e${EXPORNENTIAL}</span></code> and
|
197
|
+
<code class="docutils literal"><span class="pre">${RADIX}E${EXPORNENTIAL}</span></code> formats are also supported. For example,
|
198
|
+
<code class="docutils literal"><span class="pre">314e-2</span></code> is the same as <code class="docutils literal"><span class="pre">3.14</span></code>.</p>
|
153
199
|
</div>
|
154
200
|
<div class="section" id="string">
|
155
|
-
<h3>7.11.2.
|
156
|
-
<p>String literal is <
|
157
|
-
prepending <
|
158
|
-
a literal for <
|
201
|
+
<h3>7.11.2.3.3. String<a class="headerlink" href="#string" title="Permalink to this headline">¶</a></h3>
|
202
|
+
<p>String literal is <code class="docutils literal"><span class="pre">"..."</span></code>. You need to escape <code class="docutils literal"><span class="pre">"</span></code> in literal by
|
203
|
+
prepending <code class="docutils literal"><span class="pre">\\''</span> <span class="pre">such</span> <span class="pre">as</span> <span class="pre">``\"</span></code>. For example, <code class="docutils literal"><span class="pre">"Say</span> <span class="pre">\"Hello!\"."</span></code> is
|
204
|
+
a literal for <code class="docutils literal"><span class="pre">Say</span> <span class="pre">"Hello!".</span></code> string.</p>
|
159
205
|
<p>String encoding must be the same as encoding of database. The default
|
160
|
-
encoding is UTF-8. It can be changed by <
|
161
|
-
configure option, <
|
206
|
+
encoding is UTF-8. It can be changed by <code class="docutils literal"><span class="pre">--with-default-encoding</span></code>
|
207
|
+
configure option, <code class="docutils literal"><span class="pre">--encodiong</span></code> <a class="reference internal" href="../executables/groonga.html"><em>groonga command</em></a> option
|
162
208
|
and so on.</p>
|
163
209
|
</div>
|
164
210
|
<div class="section" id="boolean">
|
165
|
-
<h3>7.11.2.
|
166
|
-
<p>Boolean literal is <
|
167
|
-
<
|
211
|
+
<h3>7.11.2.3.4. Boolean<a class="headerlink" href="#boolean" title="Permalink to this headline">¶</a></h3>
|
212
|
+
<p>Boolean literal is <code class="docutils literal"><span class="pre">true</span></code> and <code class="docutils literal"><span class="pre">false</span></code>. <code class="docutils literal"><span class="pre">true</span></code> means true and
|
213
|
+
<code class="docutils literal"><span class="pre">false</span></code> means false.</p>
|
168
214
|
</div>
|
169
215
|
<div class="section" id="null">
|
170
|
-
<h3>7.11.2.
|
171
|
-
<p>Null literal is <
|
216
|
+
<h3>7.11.2.3.5. Null<a class="headerlink" href="#null" title="Permalink to this headline">¶</a></h3>
|
217
|
+
<p>Null literal is <code class="docutils literal"><span class="pre">null</span></code>. Groonga doesn't support null value but null
|
172
218
|
literal is supported.</p>
|
173
219
|
</div>
|
174
220
|
<div class="section" id="time">
|
175
|
-
<h3>7.11.2.
|
221
|
+
<h3>7.11.2.3.6. Time<a class="headerlink" href="#time" title="Permalink to this headline">¶</a></h3>
|
176
222
|
<div class="admonition note">
|
177
223
|
<p class="first admonition-title">Note</p>
|
178
224
|
<p class="last">This is the groonga original notation.</p>
|
179
225
|
</div>
|
180
226
|
<p>Time literal doesn't exit. There are string time notation, integer
|
181
227
|
time notation and float time notation.</p>
|
182
|
-
<p>String time notation is <
|
183
|
-
<
|
184
|
-
<
|
185
|
-
<
|
186
|
-
<
|
228
|
+
<p>String time notation is <code class="docutils literal"><span class="pre">"YYYY/MM/DD</span> <span class="pre">hh:mm:ss.uuuuuu"</span></code> or
|
229
|
+
<code class="docutils literal"><span class="pre">"YYYY-MM-DD</span> <span class="pre">hh:mm:ss.uuuuuu"</span></code>. <code class="docutils literal"><span class="pre">YYYY</span></code> is year, <code class="docutils literal"><span class="pre">MM</span></code> is month,
|
230
|
+
<code class="docutils literal"><span class="pre">DD</span></code> is day, <code class="docutils literal"><span class="pre">hh</span></code> is hour, <code class="docutils literal"><span class="pre">mm</span></code> is minute, <code class="docutils literal"><span class="pre">ss</span></code> is second and
|
231
|
+
<code class="docutils literal"><span class="pre">uuuuuu</span></code> is micro second. It is local time. For example,
|
232
|
+
<code class="docutils literal"><span class="pre">"2012/07/23</span> <span class="pre">02:41:10.436218"</span></code> is <code class="docutils literal"><span class="pre">2012-07-23T02:41:10.436218</span></code> in
|
187
233
|
ISO 8601 format.</p>
|
188
234
|
<p>Integer time notation is the number of seconds that have elapsed since
|
189
235
|
midnight UTC, January 1, 1970. It is also known as POSIX time. For
|
190
|
-
example, <
|
236
|
+
example, <code class="docutils literal"><span class="pre">1343011270</span></code> is <code class="docutils literal"><span class="pre">2012-07-23T02:41:10Z</span></code> in ISO 8601 format.</p>
|
191
237
|
<p>Float time notation is the number of seconds and micro seconds that
|
192
238
|
have elapsed since midnight UTC, January 1, 1970. For example,
|
193
|
-
<
|
239
|
+
<code class="docutils literal"><span class="pre">1343011270.436218</span></code> is <code class="docutils literal"><span class="pre">2012-07-23T02:41:10.436218Z</span></code> in ISO 8601
|
194
240
|
format.</p>
|
195
241
|
</div>
|
196
242
|
<div class="section" id="geo-point">
|
197
|
-
<h3>7.11.2.
|
243
|
+
<h3>7.11.2.3.7. Geo point<a class="headerlink" href="#geo-point" title="Permalink to this headline">¶</a></h3>
|
198
244
|
<div class="admonition note">
|
199
245
|
<p class="first admonition-title">Note</p>
|
200
246
|
<p class="last">This is the groonga original notation.</p>
|
@@ -203,31 +249,31 @@ format.</p>
|
|
203
249
|
<p>String geo point notation has the following patterns:</p>
|
204
250
|
<blockquote>
|
205
251
|
<div><ul class="simple">
|
206
|
-
<li><
|
207
|
-
<li><
|
208
|
-
<li><
|
209
|
-
<li><
|
252
|
+
<li><code class="docutils literal"><span class="pre">"LATITUDE_IN_MSECxLONGITUDE_IN_MSEC"</span></code></li>
|
253
|
+
<li><code class="docutils literal"><span class="pre">"LATITUDE_IN_MSEC,LONGITUDE_IN_MSEC"</span></code></li>
|
254
|
+
<li><code class="docutils literal"><span class="pre">"LATITUDE_IN_DEGREExLONGITUDE_IN_DEGREE"</span></code></li>
|
255
|
+
<li><code class="docutils literal"><span class="pre">"LATITUDE_IN_DEGREE,LONGITUDE_IN_DEGREE"</span></code></li>
|
210
256
|
</ul>
|
211
257
|
</div></blockquote>
|
212
|
-
<p><
|
258
|
+
<p><code class="docutils literal"><span class="pre">x</span></code> and <code class="docutils literal"><span class="pre">,</span></code> can be used for separator. Latitude and longitude can
|
213
259
|
be represented in milliseconds or degree.</p>
|
214
260
|
</div>
|
215
261
|
<div class="section" id="array">
|
216
|
-
<h3>7.11.2.
|
217
|
-
<p>Array literal is <
|
262
|
+
<h3>7.11.2.3.8. Array<a class="headerlink" href="#array" title="Permalink to this headline">¶</a></h3>
|
263
|
+
<p>Array literal is <code class="docutils literal"><span class="pre">[element1,</span> <span class="pre">element2,</span> <span class="pre">...]</span></code>.</p>
|
218
264
|
</div>
|
219
265
|
<div class="section" id="object-literal">
|
220
|
-
<h3>7.11.2.
|
221
|
-
<p>Object literal is <
|
266
|
+
<h3>7.11.2.3.9. Object literal<a class="headerlink" href="#object-literal" title="Permalink to this headline">¶</a></h3>
|
267
|
+
<p>Object literal is <code class="docutils literal"><span class="pre">{name1:</span> <span class="pre">value1,</span> <span class="pre">name2:</span> <span class="pre">value2,</span> <span class="pre">...}</span></code>. Groonga
|
222
268
|
doesn't support object literal yet.</p>
|
223
269
|
</div>
|
224
270
|
</div>
|
225
271
|
<div class="section" id="control-syntaxes">
|
226
|
-
<h2>7.11.2.
|
272
|
+
<h2>7.11.2.4. Control syntaxes<a class="headerlink" href="#control-syntaxes" title="Permalink to this headline">¶</a></h2>
|
227
273
|
<p>Script syntax doesn't support statement. So you cannot use control
|
228
|
-
statement such as <
|
274
|
+
statement such as <code class="docutils literal"><span class="pre">if</span></code>. You can only use <code class="docutils literal"><span class="pre">A</span> <span class="pre">?</span> <span class="pre">B</span> <span class="pre">:</span> <span class="pre">C</span></code> expression as
|
229
275
|
control syntax.</p>
|
230
|
-
<p><
|
276
|
+
<p><code class="docutils literal"><span class="pre">A</span> <span class="pre">?</span> <span class="pre">B</span> <span class="pre">:</span> <span class="pre">C</span></code> returns <code class="docutils literal"><span class="pre">B</span></code> if <code class="docutils literal"><span class="pre">A</span></code> is true, <code class="docutils literal"><span class="pre">C</span></code> otherwise.</p>
|
231
277
|
<p>Here is a simple exmaple.</p>
|
232
278
|
<p>Execution example:</p>
|
233
279
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == (_id == 1 ? 5 : 3)'
|
@@ -283,17 +329,17 @@ control syntax.</p>
|
|
283
329
|
# ]
|
284
330
|
</pre></div>
|
285
331
|
</div>
|
286
|
-
<p>The expression matches records that <
|
287
|
-
and <
|
288
|
-
not equal to 1 and <
|
332
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">_id</span></code> column value is equal to <code class="docutils literal"><span class="pre">1</span></code>
|
333
|
+
and <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal to <code class="docutils literal"><span class="pre">5</span></code> or <code class="docutils literal"><span class="pre">_id</span></code> column value is
|
334
|
+
not equal to 1 and <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal to <code class="docutils literal"><span class="pre">3</span></code>.</p>
|
289
335
|
</div>
|
290
336
|
<div class="section" id="grouping">
|
291
|
-
<h2>7.11.2.
|
292
|
-
<p>Its syntax is <
|
293
|
-
<p><
|
294
|
-
an expression. <
|
295
|
-
or <
|
296
|
-
<
|
337
|
+
<h2>7.11.2.5. Grouping<a class="headerlink" href="#grouping" title="Permalink to this headline">¶</a></h2>
|
338
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">(...)</span></code>. <code class="docutils literal"><span class="pre">...</span></code> is comma separated expression list.</p>
|
339
|
+
<p><code class="docutils literal"><span class="pre">(...)</span></code> groups one ore more expressions and they can be processed as
|
340
|
+
an expression. <code class="docutils literal"><span class="pre">a</span> <span class="pre">&&</span> <span class="pre">b</span> <span class="pre">||</span> <span class="pre">c</span></code> means that <code class="docutils literal"><span class="pre">a</span></code> and <code class="docutils literal"><span class="pre">b</span></code> are matched
|
341
|
+
or <code class="docutils literal"><span class="pre">c</span></code> is matched. <code class="docutils literal"><span class="pre">a</span> <span class="pre">&&</span> <span class="pre">(b</span> <span class="pre">||</span> <span class="pre">c)</span></code> means that <code class="docutils literal"><span class="pre">a</span></code> and one of
|
342
|
+
<code class="docutils literal"><span class="pre">b</span></code> and <code class="docutils literal"><span class="pre">c</span></code> are matched.</p>
|
297
343
|
<p>Here is a simple exmaple.</p>
|
298
344
|
<p>Execution example:</p>
|
299
345
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes < 5 && content @ "senna" || content @ "fast"'
|
@@ -389,17 +435,17 @@ select Entries --filter 'n_likes < 5 && (content @ "senna&qu
|
|
389
435
|
</pre></div>
|
390
436
|
</div>
|
391
437
|
<p>The first expression doesn't use grouping. It matches records that
|
392
|
-
<
|
393
|
-
<
|
394
|
-
<p>The second expression uses grouping. It matches records that <
|
395
|
-
<span class="pre"><</span> <span class="pre">5</span></
|
438
|
+
<code class="docutils literal"><span class="pre">n_likes</span> <span class="pre"><</span> <span class="pre">5</span></code> and <code class="docutils literal"><span class="pre">content</span> <span class="pre">@</span> <span class="pre">"senna"</span></code> are matched or
|
439
|
+
<code class="docutils literal"><span class="pre">content</span> <span class="pre">@</span> <span class="pre">"fast"</span></code> is matched.</p>
|
440
|
+
<p>The second expression uses grouping. It matches records that <code class="docutils literal"><span class="pre">n_likes</span>
|
441
|
+
<span class="pre"><</span> <span class="pre">5</span></code> and one of <code class="docutils literal"><span class="pre">content</span> <span class="pre">@</span> <span class="pre">"senna"</span></code> or <code class="docutils literal"><span class="pre">content</span> <span class="pre">@</span> <span class="pre">"fast"</span></code> are
|
396
442
|
matched.</p>
|
397
443
|
</div>
|
398
444
|
<div class="section" id="function-call">
|
399
|
-
<h2>7.11.2.
|
400
|
-
<p>Its syntax is <
|
401
|
-
<p><
|
402
|
-
<
|
445
|
+
<h2>7.11.2.6. Function call<a class="headerlink" href="#function-call" title="Permalink to this headline">¶</a></h2>
|
446
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">name(arugment1,</span> <span class="pre">argument2,</span> <span class="pre">...)</span></code>.</p>
|
447
|
+
<p><code class="docutils literal"><span class="pre">name(argument1,</span> <span class="pre">argument2,</span> <span class="pre">...)</span></code> calls a function that is named
|
448
|
+
<code class="docutils literal"><span class="pre">name</span></code> with arguments <code class="docutils literal"><span class="pre">argument1</span></code>, <code class="docutils literal"><span class="pre">argument2</span></code> and <code class="docutils literal"><span class="pre">...</span></code>.</p>
|
403
449
|
<p>See <a class="reference internal" href="../function.html"><em>Function</em></a> for available functin list.</p>
|
404
450
|
<p>Here is a simple exmaple.</p>
|
405
451
|
<p>Execution example:</p>
|
@@ -451,22 +497,22 @@ matched.</p>
|
|
451
497
|
</pre></div>
|
452
498
|
</div>
|
453
499
|
<p>The expression uses <a class="reference internal" href="../functions/edit_distance.html"><em>edit_distance</em></a>. It
|
454
|
-
matches records that <
|
455
|
-
<
|
500
|
+
matches records that <code class="docutils literal"><span class="pre">_key</span></code> column value is similar to
|
501
|
+
<code class="docutils literal"><span class="pre">"Groonga"</span></code>. Similality of <code class="docutils literal"><span class="pre">"Groonga"</span></code> is computed as edit
|
456
502
|
distance. If edit distance is less than or equal to 1, the value is
|
457
|
-
treated as similar. In this case, <
|
503
|
+
treated as similar. In this case, <code class="docutils literal"><span class="pre">"Groonga"</span></code> and <code class="docutils literal"><span class="pre">"Mroonga"</span></code> are
|
458
504
|
treated as similar.</p>
|
459
505
|
</div>
|
460
506
|
<div class="section" id="basic-operators">
|
461
|
-
<h2>7.11.2.
|
507
|
+
<h2>7.11.2.7. Basic operators<a class="headerlink" href="#basic-operators" title="Permalink to this headline">¶</a></h2>
|
462
508
|
<p>Groonga supports operators defined in ECMAScript.</p>
|
463
509
|
<div class="section" id="arithmetic-operators">
|
464
|
-
<h3>7.11.2.
|
510
|
+
<h3>7.11.2.7.1. Arithmetic operators<a class="headerlink" href="#arithmetic-operators" title="Permalink to this headline">¶</a></h3>
|
465
511
|
<p>Here are arithmetic operators.</p>
|
466
512
|
<div class="section" id="addition-operator">
|
467
|
-
<h4>7.11.2.
|
468
|
-
<p>Its syntax is <
|
469
|
-
<p>The operator adds <
|
513
|
+
<h4>7.11.2.7.1.1. Addition operator<a class="headerlink" href="#addition-operator" title="Permalink to this headline">¶</a></h4>
|
514
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">+</span> <span class="pre">number2</span></code>.</p>
|
515
|
+
<p>The operator adds <code class="docutils literal"><span class="pre">number1</span></code> and <code class="docutils literal"><span class="pre">number2</span></code> and returns the result.</p>
|
470
516
|
<p>Here is a simple example.</p>
|
471
517
|
<p>Execution example:</p>
|
472
518
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == 10 + 5'
|
@@ -510,13 +556,13 @@ treated as similar.</p>
|
|
510
556
|
# ]
|
511
557
|
</pre></div>
|
512
558
|
</div>
|
513
|
-
<p>The expression matches records that <
|
514
|
-
to <
|
559
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
560
|
+
to <code class="docutils literal"><span class="pre">15</span></code> (= <code class="docutils literal"><span class="pre">10</span> <span class="pre">+</span> <span class="pre">5</span></code>).</p>
|
515
561
|
</div>
|
516
562
|
<div class="section" id="subtraction-operator">
|
517
|
-
<h4>7.11.2.
|
518
|
-
<p>Its syntax is <
|
519
|
-
<p>The operator subtracts <
|
563
|
+
<h4>7.11.2.7.1.2. Subtraction operator<a class="headerlink" href="#subtraction-operator" title="Permalink to this headline">¶</a></h4>
|
564
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">-</span> <span class="pre">number2</span></code>.</p>
|
565
|
+
<p>The operator subtracts <code class="docutils literal"><span class="pre">number2</span></code> from <code class="docutils literal"><span class="pre">number1</span></code> and returns the result.</p>
|
520
566
|
<p>Here is a simple example.</p>
|
521
567
|
<p>Execution example:</p>
|
522
568
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == 20 - 5'
|
@@ -560,13 +606,13 @@ to <tt class="docutils literal"><span class="pre">15</span></tt> (= <tt class="d
|
|
560
606
|
# ]
|
561
607
|
</pre></div>
|
562
608
|
</div>
|
563
|
-
<p>The expression matches records that <
|
564
|
-
to <
|
609
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
610
|
+
to <code class="docutils literal"><span class="pre">15</span></code> (= <code class="docutils literal"><span class="pre">20</span> <span class="pre">-</span> <span class="pre">5</span></code>).</p>
|
565
611
|
</div>
|
566
612
|
<div class="section" id="multiplication-operator">
|
567
|
-
<h4>7.11.2.
|
568
|
-
<p>Its syntax is <
|
569
|
-
<p>The operator multiplies <
|
613
|
+
<h4>7.11.2.7.1.3. Multiplication operator<a class="headerlink" href="#multiplication-operator" title="Permalink to this headline">¶</a></h4>
|
614
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">*</span> <span class="pre">number2</span></code>.</p>
|
615
|
+
<p>The operator multiplies <code class="docutils literal"><span class="pre">number1</span></code> and <code class="docutils literal"><span class="pre">number2</span></code> and returns the result.</p>
|
570
616
|
<p>Here is a simple example.</p>
|
571
617
|
<p>Execution example:</p>
|
572
618
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == 3 * 5'
|
@@ -610,14 +656,14 @@ to <tt class="docutils literal"><span class="pre">15</span></tt> (= <tt class="d
|
|
610
656
|
# ]
|
611
657
|
</pre></div>
|
612
658
|
</div>
|
613
|
-
<p>The expression matches records that <
|
614
|
-
to <
|
659
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
660
|
+
to <code class="docutils literal"><span class="pre">15</span></code> (= <code class="docutils literal"><span class="pre">3</span> <span class="pre">*</span> <span class="pre">5</span></code>).</p>
|
615
661
|
</div>
|
616
662
|
<div class="section" id="division-operator">
|
617
|
-
<h4>7.11.2.
|
618
|
-
<p>Its syntax is <
|
619
|
-
<p>The operator divides <
|
620
|
-
quotient of result. <
|
663
|
+
<h4>7.11.2.7.1.4. Division operator<a class="headerlink" href="#division-operator" title="Permalink to this headline">¶</a></h4>
|
664
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">/</span> <span class="pre">number2</span></code> and <code class="docutils literal"><span class="pre">number1</span> <span class="pre">%</span> <span class="pre">number2</span></code>.</p>
|
665
|
+
<p>The operator divides <code class="docutils literal"><span class="pre">number2</span></code> by <code class="docutils literal"><span class="pre">number1</span></code>. <code class="docutils literal"><span class="pre">/</span></code> returns the
|
666
|
+
quotient of result. <code class="docutils literal"><span class="pre">%</span></code> returns the remainder of result.</p>
|
621
667
|
<p>Here is simple examples.</p>
|
622
668
|
<p>Execution example:</p>
|
623
669
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == 26 / 7'
|
@@ -667,8 +713,8 @@ quotient of result. <tt class="docutils literal"><span class="pre">%</span></tt>
|
|
667
713
|
# ]
|
668
714
|
</pre></div>
|
669
715
|
</div>
|
670
|
-
<p>The expression matches records that <
|
671
|
-
to <
|
716
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
717
|
+
to <code class="docutils literal"><span class="pre">3</span></code> (= <code class="docutils literal"><span class="pre">26</span> <span class="pre">/</span> <span class="pre">7</span></code>).</p>
|
672
718
|
<p>Execution example:</p>
|
673
719
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == 26 % 7'
|
674
720
|
# [
|
@@ -711,17 +757,17 @@ to <tt class="docutils literal"><span class="pre">3</span></tt> (= <tt class="do
|
|
711
757
|
# ]
|
712
758
|
</pre></div>
|
713
759
|
</div>
|
714
|
-
<p>The expression matches records that <
|
715
|
-
to <
|
760
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
761
|
+
to <code class="docutils literal"><span class="pre">5</span></code> (= <code class="docutils literal"><span class="pre">26</span> <span class="pre">%</span> <span class="pre">7</span></code>).</p>
|
716
762
|
</div>
|
717
763
|
</div>
|
718
764
|
<div class="section" id="logical-operators">
|
719
|
-
<h3>7.11.2.
|
765
|
+
<h3>7.11.2.7.2. Logical operators<a class="headerlink" href="#logical-operators" title="Permalink to this headline">¶</a></h3>
|
720
766
|
<p>Here are logical operators.</p>
|
721
767
|
<div class="section" id="logical-not-operator">
|
722
|
-
<h4>7.11.2.
|
723
|
-
<p>Its syntax is <
|
724
|
-
<p>The operator inverts boolean value of <
|
768
|
+
<h4>7.11.2.7.2.1. Logical NOT operator<a class="headerlink" href="#logical-not-operator" title="Permalink to this headline">¶</a></h4>
|
769
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">!condition</span></code>.</p>
|
770
|
+
<p>The operator inverts boolean value of <code class="docutils literal"><span class="pre">condition</span></code>.</p>
|
725
771
|
<p>Here is a simple example.</p>
|
726
772
|
<p>Execution example:</p>
|
727
773
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter '!(n_likes == 5)'
|
@@ -783,14 +829,14 @@ to <tt class="docutils literal"><span class="pre">5</span></tt> (= <tt class="do
|
|
783
829
|
# ]
|
784
830
|
</pre></div>
|
785
831
|
</div>
|
786
|
-
<p>The expression matches records that <
|
787
|
-
equal to <
|
832
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is not
|
833
|
+
equal to <code class="docutils literal"><span class="pre">5</span></code>.</p>
|
788
834
|
</div>
|
789
835
|
<div class="section" id="logical-and-operator">
|
790
|
-
<h4>7.11.2.
|
791
|
-
<p>Its syntax is <
|
792
|
-
<p>The operator returns true if both of <
|
793
|
-
<
|
836
|
+
<h4>7.11.2.7.2.2. Logical AND operator<a class="headerlink" href="#logical-and-operator" title="Permalink to this headline">¶</a></h4>
|
837
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">condition1</span> <span class="pre">&&</span> <span class="pre">condition2</span></code>.</p>
|
838
|
+
<p>The operator returns true if both of <code class="docutils literal"><span class="pre">condition1</span></code> and
|
839
|
+
<code class="docutils literal"><span class="pre">condition2</span></code> are true, false otherwise.</p>
|
794
840
|
<p>Here is a simple example.</p>
|
795
841
|
<p>Execution example:</p>
|
796
842
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'content @ "fast" && n_likes >= 10'
|
@@ -840,14 +886,14 @@ equal to <tt class="docutils literal"><span class="pre">5</span></tt>.</p>
|
|
840
886
|
# ]
|
841
887
|
</pre></div>
|
842
888
|
</div>
|
843
|
-
<p>The expression matches records that <
|
844
|
-
word <
|
845
|
-
<
|
889
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">content</span></code> column value has the
|
890
|
+
word <code class="docutils literal"><span class="pre">fast</span></code> and <code class="docutils literal"><span class="pre">n_likes</span></code> column value is greater or equal to
|
891
|
+
<code class="docutils literal"><span class="pre">10</span></code>.</p>
|
846
892
|
</div>
|
847
893
|
<div class="section" id="logical-or-operator">
|
848
|
-
<h4>7.11.2.
|
849
|
-
<p>Its syntax is <
|
850
|
-
<p>The operator returns true if either <
|
894
|
+
<h4>7.11.2.7.2.3. Logical OR operator<a class="headerlink" href="#logical-or-operator" title="Permalink to this headline">¶</a></h4>
|
895
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">condition1</span> <span class="pre">||</span> <span class="pre">condition2</span></code>.</p>
|
896
|
+
<p>The operator returns true if either <code class="docutils literal"><span class="pre">condition1</span></code> or <code class="docutils literal"><span class="pre">condition2</span></code> is
|
851
897
|
true, false otherwise.</p>
|
852
898
|
<p>Here is a simple example.</p>
|
853
899
|
<p>Execution example:</p>
|
@@ -898,13 +944,13 @@ true, false otherwise.</p>
|
|
898
944
|
# ]
|
899
945
|
</pre></div>
|
900
946
|
</div>
|
901
|
-
<p>The expression matches records that <
|
902
|
-
to <
|
947
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
948
|
+
to <code class="docutils literal"><span class="pre">5</span></code> or <code class="docutils literal"><span class="pre">10</span></code>.</p>
|
903
949
|
</div>
|
904
950
|
<div class="section" id="logical-and-not-operator">
|
905
|
-
<h4>7.11.2.
|
906
|
-
<p>Its syntax is <
|
907
|
-
<p>The operator returns true if <
|
951
|
+
<h4>7.11.2.7.2.4. Logical AND NOT operator<a class="headerlink" href="#logical-and-not-operator" title="Permalink to this headline">¶</a></h4>
|
952
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">condition1</span> <span class="pre">&!</span> <span class="pre">condition2</span></code>.</p>
|
953
|
+
<p>The operator returns true if <code class="docutils literal"><span class="pre">condition1</span></code> is true but <code class="docutils literal"><span class="pre">condition2</span></code>
|
908
954
|
is false, false otherwise. It returns difference set.</p>
|
909
955
|
<p>Here is a simple example.</p>
|
910
956
|
<p>Execution example:</p>
|
@@ -949,17 +995,17 @@ is false, false otherwise. It returns difference set.</p>
|
|
949
995
|
# ]
|
950
996
|
</pre></div>
|
951
997
|
</div>
|
952
|
-
<p>The expression matches records that <
|
953
|
-
word <
|
998
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">content</span></code> column value has the
|
999
|
+
word <code class="docutils literal"><span class="pre">fast</span></code> but doesn't have the word <code class="docutils literal"><span class="pre">mroonga</span></code>.</p>
|
954
1000
|
</div>
|
955
1001
|
</div>
|
956
1002
|
<div class="section" id="bitwise-operators">
|
957
|
-
<h3>7.11.2.
|
1003
|
+
<h3>7.11.2.7.3. Bitwise operators<a class="headerlink" href="#bitwise-operators" title="Permalink to this headline">¶</a></h3>
|
958
1004
|
<p>Here are bitwise operators.</p>
|
959
1005
|
<div class="section" id="bitwise-not-operator">
|
960
|
-
<h4>7.11.2.
|
961
|
-
<p>Its syntax is <
|
962
|
-
<p>The operator returns bitwise NOT of <
|
1006
|
+
<h4>7.11.2.7.3.1. Bitwise NOT operator<a class="headerlink" href="#bitwise-not-operator" title="Permalink to this headline">¶</a></h4>
|
1007
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">~number</span></code>.</p>
|
1008
|
+
<p>The operator returns bitwise NOT of <code class="docutils literal"><span class="pre">number</span></code>.</p>
|
963
1009
|
<p>Here is a simple example.</p>
|
964
1010
|
<p>Execution example:</p>
|
965
1011
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter '~n_likes == -6'
|
@@ -1003,13 +1049,13 @@ word <tt class="docutils literal"><span class="pre">fast</span></tt> but doesn't
|
|
1003
1049
|
# ]
|
1004
1050
|
</pre></div>
|
1005
1051
|
</div>
|
1006
|
-
<p>The expression matches records that <
|
1007
|
-
to <
|
1052
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1053
|
+
to <code class="docutils literal"><span class="pre">5</span></code> because bitwise NOT of <code class="docutils literal"><span class="pre">5</span></code> is equal to <code class="docutils literal"><span class="pre">-6</span></code>.</p>
|
1008
1054
|
</div>
|
1009
1055
|
<div class="section" id="bitwise-and-operator">
|
1010
|
-
<h4>7.11.2.
|
1011
|
-
<p>Its syntax is <
|
1012
|
-
<p>The operator returns bitwise AND between <
|
1056
|
+
<h4>7.11.2.7.3.2. Bitwise AND operator<a class="headerlink" href="#bitwise-and-operator" title="Permalink to this headline">¶</a></h4>
|
1057
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">&</span> <span class="pre">number2</span></code>.</p>
|
1058
|
+
<p>The operator returns bitwise AND between <code class="docutils literal"><span class="pre">number1</span></code> and <code class="docutils literal"><span class="pre">number2</span></code>.</p>
|
1013
1059
|
<p>Here is a simple example.</p>
|
1014
1060
|
<p>Execution example:</p>
|
1015
1061
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter '(n_likes & 1) == 1'
|
@@ -1071,16 +1117,16 @@ to <tt class="docutils literal"><span class="pre">5</span></tt> because bitwise
|
|
1071
1117
|
# ]
|
1072
1118
|
</pre></div>
|
1073
1119
|
</div>
|
1074
|
-
<p>The expression matches records that <
|
1075
|
-
number because bitwise AND between an even number and <
|
1076
|
-
to <
|
1077
|
-
<
|
1120
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is even
|
1121
|
+
number because bitwise AND between an even number and <code class="docutils literal"><span class="pre">1</span></code> is equal
|
1122
|
+
to <code class="docutils literal"><span class="pre">1</span></code> and bitwise AND between an odd number and <code class="docutils literal"><span class="pre">1</span></code> is equal to
|
1123
|
+
<code class="docutils literal"><span class="pre">0</span></code>.</p>
|
1078
1124
|
</div>
|
1079
1125
|
</div>
|
1080
1126
|
<div class="section" id="bitwise-or-operator">
|
1081
|
-
<h3>7.11.2.
|
1082
|
-
<p>Its syntax is <
|
1083
|
-
<p>The operator returns bitwise OR between <
|
1127
|
+
<h3>7.11.2.7.4. Bitwise OR operator<a class="headerlink" href="#bitwise-or-operator" title="Permalink to this headline">¶</a></h3>
|
1128
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">|</span> <span class="pre">number2</span></code>.</p>
|
1129
|
+
<p>The operator returns bitwise OR between <code class="docutils literal"><span class="pre">number1</span></code> and <code class="docutils literal"><span class="pre">number2</span></code>.</p>
|
1084
1130
|
<p>Here is a simple example.</p>
|
1085
1131
|
<p>Execution example:</p>
|
1086
1132
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == (1 | 4)'
|
@@ -1124,13 +1170,13 @@ to <tt class="docutils literal"><span class="pre">1</span></tt> and bitwise AND
|
|
1124
1170
|
# ]
|
1125
1171
|
</pre></div>
|
1126
1172
|
</div>
|
1127
|
-
<p>The expression matches records that <
|
1128
|
-
to <
|
1173
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1174
|
+
to <code class="docutils literal"><span class="pre">5</span></code> (= <code class="docutils literal"><span class="pre">1</span> <span class="pre">|</span> <span class="pre">4</span></code>).</p>
|
1129
1175
|
</div>
|
1130
1176
|
<div class="section" id="bitwise-xor-operator">
|
1131
|
-
<h3>7.11.2.
|
1132
|
-
<p>Its syntax is <
|
1133
|
-
<p>The operator returns bitwise XOR between <
|
1177
|
+
<h3>7.11.2.7.5. Bitwise XOR operator<a class="headerlink" href="#bitwise-xor-operator" title="Permalink to this headline">¶</a></h3>
|
1178
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">^</span> <span class="pre">number2</span></code>.</p>
|
1179
|
+
<p>The operator returns bitwise XOR between <code class="docutils literal"><span class="pre">number1</span></code> and <code class="docutils literal"><span class="pre">number2</span></code>.</p>
|
1134
1180
|
<p>Here is a simple example.</p>
|
1135
1181
|
<p>Execution example:</p>
|
1136
1182
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == (10 ^ 15)'
|
@@ -1174,17 +1220,17 @@ to <tt class="docutils literal"><span class="pre">5</span></tt> (= <tt class="do
|
|
1174
1220
|
# ]
|
1175
1221
|
</pre></div>
|
1176
1222
|
</div>
|
1177
|
-
<p>The expression matches records that <
|
1178
|
-
to <
|
1223
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1224
|
+
to <code class="docutils literal"><span class="pre">5</span></code> (= <code class="docutils literal"><span class="pre">10</span> <span class="pre">^</span> <span class="pre">15</span></code>).</p>
|
1179
1225
|
</div>
|
1180
1226
|
<div class="section" id="shift-operators">
|
1181
|
-
<h3>7.11.2.
|
1227
|
+
<h3>7.11.2.7.6. Shift operators<a class="headerlink" href="#shift-operators" title="Permalink to this headline">¶</a></h3>
|
1182
1228
|
<p>Here are shift operators.</p>
|
1183
1229
|
<div class="section" id="left-shift-operator">
|
1184
|
-
<h4>7.11.2.
|
1185
|
-
<p>Its syntax is <
|
1186
|
-
<p>The operator performs a bitwise left shift operation on <
|
1187
|
-
<
|
1230
|
+
<h4>7.11.2.7.6.1. Left shift operator<a class="headerlink" href="#left-shift-operator" title="Permalink to this headline">¶</a></h4>
|
1231
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre"><<</span> <span class="pre">number2</span></code>.</p>
|
1232
|
+
<p>The operator performs a bitwise left shift operation on <code class="docutils literal"><span class="pre">number1</span></code> by
|
1233
|
+
<code class="docutils literal"><span class="pre">number2</span></code>.</p>
|
1188
1234
|
<p>Here is a simple example.</p>
|
1189
1235
|
<p>Execution example:</p>
|
1190
1236
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == (5 << 1)'
|
@@ -1228,14 +1274,14 @@ to <tt class="docutils literal"><span class="pre">5</span></tt> (= <tt class="do
|
|
1228
1274
|
# ]
|
1229
1275
|
</pre></div>
|
1230
1276
|
</div>
|
1231
|
-
<p>The expression matches records that <
|
1232
|
-
to <
|
1277
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1278
|
+
to <code class="docutils literal"><span class="pre">10</span></code> (= <code class="docutils literal"><span class="pre">5</span> <span class="pre"><<</span> <span class="pre">1</span></code>).</p>
|
1233
1279
|
</div>
|
1234
1280
|
<div class="section" id="signed-right-shift-operator">
|
1235
|
-
<h4>7.11.2.
|
1236
|
-
<p>Its syntax is <
|
1237
|
-
<p>The operator shifts bits of <
|
1238
|
-
of the result is the same as <
|
1281
|
+
<h4>7.11.2.7.6.2. Signed right shift operator<a class="headerlink" href="#signed-right-shift-operator" title="Permalink to this headline">¶</a></h4>
|
1282
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">>></span> <span class="pre">number2</span></code>.</p>
|
1283
|
+
<p>The operator shifts bits of <code class="docutils literal"><span class="pre">number1</span></code> to right by <code class="docutils literal"><span class="pre">number2</span></code>. The sign
|
1284
|
+
of the result is the same as <code class="docutils literal"><span class="pre">number1</span></code>.</p>
|
1239
1285
|
<p>Here is a simple example.</p>
|
1240
1286
|
<p>Execution example:</p>
|
1241
1287
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == -(-10 >> 1)'
|
@@ -1279,14 +1325,14 @@ of the result is the same as <tt class="docutils literal"><span class="pre">numb
|
|
1279
1325
|
# ]
|
1280
1326
|
</pre></div>
|
1281
1327
|
</div>
|
1282
|
-
<p>The expression matches records that <
|
1283
|
-
to <
|
1328
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1329
|
+
to <code class="docutils literal"><span class="pre">5</span></code> (= <code class="docutils literal"><span class="pre">-(-10</span> <span class="pre">>></span> <span class="pre">1)</span></code> = <code class="docutils literal"><span class="pre">-(-5)</span></code>).</p>
|
1284
1330
|
</div>
|
1285
1331
|
<div class="section" id="unsigned-right-shift-operator">
|
1286
|
-
<h4>7.11.2.
|
1287
|
-
<p>Its syntax is <
|
1288
|
-
<p>The operator shifts bits of <
|
1289
|
-
leftmost <
|
1332
|
+
<h4>7.11.2.7.6.3. Unsigned right shift operator<a class="headerlink" href="#unsigned-right-shift-operator" title="Permalink to this headline">¶</a></h4>
|
1333
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">number1</span> <span class="pre">>>></span> <span class="pre">number2</span></code>.</p>
|
1334
|
+
<p>The operator shifts bits of <code class="docutils literal"><span class="pre">number1</span></code> to right by <code class="docutils literal"><span class="pre">number2</span></code>. The
|
1335
|
+
leftmost <code class="docutils literal"><span class="pre">number2</span></code> bits are filled by <code class="docutils literal"><span class="pre">0</span></code>.</p>
|
1290
1336
|
<p>Here is a simple example.</p>
|
1291
1337
|
<p>Execution example:</p>
|
1292
1338
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes == (2147483648 - (-10 >>> 1))'
|
@@ -1330,17 +1376,17 @@ leftmost <tt class="docutils literal"><span class="pre">number2</span></tt> bits
|
|
1330
1376
|
# ]
|
1331
1377
|
</pre></div>
|
1332
1378
|
</div>
|
1333
|
-
<p>The expression matches records that <
|
1334
|
-
to <
|
1379
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1380
|
+
to <code class="docutils literal"><span class="pre">5</span></code> (= <code class="docutils literal"><span class="pre">2147483648</span> <span class="pre">-</span> <span class="pre">(-10</span> <span class="pre">>>></span> <span class="pre">1)</span></code> = <code class="docutils literal"><span class="pre">2147483648</span> <span class="pre">-</span> <span class="pre">2147483643</span></code>).</p>
|
1335
1381
|
</div>
|
1336
1382
|
</div>
|
1337
1383
|
<div class="section" id="comparison-operators">
|
1338
|
-
<h3>7.11.2.
|
1384
|
+
<h3>7.11.2.7.7. Comparison operators<a class="headerlink" href="#comparison-operators" title="Permalink to this headline">¶</a></h3>
|
1339
1385
|
<p>Here are comparison operators.</p>
|
1340
1386
|
<div class="section" id="equal-operator">
|
1341
|
-
<h4>7.11.2.
|
1342
|
-
<p>Its syntax is <
|
1343
|
-
<p>The operator returns true if <
|
1387
|
+
<h4>7.11.2.7.7.1. Equal operator<a class="headerlink" href="#equal-operator" title="Permalink to this headline">¶</a></h4>
|
1388
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">object1</span> <span class="pre">==</span> <span class="pre">object2</span></code>.</p>
|
1389
|
+
<p>The operator returns true if <code class="docutils literal"><span class="pre">object1</span></code> equals to <code class="docutils literal"><span class="pre">object2</span></code>, false
|
1344
1390
|
otherwise.</p>
|
1345
1391
|
<p>Here is a simple example.</p>
|
1346
1392
|
<p>Execution example:</p>
|
@@ -1385,14 +1431,14 @@ otherwise.</p>
|
|
1385
1431
|
# ]
|
1386
1432
|
</pre></div>
|
1387
1433
|
</div>
|
1388
|
-
<p>The expression matches records that <
|
1389
|
-
to <
|
1434
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is equal
|
1435
|
+
to <code class="docutils literal"><span class="pre">5</span></code>.</p>
|
1390
1436
|
</div>
|
1391
1437
|
<div class="section" id="not-equal-operator">
|
1392
|
-
<h4>7.11.2.
|
1393
|
-
<p>Its syntax is <
|
1394
|
-
<p>The operator returns true if <
|
1395
|
-
<
|
1438
|
+
<h4>7.11.2.7.7.2. Not equal operator<a class="headerlink" href="#not-equal-operator" title="Permalink to this headline">¶</a></h4>
|
1439
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">object1</span> <span class="pre">!=</span> <span class="pre">object2</span></code>.</p>
|
1440
|
+
<p>The operator returns true if <code class="docutils literal"><span class="pre">object1</span></code> does not equal to
|
1441
|
+
<code class="docutils literal"><span class="pre">object2</span></code>, false otherwise.</p>
|
1396
1442
|
<p>Here is a simple example.</p>
|
1397
1443
|
<p>Execution example:</p>
|
1398
1444
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'n_likes != 5'
|
@@ -1454,32 +1500,32 @@ to <tt class="docutils literal"><span class="pre">5</span></tt>.</p>
|
|
1454
1500
|
# ]
|
1455
1501
|
</pre></div>
|
1456
1502
|
</div>
|
1457
|
-
<p>The expression matches records that <
|
1458
|
-
equal to <
|
1503
|
+
<p>The expression matches records that <code class="docutils literal"><span class="pre">n_likes</span></code> column value is not
|
1504
|
+
equal to <code class="docutils literal"><span class="pre">5</span></code>.</p>
|
1459
1505
|
</div>
|
1460
1506
|
<div class="section" id="less-than-operator">
|
1461
|
-
<h4>7.11.2.
|
1507
|
+
<h4>7.11.2.7.7.3. Less than operator<a class="headerlink" href="#less-than-operator" title="Permalink to this headline">¶</a></h4>
|
1462
1508
|
<p>TODO: ...</p>
|
1463
1509
|
</div>
|
1464
1510
|
<div class="section" id="less-than-or-equal-to-operator">
|
1465
|
-
<h4>7.11.2.
|
1511
|
+
<h4>7.11.2.7.7.4. Less than or equal to operator<a class="headerlink" href="#less-than-or-equal-to-operator" title="Permalink to this headline">¶</a></h4>
|
1466
1512
|
<p>TODO: ...</p>
|
1467
1513
|
</div>
|
1468
1514
|
<div class="section" id="greater-than-operator">
|
1469
|
-
<h4>7.11.2.
|
1515
|
+
<h4>7.11.2.7.7.5. Greater than operator<a class="headerlink" href="#greater-than-operator" title="Permalink to this headline">¶</a></h4>
|
1470
1516
|
<p>TODO: ...</p>
|
1471
1517
|
</div>
|
1472
1518
|
<div class="section" id="greater-than-or-equal-to-operator">
|
1473
|
-
<h4>7.11.2.
|
1519
|
+
<h4>7.11.2.7.7.6. Greater than or equal to operator<a class="headerlink" href="#greater-than-or-equal-to-operator" title="Permalink to this headline">¶</a></h4>
|
1474
1520
|
<p>TODO: ...</p>
|
1475
1521
|
</div>
|
1476
1522
|
</div>
|
1477
1523
|
</div>
|
1478
1524
|
<div class="section" id="assignment-operators">
|
1479
|
-
<h2>7.11.2.
|
1525
|
+
<h2>7.11.2.8. Assignment operators<a class="headerlink" href="#assignment-operators" title="Permalink to this headline">¶</a></h2>
|
1480
1526
|
<div class="section" id="addition-assignment-operator">
|
1481
|
-
<h3>7.11.2.
|
1482
|
-
<p>Its syntax is <
|
1527
|
+
<h3>7.11.2.8.1. Addition assignment operator<a class="headerlink" href="#addition-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1528
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">+=</span> <span class="pre">column2</span></code>.</p>
|
1483
1529
|
<p>The operator performs addition assginment operation on column1 by column2.</p>
|
1484
1530
|
<p>Execution example:</p>
|
1485
1531
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score += n_likes'
|
@@ -1538,15 +1584,15 @@ equal to <tt class="docutils literal"><span class="pre">5</span></tt>.</p>
|
|
1538
1584
|
# ]
|
1539
1585
|
</pre></div>
|
1540
1586
|
</div>
|
1541
|
-
<p>The value of <
|
1587
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1542
1588
|
then performs addition assignment operation such as '_score = _score + n_likes' for each records.</p>
|
1543
|
-
<p>For example, the value of <
|
1589
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1544
1590
|
is 3.</p>
|
1545
|
-
<p>So the expression <
|
1591
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">+</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1546
1592
|
</div>
|
1547
1593
|
<div class="section" id="subtraction-assignment-operator">
|
1548
|
-
<h3>7.11.2.
|
1549
|
-
<p>Its syntax is <
|
1594
|
+
<h3>7.11.2.8.2. Subtraction assignment operator<a class="headerlink" href="#subtraction-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1595
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">-=</span> <span class="pre">column2</span></code>.</p>
|
1550
1596
|
<p>The operator performs subtraction assginment operation on column1 by column2.</p>
|
1551
1597
|
<p>Execution example:</p>
|
1552
1598
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score -= n_likes'
|
@@ -1605,15 +1651,15 @@ is 3.</p>
|
|
1605
1651
|
# ]
|
1606
1652
|
</pre></div>
|
1607
1653
|
</div>
|
1608
|
-
<p>The value of <
|
1654
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1609
1655
|
then performs subtraction assignment operation such as '_score = _score - n_likes' for each records.</p>
|
1610
|
-
<p>For example, the value of <
|
1656
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1611
1657
|
is 3.</p>
|
1612
|
-
<p>So the expression <
|
1658
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">-</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1613
1659
|
</div>
|
1614
1660
|
<div class="section" id="multiplication-assignment-operator">
|
1615
|
-
<h3>7.11.2.
|
1616
|
-
<p>Its syntax is <
|
1661
|
+
<h3>7.11.2.8.3. Multiplication assignment operator<a class="headerlink" href="#multiplication-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1662
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">*=</span> <span class="pre">column2</span></code>.</p>
|
1617
1663
|
<p>The operator performs multiplication assginment operation on column1 by column2.</p>
|
1618
1664
|
<p>Execution example:</p>
|
1619
1665
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score *= n_likes'
|
@@ -1672,15 +1718,15 @@ is 3.</p>
|
|
1672
1718
|
# ]
|
1673
1719
|
</pre></div>
|
1674
1720
|
</div>
|
1675
|
-
<p>The value of <
|
1721
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1676
1722
|
then performs subtraction assignment operation such as '_score = _score * n_likes' for each records.</p>
|
1677
|
-
<p>For example, the value of <
|
1723
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1678
1724
|
is 3.</p>
|
1679
|
-
<p>So the expression <
|
1725
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">*</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1680
1726
|
</div>
|
1681
1727
|
<div class="section" id="division-assignment-operator">
|
1682
|
-
<h3>7.11.2.
|
1683
|
-
<p>Its syntax is <
|
1728
|
+
<h3>7.11.2.8.4. Division assignment operator<a class="headerlink" href="#division-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1729
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">/=</span> <span class="pre">column2</span></code>.</p>
|
1684
1730
|
<p>The operator performs division assginment operation on column1 by column2.</p>
|
1685
1731
|
<p>Execution example:</p>
|
1686
1732
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score /= n_likes'
|
@@ -1739,15 +1785,15 @@ is 3.</p>
|
|
1739
1785
|
# ]
|
1740
1786
|
</pre></div>
|
1741
1787
|
</div>
|
1742
|
-
<p>The value of <
|
1788
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1743
1789
|
then performs subtraction assignment operation such as '_score = _score / n_likes' for each records.</p>
|
1744
|
-
<p>For example, the value of <
|
1790
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1745
1791
|
is 3.</p>
|
1746
|
-
<p>So the expression <
|
1792
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">/</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1747
1793
|
</div>
|
1748
1794
|
<div class="section" id="modulo-assignment-operator">
|
1749
|
-
<h3>7.11.2.
|
1750
|
-
<p>Its syntax is <
|
1795
|
+
<h3>7.11.2.8.5. Modulo assignment operator<a class="headerlink" href="#modulo-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1796
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">%=</span> <span class="pre">column2</span></code>.</p>
|
1751
1797
|
<p>The operator performs modulo assginment operation on column1 by column2.</p>
|
1752
1798
|
<p>Execution example:</p>
|
1753
1799
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score %= n_likes'
|
@@ -1806,15 +1852,15 @@ is 3.</p>
|
|
1806
1852
|
# ]
|
1807
1853
|
</pre></div>
|
1808
1854
|
</div>
|
1809
|
-
<p>The value of <
|
1855
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1810
1856
|
then performs subtraction assignment operation such as '_score = _score % n_likes' for each records.</p>
|
1811
|
-
<p>For example, the value of <
|
1857
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1812
1858
|
is 3.</p>
|
1813
|
-
<p>So the expression <
|
1859
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">%</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1814
1860
|
</div>
|
1815
1861
|
<div class="section" id="bitwise-left-shift-assignment-operator">
|
1816
|
-
<h3>7.11.2.
|
1817
|
-
<p>Its syntax is <
|
1862
|
+
<h3>7.11.2.8.6. Bitwise left shift assignment operator<a class="headerlink" href="#bitwise-left-shift-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1863
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre"><<=</span> <span class="pre">column2</span></code>.</p>
|
1818
1864
|
<p>The operator performs left shift assginment operation on column1 by column2.</p>
|
1819
1865
|
<p>Execution example:</p>
|
1820
1866
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score <<= n_likes'
|
@@ -1873,25 +1919,25 @@ is 3.</p>
|
|
1873
1919
|
# ]
|
1874
1920
|
</pre></div>
|
1875
1921
|
</div>
|
1876
|
-
<p>The value of <
|
1922
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1877
1923
|
then performs subtraction assignment operation such as '_score = _score << n_likes' for each records.</p>
|
1878
|
-
<p>For example, the value of <
|
1924
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1879
1925
|
is 3.</p>
|
1880
|
-
<p>So the expression <
|
1926
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre"><<</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1881
1927
|
</div>
|
1882
1928
|
<div class="section" id="bitwise-signed-right-shift-assignment-operator">
|
1883
|
-
<h3>7.11.2.
|
1884
|
-
<p>Its syntax is <
|
1929
|
+
<h3>7.11.2.8.7. Bitwise signed right shift assignment operator<a class="headerlink" href="#bitwise-signed-right-shift-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1930
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column2</span> <span class="pre">>>=</span> <span class="pre">column2</span></code>.</p>
|
1885
1931
|
<p>The operator performs signed right shift assginment operation on column1 by column2.</p>
|
1886
1932
|
</div>
|
1887
1933
|
<div class="section" id="bitwise-unsigned-right-shift-assignment-operator">
|
1888
|
-
<h3>7.11.2.
|
1889
|
-
<p>Its syntax is <
|
1934
|
+
<h3>7.11.2.8.8. Bitwise unsigned right shift assignment operator<a class="headerlink" href="#bitwise-unsigned-right-shift-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1935
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">>>>=</span> <span class="pre">column2</span></code>.</p>
|
1890
1936
|
<p>The operator performs unsigned right shift assginment operation on column1 by column2.</p>
|
1891
1937
|
</div>
|
1892
1938
|
<div class="section" id="bitwise-and-assignment-operator">
|
1893
|
-
<h3>7.11.2.
|
1894
|
-
<p>Its syntax is <
|
1939
|
+
<h3>7.11.2.8.9. Bitwise AND assignment operator<a class="headerlink" href="#bitwise-and-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
1940
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">&=</span> <span class="pre">column2</span></code>.</p>
|
1895
1941
|
<p>The operator performs bitwise AND assignment operation on column1 by column2.</p>
|
1896
1942
|
<p>Execution example:</p>
|
1897
1943
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score &= n_likes'
|
@@ -1950,15 +1996,15 @@ is 3.</p>
|
|
1950
1996
|
# ]
|
1951
1997
|
</pre></div>
|
1952
1998
|
</div>
|
1953
|
-
<p>The value of <
|
1999
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
1954
2000
|
then performs subtraction assignment operation such as '_score = _score & n_likes' for each records.</p>
|
1955
|
-
<p>For example, the value of <
|
2001
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Groonga" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
1956
2002
|
is 10.</p>
|
1957
|
-
<p>So the expression <
|
2003
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">&</span> <span class="pre">10</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
1958
2004
|
</div>
|
1959
2005
|
<div class="section" id="bitwise-or-assignment-operator">
|
1960
|
-
<h3>7.11.2.
|
1961
|
-
<p>Its syntax is <
|
2006
|
+
<h3>7.11.2.8.10. Bitwise OR assignment operator<a class="headerlink" href="#bitwise-or-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
2007
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">|=</span> <span class="pre">column2</span></code>.</p>
|
1962
2008
|
<p>The operator performs bitwise OR assignment operation on column1 by column2.</p>
|
1963
2009
|
<p>Execution example:</p>
|
1964
2010
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score |= n_likes'
|
@@ -2017,15 +2063,15 @@ is 10.</p>
|
|
2017
2063
|
# ]
|
2018
2064
|
</pre></div>
|
2019
2065
|
</div>
|
2020
|
-
<p>The value of <
|
2066
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
2021
2067
|
then performs subtraction assignment operation such as '_score = _score | n_likes' for each records.</p>
|
2022
|
-
<p>For example, the value of <
|
2068
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Groonga" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
2023
2069
|
is 10.</p>
|
2024
|
-
<p>So the expression <
|
2070
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">|</span> <span class="pre">10</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
2025
2071
|
</div>
|
2026
2072
|
<div class="section" id="bitwise-xor-assignment-operator">
|
2027
|
-
<h3>7.11.2.
|
2028
|
-
<p>Its syntax is <
|
2073
|
+
<h3>7.11.2.8.11. Bitwise XOR assignment operator<a class="headerlink" href="#bitwise-xor-assignment-operator" title="Permalink to this headline">¶</a></h3>
|
2074
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column1</span> <span class="pre">^=</span> <span class="pre">column2</span></code>.</p>
|
2029
2075
|
<p>The operator performs bitwise XOR assginment operation on column1 by column2.</p>
|
2030
2076
|
<p>Execution example:</p>
|
2031
2077
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --output_columns _key,n_likes,_score --filter true --scorer '_score ^= n_likes'
|
@@ -2084,22 +2130,22 @@ is 10.</p>
|
|
2084
2130
|
# ]
|
2085
2131
|
</pre></div>
|
2086
2132
|
</div>
|
2087
|
-
<p>The value of <
|
2133
|
+
<p>The value of <code class="docutils literal"><span class="pre">_score</span></code> by <code class="docutils literal"><span class="pre">--filter</span></code> is always 1 in this case,
|
2088
2134
|
then performs subtraction assignment operation such as '_score = _score ^ n_likes' for each records.</p>
|
2089
|
-
<p>For example, the value of <
|
2135
|
+
<p>For example, the value of <code class="docutils literal"><span class="pre">_score</span></code> about the record which stores "Good-bye Senna" as the <code class="docutils literal"><span class="pre">_key</span></code>
|
2090
2136
|
is 3.</p>
|
2091
|
-
<p>So the expression <
|
2137
|
+
<p>So the expression <code class="docutils literal"><span class="pre">1</span> <span class="pre">^</span> <span class="pre">3</span></code> is evaluated and stored to <code class="docutils literal"><span class="pre">_score</span></code> column as the execution result.</p>
|
2092
2138
|
</div>
|
2093
2139
|
</div>
|
2094
2140
|
<div class="section" id="original-operators">
|
2095
|
-
<h2>7.11.2.
|
2141
|
+
<h2>7.11.2.9. Original operators<a class="headerlink" href="#original-operators" title="Permalink to this headline">¶</a></h2>
|
2096
2142
|
<p>Script syntax adds the original binary opearators to ECMAScript
|
2097
2143
|
syntax. They operate search specific operations. They are starts with
|
2098
|
-
<
|
2144
|
+
<code class="docutils literal"><span class="pre">@</span></code> or <code class="docutils literal"><span class="pre">*</span></code>.</p>
|
2099
2145
|
<div class="section" id="match-operator">
|
2100
|
-
<span id="match-oeprator"></span><h3>7.11.2.
|
2101
|
-
<p>Its syntax is <
|
2102
|
-
<p>The operator searches <
|
2146
|
+
<span id="match-oeprator"></span><h3>7.11.2.9.1. Match operator<a class="headerlink" href="#match-operator" title="Permalink to this headline">¶</a></h3>
|
2147
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column</span> <span class="pre">@</span> <span class="pre">value</span></code>.</p>
|
2148
|
+
<p>The operator searches <code class="docutils literal"><span class="pre">value</span></code> by inverted index of <code class="docutils literal"><span class="pre">column</span></code>.
|
2103
2149
|
Normally, full text search is operated but tag search can be operated.
|
2104
2150
|
Because tag search is also implemented by inverted index.</p>
|
2105
2151
|
<p><a class="reference internal" href="query_syntax.html"><em>Query syntax</em></a> uses this operator by default.</p>
|
@@ -2134,20 +2180,20 @@ Because tag search is also implemented by inverted index.</p>
|
|
2134
2180
|
# ]
|
2135
2181
|
</pre></div>
|
2136
2182
|
</div>
|
2137
|
-
<p>The expression matches records that contain a word <
|
2138
|
-
<
|
2183
|
+
<p>The expression matches records that contain a word <code class="docutils literal"><span class="pre">fast</span></code> in
|
2184
|
+
<code class="docutils literal"><span class="pre">content</span></code> column value.</p>
|
2139
2185
|
</div>
|
2140
2186
|
<div class="section" id="prefix-search-operator">
|
2141
|
-
<span id="id1"></span><h3>7.11.2.
|
2142
|
-
<p>Its syntax is <
|
2143
|
-
<p>The operator does prefix search with <
|
2144
|
-
records that contain a word that starts with <
|
2187
|
+
<span id="id1"></span><h3>7.11.2.9.2. Prefix search operator<a class="headerlink" href="#prefix-search-operator" title="Permalink to this headline">¶</a></h3>
|
2188
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column</span> <span class="pre">@^</span> <span class="pre">value</span></code>.</p>
|
2189
|
+
<p>The operator does prefix search with <code class="docutils literal"><span class="pre">value</span></code>. Prefix search searches
|
2190
|
+
records that contain a word that starts with <code class="docutils literal"><span class="pre">value</span></code>.</p>
|
2145
2191
|
<p>You can use fast prefix search against a column. The column must be
|
2146
2192
|
indexed and index table must be patricia trie table
|
2147
|
-
(<
|
2148
|
-
(<
|
2149
|
-
<
|
2150
|
-
table. You don't need to index <
|
2193
|
+
(<code class="docutils literal"><span class="pre">TABLE_PAT_KEY</span></code>) or double array trie table
|
2194
|
+
(<code class="docutils literal"><span class="pre">TABLE_DAT_KEY</span></code>). You can also use fast prefix search against
|
2195
|
+
<code class="docutils literal"><span class="pre">_key</span></code> pseudo column of patricia trie table or double array trie
|
2196
|
+
table. You don't need to index <code class="docutils literal"><span class="pre">_key</span></code>.</p>
|
2151
2197
|
<p>Prefix search can be used with other table types but it causes all
|
2152
2198
|
records scan. It's not problem for small records but it spends more
|
2153
2199
|
time for large records.</p>
|
@@ -2183,21 +2229,21 @@ time for large records.</p>
|
|
2183
2229
|
</pre></div>
|
2184
2230
|
</div>
|
2185
2231
|
<p>The expression matches records that contain a word that starts with
|
2186
|
-
<
|
2187
|
-
<
|
2232
|
+
<code class="docutils literal"><span class="pre">Goo</span></code> in <code class="docutils literal"><span class="pre">_key</span></code> pseudo column value. <code class="docutils literal"><span class="pre">Good-bye</span> <span class="pre">Senna</span></code> and
|
2233
|
+
<code class="docutils literal"><span class="pre">Good-bye</span> <span class="pre">Tritonn</span></code> are matched with the expression.</p>
|
2188
2234
|
</div>
|
2189
2235
|
<div class="section" id="suffix-search-operator">
|
2190
|
-
<span id="id2"></span><h3>7.11.2.
|
2191
|
-
<p>Its syntax is <
|
2192
|
-
<p>This operator does suffix search with <
|
2193
|
-
searches records that contain a word that ends with <
|
2236
|
+
<span id="id2"></span><h3>7.11.2.9.3. Suffix search operator<a class="headerlink" href="#suffix-search-operator" title="Permalink to this headline">¶</a></h3>
|
2237
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column</span> <span class="pre">@$</span> <span class="pre">value</span></code>.</p>
|
2238
|
+
<p>This operator does suffix search with <code class="docutils literal"><span class="pre">value</span></code>. Suffix search
|
2239
|
+
searches records that contain a word that ends with <code class="docutils literal"><span class="pre">value</span></code>.</p>
|
2194
2240
|
<p>You can use fast suffix search against a column. The column must be
|
2195
2241
|
indexed and index table must be patricia trie table
|
2196
|
-
(<
|
2197
|
-
suffix search against <
|
2198
|
-
(<
|
2199
|
-
index <
|
2200
|
-
suffix search instead of <
|
2242
|
+
(<code class="docutils literal"><span class="pre">TABLE_PAT_KEY</span></code>) with <code class="docutils literal"><span class="pre">KEY_WITH_SIS</span></code> flag. You can also use fast
|
2243
|
+
suffix search against <code class="docutils literal"><span class="pre">_key</span></code> pseudo column of patricia trie table
|
2244
|
+
(<code class="docutils literal"><span class="pre">TABLE_PAT_KEY</span></code>) with <code class="docutils literal"><span class="pre">KEY_WITH_SIS</span></code> flag. You don't need to
|
2245
|
+
index <code class="docutils literal"><span class="pre">_key</span></code>. We recommended that you use index column based fast
|
2246
|
+
suffix search instead of <code class="docutils literal"><span class="pre">_key</span></code> based fast suffix search. <code class="docutils literal"><span class="pre">_key</span></code>
|
2201
2247
|
based fast suffix search returns automatically registered
|
2202
2248
|
substrings. (TODO: write document about suffix search and link to it
|
2203
2249
|
from here.)</p>
|
@@ -2208,7 +2254,7 @@ as hiragana in Japanese. You cannot use fast suffix search for
|
|
2208
2254
|
ASCII character.</p>
|
2209
2255
|
</div>
|
2210
2256
|
<p>Suffix search can be used with other table types or patricia trie
|
2211
|
-
table without <
|
2257
|
+
table without <code class="docutils literal"><span class="pre">KEY_WITH_SIS</span></code> flag but it causes all records
|
2212
2258
|
scan. It's not problem for small records but it spends more time for
|
2213
2259
|
large records.</p>
|
2214
2260
|
<p>Here is a simple exmaple. It uses fast suffix search for hiragana in
|
@@ -2265,25 +2311,25 @@ select Titles --query 'content:$んが'
|
|
2265
2311
|
# ]
|
2266
2312
|
</pre></div>
|
2267
2313
|
</div>
|
2268
|
-
<p>The expression matches records that have value that ends with <
|
2269
|
-
in <
|
2314
|
+
<p>The expression matches records that have value that ends with <code class="docutils literal"><span class="pre">んが</span></code>
|
2315
|
+
in <code class="docutils literal"><span class="pre">content</span></code> column value. <code class="docutils literal"><span class="pre">ぐるんが</span></code> and <code class="docutils literal"><span class="pre">むるんが</span></code> are matched
|
2270
2316
|
with the expression.</p>
|
2271
2317
|
</div>
|
2272
2318
|
<div class="section" id="near-search-operator">
|
2273
|
-
<span id="id3"></span><h3>7.11.2.
|
2274
|
-
<p>Its syntax is <
|
2275
|
-
<p>The operator does near search with words <
|
2319
|
+
<span id="id3"></span><h3>7.11.2.9.4. Near search operator<a class="headerlink" href="#near-search-operator" title="Permalink to this headline">¶</a></h3>
|
2320
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column</span> <span class="pre">*N</span> <span class="pre">"word1</span> <span class="pre">word2</span> <span class="pre">..."</span></code>.</p>
|
2321
|
+
<p>The operator does near search with words <code class="docutils literal"><span class="pre">word1</span> <span class="pre">word2</span> <span class="pre">...</span></code>. Near
|
2276
2322
|
search searches records that contain the words and the words are
|
2277
|
-
appeared in the near distance. Near distance is always <
|
2323
|
+
appeared in the near distance. Near distance is always <code class="docutils literal"><span class="pre">10</span></code> for
|
2278
2324
|
now. The unit of near distance is the number of characters in N-gram
|
2279
2325
|
family tokenizers and the number of words in morphological analysis
|
2280
2326
|
family tokenizers.</p>
|
2281
|
-
<p>(TODO: Add a description about <
|
2327
|
+
<p>(TODO: Add a description about <code class="docutils literal"><span class="pre">TokenBigram</span></code> doesn't split ASCII
|
2282
2328
|
only word into tokens. So the unit for ASCII words with
|
2283
|
-
<
|
2329
|
+
<code class="docutils literal"><span class="pre">TokenBigram</span></code> is the number of words even if <code class="docutils literal"><span class="pre">TokenBigram</span></code> is a
|
2284
2330
|
N-gram family tokenizer.)</p>
|
2285
2331
|
<p>Note that an index column for full text search must be defined for
|
2286
|
-
<
|
2332
|
+
<code class="docutils literal"><span class="pre">column</span></code>.</p>
|
2287
2333
|
<p>Here is a simple exmaple.</p>
|
2288
2334
|
<p>Execution example:</p>
|
2289
2335
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'content *N "I fast"' --output_columns content
|
@@ -2338,30 +2384,30 @@ select Entries --filter 'content *N "also Really"' --output_co
|
|
2338
2384
|
# ]
|
2339
2385
|
</pre></div>
|
2340
2386
|
</div>
|
2341
|
-
<p>The first expression matches records that contain <
|
2387
|
+
<p>The first expression matches records that contain <code class="docutils literal"><span class="pre">I</span></code> and <code class="docutils literal"><span class="pre">fast</span></code>
|
2342
2388
|
and the near distance of those words are in 10 words. So the record
|
2343
|
-
that its content is <
|
2344
|
-
<span class="pre">fast!</span> <span class="pre">...</span></
|
2389
|
+
that its content is <code class="docutils literal"><span class="pre">I</span> <span class="pre">also</span> <span class="pre">started</span> <span class="pre">to</span> <span class="pre">use</span> <span class="pre">mroonga.</span> <span class="pre">It's</span> <span class="pre">also</span> <span class="pre">very</span>
|
2390
|
+
<span class="pre">fast!</span> <span class="pre">...</span></code> is matched. The number of words between <code class="docutils literal"><span class="pre">I</span></code> and <code class="docutils literal"><span class="pre">fast</span></code>
|
2345
2391
|
is just 10.</p>
|
2346
|
-
<p>The second expression matches records that contain <
|
2347
|
-
<
|
2348
|
-
the record that its content is <
|
2349
|
-
<span class="pre">also</span> <span class="pre">very</span> <span class="pre">fast!</span> <span class="pre">Really</span> <span class="pre">fast!</span></
|
2350
|
-
<
|
2351
|
-
<p>The third expression matches records that contain <
|
2352
|
-
<
|
2353
|
-
the record that its content is <
|
2354
|
-
<span class="pre">also</span> <span class="pre">very</span> <span class="pre">fast!</span> <span class="pre">Really</span> <span class="pre">fast!</span></
|
2355
|
-
<
|
2392
|
+
<p>The second expression matches records that contain <code class="docutils literal"><span class="pre">I</span></code> and
|
2393
|
+
<code class="docutils literal"><span class="pre">Really</span></code> and the near distance of those words are in 10 words. So
|
2394
|
+
the record that its content is <code class="docutils literal"><span class="pre">I</span> <span class="pre">also</span> <span class="pre">started</span> <span class="pre">to</span> <span class="pre">use</span> <span class="pre">mroonga.</span> <span class="pre">It's</span>
|
2395
|
+
<span class="pre">also</span> <span class="pre">very</span> <span class="pre">fast!</span> <span class="pre">Really</span> <span class="pre">fast!</span></code> is not matched. The number of words between
|
2396
|
+
<code class="docutils literal"><span class="pre">I</span></code> and <code class="docutils literal"><span class="pre">Really</span></code> is 11.</p>
|
2397
|
+
<p>The third expression matches records that contain <code class="docutils literal"><span class="pre">also</span></code> and
|
2398
|
+
<code class="docutils literal"><span class="pre">Really</span></code> and the near distance of those words are in 10 words. So
|
2399
|
+
the record that its content is <code class="docutils literal"><span class="pre">I</span> <span class="pre">also</span> <span class="pre">st</span> <span class="pre">arted</span> <span class="pre">to</span> <span class="pre">use</span> <span class="pre">mroonga.</span> <span class="pre">It's</span>
|
2400
|
+
<span class="pre">also</span> <span class="pre">very</span> <span class="pre">fast!</span> <span class="pre">Really</span> <span class="pre">fast!</span></code> is matched. The number of words between
|
2401
|
+
<code class="docutils literal"><span class="pre">also</span></code> and <code class="docutils literal"><span class="pre">Really</span></code> is 10.</p>
|
2356
2402
|
</div>
|
2357
2403
|
<div class="section" id="similar-search">
|
2358
|
-
<span id="similar-search-operator"></span><h3>7.11.2.
|
2359
|
-
<p>Its syntax is <
|
2360
|
-
<p>The operator does similar search with document <
|
2404
|
+
<span id="similar-search-operator"></span><h3>7.11.2.9.5. Similar search<a class="headerlink" href="#similar-search" title="Permalink to this headline">¶</a></h3>
|
2405
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">column</span> <span class="pre">*S</span> <span class="pre">"document"</span></code>.</p>
|
2406
|
+
<p>The operator does similar search with document <code class="docutils literal"><span class="pre">document</span></code>. Similar
|
2361
2407
|
search searches records that have similar content to
|
2362
|
-
<
|
2408
|
+
<code class="docutils literal"><span class="pre">document</span></code>.</p>
|
2363
2409
|
<p>Note that an index column for full text search must be defined for
|
2364
|
-
<
|
2410
|
+
<code class="docutils literal"><span class="pre">column</span></code>.</p>
|
2365
2411
|
<p>Here is a simple exmaple.</p>
|
2366
2412
|
<p>Execution example:</p>
|
2367
2413
|
<div class="highlight-none"><div class="highlight"><pre>select Entries --filter 'content *S "I migrated all Solr system!"' --output_columns content
|
@@ -2393,18 +2439,18 @@ search searches records that have similar content to
|
|
2393
2439
|
# ]
|
2394
2440
|
</pre></div>
|
2395
2441
|
</div>
|
2396
|
-
<p>The expression matches records that have similar content to <
|
2397
|
-
<span class="pre">migrated</span> <span class="pre">all</span> <span class="pre">Solr</span> <span class="pre">system!</span></
|
2398
|
-
<span class="pre">migrated</span> <span class="pre">all</span> <span class="pre">XXX</span> <span class="pre">system!</span></
|
2442
|
+
<p>The expression matches records that have similar content to <code class="docutils literal"><span class="pre">I</span>
|
2443
|
+
<span class="pre">migrated</span> <span class="pre">all</span> <span class="pre">Solr</span> <span class="pre">system!</span></code>. In this case, records that have <code class="docutils literal"><span class="pre">I</span>
|
2444
|
+
<span class="pre">migrated</span> <span class="pre">all</span> <span class="pre">XXX</span> <span class="pre">system!</span></code> content are matched.</p>
|
2399
2445
|
</div>
|
2400
2446
|
<div class="section" id="term-extract-operator">
|
2401
|
-
<span id="id4"></span><h3>7.11.2.
|
2402
|
-
<p>Its syntax is <
|
2403
|
-
<p>The operator extracts terms from <
|
2404
|
-
registered as keys of the table of <
|
2405
|
-
<p>Note that the table must be patricia trie (<
|
2406
|
-
double array trie (<
|
2407
|
-
(<
|
2447
|
+
<span id="id4"></span><h3>7.11.2.9.6. Term extract operator<a class="headerlink" href="#term-extract-operator" title="Permalink to this headline">¶</a></h3>
|
2448
|
+
<p>Its syntax is <code class="docutils literal"><span class="pre">_key</span> <span class="pre">*T</span> <span class="pre">"document"</span></code>.</p>
|
2449
|
+
<p>The operator extracts terms from <code class="docutils literal"><span class="pre">document</span></code>. Terms must be
|
2450
|
+
registered as keys of the table of <code class="docutils literal"><span class="pre">_key</span></code>.</p>
|
2451
|
+
<p>Note that the table must be patricia trie (<code class="docutils literal"><span class="pre">TABLE_PAT_KEY</span></code>) or
|
2452
|
+
double array trie (<code class="docutils literal"><span class="pre">TABLE_DAT_KEY</span></code>). You can't use hash table
|
2453
|
+
(<code class="docutils literal"><span class="pre">TABLE_HASH_KEY</span></code>) and array (<code class="docutils literal"><span class="pre">TABLE_NO_KEY</span></code>) because they don't
|
2408
2454
|
support longest common prefix search. Longest common prefix search is
|
2409
2455
|
used to implement the operator.</p>
|
2410
2456
|
<p>Here is a simple exmaple.</p>
|
@@ -2448,10 +2494,10 @@ select Words --filter '_key *T "Groonga is the successor project to Sen
|
|
2448
2494
|
# ]
|
2449
2495
|
</pre></div>
|
2450
2496
|
</div>
|
2451
|
-
<p>The expression extrcts terms that included in document <
|
2452
|
-
<span class="pre">the</span> <span class="pre">successor</span> <span class="pre">project</span> <span class="pre">to</span> <span class="pre">Senna.</span></
|
2453
|
-
flag is specified to <
|
2454
|
-
if it is loaded as <
|
2497
|
+
<p>The expression extrcts terms that included in document <code class="docutils literal"><span class="pre">Groonga</span> <span class="pre">is</span>
|
2498
|
+
<span class="pre">the</span> <span class="pre">successor</span> <span class="pre">project</span> <span class="pre">to</span> <span class="pre">Senna.</span></code>. In this case, <code class="docutils literal"><span class="pre">KEY_NORMALIZE</span></code>
|
2499
|
+
flag is specified to <code class="docutils literal"><span class="pre">Words</span></code>. So <code class="docutils literal"><span class="pre">Groonga</span></code> can be extracted even
|
2500
|
+
if it is loaded as <code class="docutils literal"><span class="pre">groonga</span></code> into <code class="docutils literal"><span class="pre">Words</span></code>. All of extracted terms
|
2455
2501
|
are also normalized.</p>
|
2456
2502
|
</div>
|
2457
2503
|
</div>
|
@@ -2461,87 +2507,88 @@ are also normalized.</p>
|
|
2461
2507
|
</div>
|
2462
2508
|
</div>
|
2463
2509
|
</div>
|
2464
|
-
<div class="sphinxsidebar">
|
2510
|
+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
2465
2511
|
<div class="sphinxsidebarwrapper">
|
2466
2512
|
<h3><a href="../../index.html">Table Of Contents</a></h3>
|
2467
2513
|
<ul>
|
2468
2514
|
<li><a class="reference internal" href="#">7.11.2. Script syntax</a><ul>
|
2469
|
-
<li><a class="reference internal" href="#
|
2470
|
-
<li><a class="reference internal" href="#
|
2471
|
-
<li><a class="reference internal" href="#
|
2472
|
-
<li><a class="reference internal" href="#
|
2473
|
-
<li><a class="reference internal" href="#
|
2474
|
-
<li><a class="reference internal" href="#
|
2475
|
-
<li><a class="reference internal" href="#
|
2476
|
-
<li><a class="reference internal" href="#
|
2477
|
-
<li><a class="reference internal" href="#
|
2478
|
-
<li><a class="reference internal" href="#
|
2479
|
-
<li><a class="reference internal" href="#
|
2515
|
+
<li><a class="reference internal" href="#security">7.11.2.1. Security</a></li>
|
2516
|
+
<li><a class="reference internal" href="#sample-data">7.11.2.2. Sample data</a></li>
|
2517
|
+
<li><a class="reference internal" href="#literals">7.11.2.3. Literals</a><ul>
|
2518
|
+
<li><a class="reference internal" href="#integer">7.11.2.3.1. Integer</a></li>
|
2519
|
+
<li><a class="reference internal" href="#float">7.11.2.3.2. Float</a></li>
|
2520
|
+
<li><a class="reference internal" href="#string">7.11.2.3.3. String</a></li>
|
2521
|
+
<li><a class="reference internal" href="#boolean">7.11.2.3.4. Boolean</a></li>
|
2522
|
+
<li><a class="reference internal" href="#null">7.11.2.3.5. Null</a></li>
|
2523
|
+
<li><a class="reference internal" href="#time">7.11.2.3.6. Time</a></li>
|
2524
|
+
<li><a class="reference internal" href="#geo-point">7.11.2.3.7. Geo point</a></li>
|
2525
|
+
<li><a class="reference internal" href="#array">7.11.2.3.8. Array</a></li>
|
2526
|
+
<li><a class="reference internal" href="#object-literal">7.11.2.3.9. Object literal</a></li>
|
2480
2527
|
</ul>
|
2481
2528
|
</li>
|
2482
|
-
<li><a class="reference internal" href="#control-syntaxes">7.11.2.
|
2483
|
-
<li><a class="reference internal" href="#grouping">7.11.2.
|
2484
|
-
<li><a class="reference internal" href="#function-call">7.11.2.
|
2485
|
-
<li><a class="reference internal" href="#basic-operators">7.11.2.
|
2486
|
-
<li><a class="reference internal" href="#arithmetic-operators">7.11.2.
|
2487
|
-
<li><a class="reference internal" href="#addition-operator">7.11.2.
|
2488
|
-
<li><a class="reference internal" href="#subtraction-operator">7.11.2.
|
2489
|
-
<li><a class="reference internal" href="#multiplication-operator">7.11.2.
|
2490
|
-
<li><a class="reference internal" href="#division-operator">7.11.2.
|
2529
|
+
<li><a class="reference internal" href="#control-syntaxes">7.11.2.4. Control syntaxes</a></li>
|
2530
|
+
<li><a class="reference internal" href="#grouping">7.11.2.5. Grouping</a></li>
|
2531
|
+
<li><a class="reference internal" href="#function-call">7.11.2.6. Function call</a></li>
|
2532
|
+
<li><a class="reference internal" href="#basic-operators">7.11.2.7. Basic operators</a><ul>
|
2533
|
+
<li><a class="reference internal" href="#arithmetic-operators">7.11.2.7.1. Arithmetic operators</a><ul>
|
2534
|
+
<li><a class="reference internal" href="#addition-operator">7.11.2.7.1.1. Addition operator</a></li>
|
2535
|
+
<li><a class="reference internal" href="#subtraction-operator">7.11.2.7.1.2. Subtraction operator</a></li>
|
2536
|
+
<li><a class="reference internal" href="#multiplication-operator">7.11.2.7.1.3. Multiplication operator</a></li>
|
2537
|
+
<li><a class="reference internal" href="#division-operator">7.11.2.7.1.4. Division operator</a></li>
|
2491
2538
|
</ul>
|
2492
2539
|
</li>
|
2493
|
-
<li><a class="reference internal" href="#logical-operators">7.11.2.
|
2494
|
-
<li><a class="reference internal" href="#logical-not-operator">7.11.2.
|
2495
|
-
<li><a class="reference internal" href="#logical-and-operator">7.11.2.
|
2496
|
-
<li><a class="reference internal" href="#logical-or-operator">7.11.2.
|
2497
|
-
<li><a class="reference internal" href="#logical-and-not-operator">7.11.2.
|
2540
|
+
<li><a class="reference internal" href="#logical-operators">7.11.2.7.2. Logical operators</a><ul>
|
2541
|
+
<li><a class="reference internal" href="#logical-not-operator">7.11.2.7.2.1. Logical NOT operator</a></li>
|
2542
|
+
<li><a class="reference internal" href="#logical-and-operator">7.11.2.7.2.2. Logical AND operator</a></li>
|
2543
|
+
<li><a class="reference internal" href="#logical-or-operator">7.11.2.7.2.3. Logical OR operator</a></li>
|
2544
|
+
<li><a class="reference internal" href="#logical-and-not-operator">7.11.2.7.2.4. Logical AND NOT operator</a></li>
|
2498
2545
|
</ul>
|
2499
2546
|
</li>
|
2500
|
-
<li><a class="reference internal" href="#bitwise-operators">7.11.2.
|
2501
|
-
<li><a class="reference internal" href="#bitwise-not-operator">7.11.2.
|
2502
|
-
<li><a class="reference internal" href="#bitwise-and-operator">7.11.2.
|
2547
|
+
<li><a class="reference internal" href="#bitwise-operators">7.11.2.7.3. Bitwise operators</a><ul>
|
2548
|
+
<li><a class="reference internal" href="#bitwise-not-operator">7.11.2.7.3.1. Bitwise NOT operator</a></li>
|
2549
|
+
<li><a class="reference internal" href="#bitwise-and-operator">7.11.2.7.3.2. Bitwise AND operator</a></li>
|
2503
2550
|
</ul>
|
2504
2551
|
</li>
|
2505
|
-
<li><a class="reference internal" href="#bitwise-or-operator">7.11.2.
|
2506
|
-
<li><a class="reference internal" href="#bitwise-xor-operator">7.11.2.
|
2507
|
-
<li><a class="reference internal" href="#shift-operators">7.11.2.
|
2508
|
-
<li><a class="reference internal" href="#left-shift-operator">7.11.2.
|
2509
|
-
<li><a class="reference internal" href="#signed-right-shift-operator">7.11.2.
|
2510
|
-
<li><a class="reference internal" href="#unsigned-right-shift-operator">7.11.2.
|
2552
|
+
<li><a class="reference internal" href="#bitwise-or-operator">7.11.2.7.4. Bitwise OR operator</a></li>
|
2553
|
+
<li><a class="reference internal" href="#bitwise-xor-operator">7.11.2.7.5. Bitwise XOR operator</a></li>
|
2554
|
+
<li><a class="reference internal" href="#shift-operators">7.11.2.7.6. Shift operators</a><ul>
|
2555
|
+
<li><a class="reference internal" href="#left-shift-operator">7.11.2.7.6.1. Left shift operator</a></li>
|
2556
|
+
<li><a class="reference internal" href="#signed-right-shift-operator">7.11.2.7.6.2. Signed right shift operator</a></li>
|
2557
|
+
<li><a class="reference internal" href="#unsigned-right-shift-operator">7.11.2.7.6.3. Unsigned right shift operator</a></li>
|
2511
2558
|
</ul>
|
2512
2559
|
</li>
|
2513
|
-
<li><a class="reference internal" href="#comparison-operators">7.11.2.
|
2514
|
-
<li><a class="reference internal" href="#equal-operator">7.11.2.
|
2515
|
-
<li><a class="reference internal" href="#not-equal-operator">7.11.2.
|
2516
|
-
<li><a class="reference internal" href="#less-than-operator">7.11.2.
|
2517
|
-
<li><a class="reference internal" href="#less-than-or-equal-to-operator">7.11.2.
|
2518
|
-
<li><a class="reference internal" href="#greater-than-operator">7.11.2.
|
2519
|
-
<li><a class="reference internal" href="#greater-than-or-equal-to-operator">7.11.2.
|
2560
|
+
<li><a class="reference internal" href="#comparison-operators">7.11.2.7.7. Comparison operators</a><ul>
|
2561
|
+
<li><a class="reference internal" href="#equal-operator">7.11.2.7.7.1. Equal operator</a></li>
|
2562
|
+
<li><a class="reference internal" href="#not-equal-operator">7.11.2.7.7.2. Not equal operator</a></li>
|
2563
|
+
<li><a class="reference internal" href="#less-than-operator">7.11.2.7.7.3. Less than operator</a></li>
|
2564
|
+
<li><a class="reference internal" href="#less-than-or-equal-to-operator">7.11.2.7.7.4. Less than or equal to operator</a></li>
|
2565
|
+
<li><a class="reference internal" href="#greater-than-operator">7.11.2.7.7.5. Greater than operator</a></li>
|
2566
|
+
<li><a class="reference internal" href="#greater-than-or-equal-to-operator">7.11.2.7.7.6. Greater than or equal to operator</a></li>
|
2520
2567
|
</ul>
|
2521
2568
|
</li>
|
2522
2569
|
</ul>
|
2523
2570
|
</li>
|
2524
|
-
<li><a class="reference internal" href="#assignment-operators">7.11.2.
|
2525
|
-
<li><a class="reference internal" href="#addition-assignment-operator">7.11.2.
|
2526
|
-
<li><a class="reference internal" href="#subtraction-assignment-operator">7.11.2.
|
2527
|
-
<li><a class="reference internal" href="#multiplication-assignment-operator">7.11.2.
|
2528
|
-
<li><a class="reference internal" href="#division-assignment-operator">7.11.2.
|
2529
|
-
<li><a class="reference internal" href="#modulo-assignment-operator">7.11.2.
|
2530
|
-
<li><a class="reference internal" href="#bitwise-left-shift-assignment-operator">7.11.2.
|
2531
|
-
<li><a class="reference internal" href="#bitwise-signed-right-shift-assignment-operator">7.11.2.
|
2532
|
-
<li><a class="reference internal" href="#bitwise-unsigned-right-shift-assignment-operator">7.11.2.
|
2533
|
-
<li><a class="reference internal" href="#bitwise-and-assignment-operator">7.11.2.
|
2534
|
-
<li><a class="reference internal" href="#bitwise-or-assignment-operator">7.11.2.
|
2535
|
-
<li><a class="reference internal" href="#bitwise-xor-assignment-operator">7.11.2.
|
2571
|
+
<li><a class="reference internal" href="#assignment-operators">7.11.2.8. Assignment operators</a><ul>
|
2572
|
+
<li><a class="reference internal" href="#addition-assignment-operator">7.11.2.8.1. Addition assignment operator</a></li>
|
2573
|
+
<li><a class="reference internal" href="#subtraction-assignment-operator">7.11.2.8.2. Subtraction assignment operator</a></li>
|
2574
|
+
<li><a class="reference internal" href="#multiplication-assignment-operator">7.11.2.8.3. Multiplication assignment operator</a></li>
|
2575
|
+
<li><a class="reference internal" href="#division-assignment-operator">7.11.2.8.4. Division assignment operator</a></li>
|
2576
|
+
<li><a class="reference internal" href="#modulo-assignment-operator">7.11.2.8.5. Modulo assignment operator</a></li>
|
2577
|
+
<li><a class="reference internal" href="#bitwise-left-shift-assignment-operator">7.11.2.8.6. Bitwise left shift assignment operator</a></li>
|
2578
|
+
<li><a class="reference internal" href="#bitwise-signed-right-shift-assignment-operator">7.11.2.8.7. Bitwise signed right shift assignment operator</a></li>
|
2579
|
+
<li><a class="reference internal" href="#bitwise-unsigned-right-shift-assignment-operator">7.11.2.8.8. Bitwise unsigned right shift assignment operator</a></li>
|
2580
|
+
<li><a class="reference internal" href="#bitwise-and-assignment-operator">7.11.2.8.9. Bitwise AND assignment operator</a></li>
|
2581
|
+
<li><a class="reference internal" href="#bitwise-or-assignment-operator">7.11.2.8.10. Bitwise OR assignment operator</a></li>
|
2582
|
+
<li><a class="reference internal" href="#bitwise-xor-assignment-operator">7.11.2.8.11. Bitwise XOR assignment operator</a></li>
|
2536
2583
|
</ul>
|
2537
2584
|
</li>
|
2538
|
-
<li><a class="reference internal" href="#original-operators">7.11.2.
|
2539
|
-
<li><a class="reference internal" href="#match-operator">7.11.2.
|
2540
|
-
<li><a class="reference internal" href="#prefix-search-operator">7.11.2.
|
2541
|
-
<li><a class="reference internal" href="#suffix-search-operator">7.11.2.
|
2542
|
-
<li><a class="reference internal" href="#near-search-operator">7.11.2.
|
2543
|
-
<li><a class="reference internal" href="#similar-search">7.11.2.
|
2544
|
-
<li><a class="reference internal" href="#term-extract-operator">7.11.2.
|
2585
|
+
<li><a class="reference internal" href="#original-operators">7.11.2.9. Original operators</a><ul>
|
2586
|
+
<li><a class="reference internal" href="#match-operator">7.11.2.9.1. Match operator</a></li>
|
2587
|
+
<li><a class="reference internal" href="#prefix-search-operator">7.11.2.9.2. Prefix search operator</a></li>
|
2588
|
+
<li><a class="reference internal" href="#suffix-search-operator">7.11.2.9.3. Suffix search operator</a></li>
|
2589
|
+
<li><a class="reference internal" href="#near-search-operator">7.11.2.9.4. Near search operator</a></li>
|
2590
|
+
<li><a class="reference internal" href="#similar-search">7.11.2.9.5. Similar search</a></li>
|
2591
|
+
<li><a class="reference internal" href="#term-extract-operator">7.11.2.9.6. Term extract operator</a></li>
|
2545
2592
|
</ul>
|
2546
2593
|
</li>
|
2547
2594
|
</ul>
|
@@ -2554,12 +2601,14 @@ are also normalized.</p>
|
|
2554
2601
|
<h4>Next topic</h4>
|
2555
2602
|
<p class="topless"><a href="../function.html"
|
2556
2603
|
title="next chapter">7.12. Function</a></p>
|
2557
|
-
<
|
2558
|
-
|
2559
|
-
<
|
2560
|
-
|
2561
|
-
|
2562
|
-
|
2604
|
+
<div role="note" aria-label="source link">
|
2605
|
+
<h3>This Page</h3>
|
2606
|
+
<ul class="this-page-menu">
|
2607
|
+
<li><a href="../../_sources/reference/grn_expr/script_syntax.txt"
|
2608
|
+
rel="nofollow">Show Source</a></li>
|
2609
|
+
</ul>
|
2610
|
+
</div>
|
2611
|
+
<div id="searchbox" style="display: none" role="search">
|
2563
2612
|
<h3>Quick search</h3>
|
2564
2613
|
<form class="search" action="../../search.html" method="get">
|
2565
2614
|
<input type="text" name="q" />
|
@@ -2576,7 +2625,7 @@ are also normalized.</p>
|
|
2576
2625
|
</div>
|
2577
2626
|
<div class="clearer"></div>
|
2578
2627
|
</div>
|
2579
|
-
<div class="related">
|
2628
|
+
<div class="related" role="navigation" aria-label="related navigation">
|
2580
2629
|
<h3>Navigation</h3>
|
2581
2630
|
<ul>
|
2582
2631
|
<li class="right" style="margin-right: 10px">
|
@@ -2588,13 +2637,13 @@ are also normalized.</p>
|
|
2588
2637
|
<li class="right" >
|
2589
2638
|
<a href="query_syntax.html" title="7.11.1. Query syntax"
|
2590
2639
|
>previous</a> |</li>
|
2591
|
-
<li><a href="../../index.html">Groonga
|
2640
|
+
<li><a href="../../index.html">Groonga v5.0.0 documentation</a> »</li>
|
2592
2641
|
<li><a href="../../reference.html" >7. Reference manual</a> »</li>
|
2593
2642
|
<li><a href="../grn_expr.html" >7.11. grn_expr</a> »</li>
|
2594
2643
|
</ul>
|
2595
2644
|
</div>
|
2596
|
-
<div class="footer">
|
2597
|
-
© Copyright 2009-
|
2645
|
+
<div class="footer" role="contentinfo">
|
2646
|
+
© Copyright 2009-2015, Brazil, Inc.
|
2598
2647
|
</div>
|
2599
2648
|
</body>
|
2600
2649
|
</html>
|