rroonga 4.0.0-x86-mingw32 → 4.0.1-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/.yardopts +6 -0
 - data/doc/text/news.textile +26 -0
 - data/ext/groonga/rb-grn-column.c +42 -2
 - data/ext/groonga/rb-grn-index-column.c +57 -159
 - data/ext/groonga/rb-grn-object.c +7 -0
 - data/ext/groonga/rb-grn-table.c +19 -3
 - data/ext/groonga/rb-grn-utils.c +4 -1
 - data/ext/groonga/rb-grn-variable-size-column.c +405 -5
 - data/ext/groonga/rb-grn.h +18 -1
 - 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/dumper.rb +46 -22
 - data/lib/groonga/expression-builder.rb +2 -4
 - data/lib/groonga/schema.rb +16 -234
 - data/rroonga-build.rb +3 -3
 - data/rroonga.gemspec +1 -1
 - data/test/test-array.rb +6 -5
 - data/test/test-column.rb +0 -14
 - data/test/test-database.rb +6 -5
 - data/test/test-double-array-trie.rb +6 -5
 - data/test/test-expression.rb +2 -2
 - data/test/test-hash.rb +6 -5
 - data/test/test-index-column.rb +163 -33
 - data/test/test-patricia-trie.rb +6 -5
 - data/test/test-schema-dumper.rb +39 -7
 - data/test/test-table-dumper.rb +46 -1
 - data/test/test-table-select-weight.rb +12 -0
 - data/test/test-variable-size-column.rb +87 -3
 - data/vendor/local/bin/groonga-benchmark.exe +0 -0
 - data/vendor/local/bin/groonga.exe +0 -0
 - data/vendor/local/bin/libgroonga-0.dll +0 -0
 - data/vendor/local/bin/libmecab-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/mecab.exe +0 -0
 - data/vendor/local/include/groonga/groonga.h +6 -1
 - 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/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/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/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/libgroonga.a +0 -0
 - data/vendor/local/lib/libgroonga.dll.a +0 -0
 - data/vendor/local/lib/libmecab.a +0 -0
 - data/vendor/local/lib/libmecab.dll.a +0 -0
 - data/vendor/local/lib/libmsgpack.a +0 -0
 - data/vendor/local/lib/libmsgpack.dll.a +0 -0
 - data/vendor/local/lib/libmsgpackc.a +0 -0
 - data/vendor/local/lib/libmsgpackc.dll.a +0 -0
 - data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
 - data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
 - data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
 - data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
 - 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 +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -3
 - 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 +41 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/column.txt +25 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/vector.txt +333 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/cache_limit.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_create.txt +1 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_rename.txt +37 -17
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/delete.txt +4 -5
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalize.txt +1 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +99 -0
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_create.txt +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt +1 -2
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-httpd.txt +128 -4
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-learner.txt +11 -1
 - data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +3 -2
 - data/vendor/local/share/doc/groonga/en/html/_static/basic.css +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/genindex.html +11 -11
 - data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/index.html +68 -67
 - data/vendor/local/share/doc/groonga/en/html/install/centos.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/fedora.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/news.html +247 -200
 - data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/api.html +38 -38
 - data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/reference/column.html +153 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +857 -0
 - data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/command.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +8 -9
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +47 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +8 -9
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +10 -10
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +193 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +12 -12
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +8 -9
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +10 -10
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +165 -13
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +25 -8
 - data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +7 -7
 - data/vendor/local/share/doc/groonga/en/html/reference/executables.html +12 -12
 - data/vendor/local/share/doc/groonga/en/html/reference/function.html +28 -28
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +40 -40
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +50 -50
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +34 -34
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +30 -30
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +46 -46
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +32 -32
 - data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +36 -36
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +62 -62
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +140 -140
 - data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +24 -24
 - data/vendor/local/share/doc/groonga/en/html/reference/log.html +26 -26
 - data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +31 -31
 - data/vendor/local/share/doc/groonga/en/html/reference/output.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/reference/pseudo_column.html +22 -22
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +36 -36
 - data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +18 -18
 - data/vendor/local/share/doc/groonga/en/html/reference/tables.html +13 -13
 - data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +17 -17
 - data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +38 -38
 - data/vendor/local/share/doc/groonga/en/html/reference/types.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/reference.html +69 -68
 - data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server/package.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/spec.html +9 -9
 - data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +8 -8
 - data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +12 -12
 - data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
 - data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
 - 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 +3 -3
 - 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 +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
 - data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -3
 - 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 +41 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/column.txt +25 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/vector.txt +333 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/cache_limit.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_create.txt +1 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_rename.txt +37 -17
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/delete.txt +4 -5
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalize.txt +1 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +99 -0
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_create.txt +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt +1 -2
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-httpd.txt +128 -4
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-learner.txt +11 -1
 - data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +3 -2
 - data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/genindex.html +11 -11
 - data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/index.html +67 -66
 - data/vendor/local/share/doc/groonga/ja/html/install/centos.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/others.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/install/windows.html +14 -14
 - data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/news.html +262 -200
 - data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +22 -22
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +24 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +20 -20
 - data/vendor/local/share/doc/groonga/ja/html/reference/api.html +35 -35
 - data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/column.html +150 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +824 -0
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/command.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +45 -24
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +8 -7
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +174 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +10 -10
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +6 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +167 -11
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +23 -6
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/function.html +25 -25
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +38 -38
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +48 -48
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +32 -32
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +44 -44
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +30 -30
 - data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +34 -34
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +60 -60
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +138 -138
 - data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +19 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +21 -21
 - data/vendor/local/share/doc/groonga/ja/html/reference/log.html +23 -23
 - data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +28 -28
 - data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference/pseudo_column.html +19 -19
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +34 -34
 - data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +15 -15
 - data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +10 -10
 - data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +14 -14
 - data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +35 -35
 - data/vendor/local/share/doc/groonga/ja/html/reference/types.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/reference.html +69 -68
 - data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
 - data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/spec.html +9 -9
 - data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +8 -8
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +12 -12
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
 - data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
 - data/vendor/local/share/man/ja/man1/groonga.1 +526 -73
 - data/vendor/local/share/man/man1/groonga.1 +552 -80
 - metadata +148 -139
 
    
        data/lib/groonga/schema.rb
    CHANGED
    
    | 
         @@ -470,82 +470,6 @@ module Groonga 
     | 
|
| 
       470 
470 
     | 
    
         
             
                    end
         
     | 
| 
       471 
471 
     | 
    
         
             
                  end
         
     | 
| 
       472 
472 
     | 
    
         | 
| 
       473 
     | 
    
         
            -
                  # 名前が_name_のビューを作成する。以下の省略形。
         
     | 
| 
       474 
     | 
    
         
            -
                  #
         
     | 
| 
       475 
     | 
    
         
            -
                  # <pre>
         
     | 
| 
       476 
     | 
    
         
            -
                  # !!!ruby
         
     | 
| 
       477 
     | 
    
         
            -
                  # Groonga::Schema.define do |schema|
         
     | 
| 
       478 
     | 
    
         
            -
                  #   schema.create_view(name, options) do |view|
         
     | 
| 
       479 
     | 
    
         
            -
                  #     # ...
         
     | 
| 
       480 
     | 
    
         
            -
                  #   end
         
     | 
| 
       481 
     | 
    
         
            -
                  # end
         
     | 
| 
       482 
     | 
    
         
            -
                  # </pre>
         
     | 
| 
       483 
     | 
    
         
            -
                  # ブロックには {Groonga::Schema::ViewDefinition} オブジェ
         
     | 
| 
       484 
     | 
    
         
            -
                  # クトがわたるので、そのオブジェクトを利用してビュー
         
     | 
| 
       485 
     | 
    
         
            -
                  # の詳細を定義する。
         
     | 
| 
       486 
     | 
    
         
            -
                  #
         
     | 
| 
       487 
     | 
    
         
            -
                  # @param options [::Hash] The name and value
         
     | 
| 
       488 
     | 
    
         
            -
                  #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       489 
     | 
    
         
            -
                  # @option options :force The force
         
     | 
| 
       490 
     | 
    
         
            -
                  #
         
     | 
| 
       491 
     | 
    
         
            -
                  #   +true+ を指定すると既存の同名のビューが
         
     | 
| 
       492 
     | 
    
         
            -
                  #   存在していても、強制的にビューを作成する。
         
     | 
| 
       493 
     | 
    
         
            -
                  # @option options :context (Groonga::Context.default) The context
         
     | 
| 
       494 
     | 
    
         
            -
                  #
         
     | 
| 
       495 
     | 
    
         
            -
                  #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       496 
     | 
    
         
            -
                  # @option options :path The path
         
     | 
| 
       497 
     | 
    
         
            -
                  #
         
     | 
| 
       498 
     | 
    
         
            -
                  #   ビューを保存するパスを指定する。
         
     | 
| 
       499 
     | 
    
         
            -
                  #   パスを指定すると永続ビューになる。
         
     | 
| 
       500 
     | 
    
         
            -
                  # @option options :persistent (true) The persistent
         
     | 
| 
       501 
     | 
    
         
            -
                  #
         
     | 
| 
       502 
     | 
    
         
            -
                  #   ビューを永続ビューとする。 +:path:+ を省略した場
         
     | 
| 
       503 
     | 
    
         
            -
                  #   合はパス名は自動的に作成される。デフォルトでは永続
         
     | 
| 
       504 
     | 
    
         
            -
                  #   ビューとなる。
         
     | 
| 
       505 
     | 
    
         
            -
                  def create_view(name, options={}, &block)
         
     | 
| 
       506 
     | 
    
         
            -
                    define do |schema|
         
     | 
| 
       507 
     | 
    
         
            -
                      schema.create_view(name, options, &block)
         
     | 
| 
       508 
     | 
    
         
            -
                    end
         
     | 
| 
       509 
     | 
    
         
            -
                  end
         
     | 
| 
       510 
     | 
    
         
            -
             
     | 
| 
       511 
     | 
    
         
            -
                  # 名前が _name_ のテーブルを削除する。
         
     | 
| 
       512 
     | 
    
         
            -
                  #
         
     | 
| 
       513 
     | 
    
         
            -
                  # @param options [::Hash] The name and value
         
     | 
| 
       514 
     | 
    
         
            -
                  #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       515 
     | 
    
         
            -
                  # @option options :context (Groonga::context.default) The context
         
     | 
| 
       516 
     | 
    
         
            -
                  #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       517 
     | 
    
         
            -
                  def remove_view(name, options={})
         
     | 
| 
       518 
     | 
    
         
            -
                    define do |schema|
         
     | 
| 
       519 
     | 
    
         
            -
                      schema.remove_view(name, options)
         
     | 
| 
       520 
     | 
    
         
            -
                    end
         
     | 
| 
       521 
     | 
    
         
            -
                  end
         
     | 
| 
       522 
     | 
    
         
            -
             
     | 
| 
       523 
     | 
    
         
            -
                  # 名前が _name_ のビューを変更する。以下の省略形。
         
     | 
| 
       524 
     | 
    
         
            -
                  #
         
     | 
| 
       525 
     | 
    
         
            -
                  # <pre>
         
     | 
| 
       526 
     | 
    
         
            -
                  # !!!ruby
         
     | 
| 
       527 
     | 
    
         
            -
                  # Groonga::Schema.define do |schema|
         
     | 
| 
       528 
     | 
    
         
            -
                  #   schema.change_view(name, options) do |view|
         
     | 
| 
       529 
     | 
    
         
            -
                  #     # ...
         
     | 
| 
       530 
     | 
    
         
            -
                  #   end
         
     | 
| 
       531 
     | 
    
         
            -
                  # end
         
     | 
| 
       532 
     | 
    
         
            -
                  # </pre>
         
     | 
| 
       533 
     | 
    
         
            -
                  #
         
     | 
| 
       534 
     | 
    
         
            -
                  # ブロックには {Groonga::Schema::ViewDefinition} オブジェ
         
     | 
| 
       535 
     | 
    
         
            -
                  # クトがわたるので、そのオブジェクトを利用してテーブル
         
     | 
| 
       536 
     | 
    
         
            -
                  # の詳細を定義する。
         
     | 
| 
       537 
     | 
    
         
            -
                  #
         
     | 
| 
       538 
     | 
    
         
            -
                  # @param options [::Hash] The name and value
         
     | 
| 
       539 
     | 
    
         
            -
                  #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       540 
     | 
    
         
            -
                  # @option options :context (Groonga::Context.default) The context
         
     | 
| 
       541 
     | 
    
         
            -
                  #
         
     | 
| 
       542 
     | 
    
         
            -
                  #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       543 
     | 
    
         
            -
                  def change_view(name, options={}, &block)
         
     | 
| 
       544 
     | 
    
         
            -
                    define do |schema|
         
     | 
| 
       545 
     | 
    
         
            -
                      schema.change_view(name, options, &block)
         
     | 
| 
       546 
     | 
    
         
            -
                    end
         
     | 
| 
       547 
     | 
    
         
            -
                  end
         
     | 
| 
       548 
     | 
    
         
            -
             
     | 
| 
       549 
473 
     | 
    
         
             
                  # 以下と同様:
         
     | 
| 
       550 
474 
     | 
    
         
             
                  #
         
     | 
| 
       551 
475 
     | 
    
         
             
                  # <pre>
         
     | 
| 
         @@ -825,69 +749,6 @@ module Groonga 
     | 
|
| 
       825 
749 
     | 
    
         
             
                  @definitions << definition
         
     | 
| 
       826 
750 
     | 
    
         
             
                end
         
     | 
| 
       827 
751 
     | 
    
         | 
| 
       828 
     | 
    
         
            -
                # 名前が _name_ のビューを作成する。
         
     | 
| 
       829 
     | 
    
         
            -
                #
         
     | 
| 
       830 
     | 
    
         
            -
                # ビューの作成は {#define} を呼び出すまでは実行されないこ
         
     | 
| 
       831 
     | 
    
         
            -
                # とに注意すること。
         
     | 
| 
       832 
     | 
    
         
            -
                #
         
     | 
| 
       833 
     | 
    
         
            -
                # @param options [::Hash] The name and value
         
     | 
| 
       834 
     | 
    
         
            -
                #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       835 
     | 
    
         
            -
                # @option options :force The force
         
     | 
| 
       836 
     | 
    
         
            -
                #
         
     | 
| 
       837 
     | 
    
         
            -
                #   +true+ を指定すると既存の同名の
         
     | 
| 
       838 
     | 
    
         
            -
                #   ビューが存在していても、強制的にビューを作成する。
         
     | 
| 
       839 
     | 
    
         
            -
                # @option options [Groonga::Context] :context (Groonga::Schema.new) The context
         
     | 
| 
       840 
     | 
    
         
            -
                #
         
     | 
| 
       841 
     | 
    
         
            -
                #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       842 
     | 
    
         
            -
                #   {Groonga::Schema.new} で指定していない場合は
         
     | 
| 
       843 
     | 
    
         
            -
                #   {Groonga::Context.default} を使用する。
         
     | 
| 
       844 
     | 
    
         
            -
                # @option options :path The path
         
     | 
| 
       845 
     | 
    
         
            -
                #
         
     | 
| 
       846 
     | 
    
         
            -
                #   テーブルを保存するパスを指定する。パスを指定すると
         
     | 
| 
       847 
     | 
    
         
            -
                #   永続テーブルになる。
         
     | 
| 
       848 
     | 
    
         
            -
                # @option options :persistent (true) The persistent
         
     | 
| 
       849 
     | 
    
         
            -
                #
         
     | 
| 
       850 
     | 
    
         
            -
                #   テーブルを永続テーブルとする。 +:path:+ を省略した場合は
         
     | 
| 
       851 
     | 
    
         
            -
                #   パス名は自動的に作成される。デフォルトでは永続テーブルとなる。
         
     | 
| 
       852 
     | 
    
         
            -
                def create_view(name, options={})
         
     | 
| 
       853 
     | 
    
         
            -
                  definition = ViewDefinition.new(name, @options.merge(options || {}))
         
     | 
| 
       854 
     | 
    
         
            -
                  yield(definition)
         
     | 
| 
       855 
     | 
    
         
            -
                  @definitions << definition
         
     | 
| 
       856 
     | 
    
         
            -
                end
         
     | 
| 
       857 
     | 
    
         
            -
             
     | 
| 
       858 
     | 
    
         
            -
                # 名前が _name_ のビューを削除する。
         
     | 
| 
       859 
     | 
    
         
            -
                #
         
     | 
| 
       860 
     | 
    
         
            -
                # ビューの削除は {#define} を呼び出すまでは実行されないことに
         
     | 
| 
       861 
     | 
    
         
            -
                # 注意すること。
         
     | 
| 
       862 
     | 
    
         
            -
                #
         
     | 
| 
       863 
     | 
    
         
            -
                # @param options [::Hash] The name and value
         
     | 
| 
       864 
     | 
    
         
            -
                #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       865 
     | 
    
         
            -
                # @option options [Groonga::Context] :context (Groonga::Context.default)
         
     | 
| 
       866 
     | 
    
         
            -
                #   The context
         
     | 
| 
       867 
     | 
    
         
            -
                #
         
     | 
| 
       868 
     | 
    
         
            -
                #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       869 
     | 
    
         
            -
                def remove_view(name, options={})
         
     | 
| 
       870 
     | 
    
         
            -
                  definition = ViewRemoveDefinition.new(name, @options.merge(options || {}))
         
     | 
| 
       871 
     | 
    
         
            -
                  @definitions << definition
         
     | 
| 
       872 
     | 
    
         
            -
                end
         
     | 
| 
       873 
     | 
    
         
            -
             
     | 
| 
       874 
     | 
    
         
            -
                # 名前が _name_ のビューを変更する。
         
     | 
| 
       875 
     | 
    
         
            -
                #
         
     | 
| 
       876 
     | 
    
         
            -
                # ビューの変更は {#define} を呼び出すまでは実行されないこ
         
     | 
| 
       877 
     | 
    
         
            -
                # とに注意すること。
         
     | 
| 
       878 
     | 
    
         
            -
                #
         
     | 
| 
       879 
     | 
    
         
            -
                # @param options [::Hash] The name and value
         
     | 
| 
       880 
     | 
    
         
            -
                #   pairs. Omitted names are initialized as the default value.
         
     | 
| 
       881 
     | 
    
         
            -
                # @option options :context (Groonga::Context.default) The context
         
     | 
| 
       882 
     | 
    
         
            -
                #
         
     | 
| 
       883 
     | 
    
         
            -
                #   スキーマ定義時に使用する {Groonga::Context} を指定する。
         
     | 
| 
       884 
     | 
    
         
            -
                def change_view(name, options={})
         
     | 
| 
       885 
     | 
    
         
            -
                  options = @options.merge(options || {}).merge(:change => true)
         
     | 
| 
       886 
     | 
    
         
            -
                  definition = ViewDefinition.new(name, options)
         
     | 
| 
       887 
     | 
    
         
            -
                  yield(definition)
         
     | 
| 
       888 
     | 
    
         
            -
                  @definitions << definition
         
     | 
| 
       889 
     | 
    
         
            -
                end
         
     | 
| 
       890 
     | 
    
         
            -
             
     | 
| 
       891 
752 
     | 
    
         
             
                # 以下と同様:
         
     | 
| 
       892 
753 
     | 
    
         
             
                #
         
     | 
| 
       893 
754 
     | 
    
         
             
                # <pre>
         
     | 
| 
         @@ -1010,6 +871,11 @@ module Groonga 
     | 
|
| 
       1010 
871 
     | 
    
         
             
                  #
         
     | 
| 
       1011 
872 
     | 
    
         
             
                  #   - :scalar := スカラ値(単独の値)を格納する。
         
     | 
| 
       1012 
873 
     | 
    
         
             
                  #   - :vector := 値の配列を格納する。
         
     | 
| 
      
 874 
     | 
    
         
            +
                  # @option options [Boolean] :with_weight (false)
         
     | 
| 
      
 875 
     | 
    
         
            +
                  #    It specifies whether making the column weight vector column or not.
         
     | 
| 
      
 876 
     | 
    
         
            +
                  #    Weight vector column can store weight for each element.
         
     | 
| 
      
 877 
     | 
    
         
            +
                  #
         
     | 
| 
      
 878 
     | 
    
         
            +
                  #    You can't use this option for scalar column.
         
     | 
| 
       1013 
879 
     | 
    
         
             
                  # @option options :compress
         
     | 
| 
       1014 
880 
     | 
    
         
             
                  #
         
     | 
| 
       1015 
881 
     | 
    
         
             
                  #   値の圧縮方法を指定する。省略した場合は、圧縮しない。
         
     | 
| 
         @@ -1445,7 +1311,7 @@ module Groonga 
     | 
|
| 
       1445 
1311 
     | 
    
         
             
                        target_column_full_name = target_column_full_name.name
         
     | 
| 
       1446 
1312 
     | 
    
         
             
                      end
         
     | 
| 
       1447 
1313 
     | 
    
         
             
                      target_table, target_column = target_column_full_name.split(/\./, 2)
         
     | 
| 
       1448 
     | 
    
         
            -
                      target_columns = [target_column]
         
     | 
| 
      
 1314 
     | 
    
         
            +
                      target_columns = [target_column].compact
         
     | 
| 
       1449 
1315 
     | 
    
         
             
                      key = [target_table, target_columns]
         
     | 
| 
       1450 
1316 
     | 
    
         
             
                    else
         
     | 
| 
       1451 
1317 
     | 
    
         
             
                      target_table_name = target_table_or_target_column_full_name
         
     | 
| 
         @@ -1591,99 +1457,6 @@ module Groonga 
     | 
|
| 
       1591 
1457 
     | 
    
         
             
                  end
         
     | 
| 
       1592 
1458 
     | 
    
         
             
                end
         
     | 
| 
       1593 
1459 
     | 
    
         | 
| 
       1594 
     | 
    
         
            -
                # スキーマ定義時に {Groonga::Schema.create_view} や
         
     | 
| 
       1595 
     | 
    
         
            -
                # {Groonga::Schema#create_view} からブロックに渡されてくる
         
     | 
| 
       1596 
     | 
    
         
            -
                # オブジェクト
         
     | 
| 
       1597 
     | 
    
         
            -
                class ViewDefinition
         
     | 
| 
       1598 
     | 
    
         
            -
                  # ビューの名前
         
     | 
| 
       1599 
     | 
    
         
            -
                  attr_reader :name
         
     | 
| 
       1600 
     | 
    
         
            -
             
     | 
| 
       1601 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1602 
     | 
    
         
            -
                  def initialize(name, options)
         
     | 
| 
       1603 
     | 
    
         
            -
                    @name = name
         
     | 
| 
       1604 
     | 
    
         
            -
                    @name = @name.to_s if @name.is_a?(Symbol)
         
     | 
| 
       1605 
     | 
    
         
            -
                    @tables = []
         
     | 
| 
       1606 
     | 
    
         
            -
                    validate_options(options)
         
     | 
| 
       1607 
     | 
    
         
            -
                    @options = options
         
     | 
| 
       1608 
     | 
    
         
            -
                  end
         
     | 
| 
       1609 
     | 
    
         
            -
             
     | 
| 
       1610 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1611 
     | 
    
         
            -
                  def define
         
     | 
| 
       1612 
     | 
    
         
            -
                    view = context[@name]
         
     | 
| 
       1613 
     | 
    
         
            -
                    if @options[:change]
         
     | 
| 
       1614 
     | 
    
         
            -
                      raise TableNotExists.new(@name) if view.nil?
         
     | 
| 
       1615 
     | 
    
         
            -
                    else
         
     | 
| 
       1616 
     | 
    
         
            -
                      if view and @options[:force]
         
     | 
| 
       1617 
     | 
    
         
            -
                        view.remove
         
     | 
| 
       1618 
     | 
    
         
            -
                        view = nil
         
     | 
| 
       1619 
     | 
    
         
            -
                      end
         
     | 
| 
       1620 
     | 
    
         
            -
                      view ||= Groonga::View.create(create_options)
         
     | 
| 
       1621 
     | 
    
         
            -
                    end
         
     | 
| 
       1622 
     | 
    
         
            -
                    @tables.each do |table|
         
     | 
| 
       1623 
     | 
    
         
            -
                      unless table.is_a?(Groonga::Table)
         
     | 
| 
       1624 
     | 
    
         
            -
                        table_name = table
         
     | 
| 
       1625 
     | 
    
         
            -
                        table = context[table_name]
         
     | 
| 
       1626 
     | 
    
         
            -
                        raise TableNotExists.new(table_name) if table.nil?
         
     | 
| 
       1627 
     | 
    
         
            -
                      end
         
     | 
| 
       1628 
     | 
    
         
            -
                      view.add_table(table)
         
     | 
| 
       1629 
     | 
    
         
            -
                    end
         
     | 
| 
       1630 
     | 
    
         
            -
                    view
         
     | 
| 
       1631 
     | 
    
         
            -
                  end
         
     | 
| 
       1632 
     | 
    
         
            -
             
     | 
| 
       1633 
     | 
    
         
            -
                  # 名前が _table_ のテーブルをビューに追加する。
         
     | 
| 
       1634 
     | 
    
         
            -
                  def add(table)
         
     | 
| 
       1635 
     | 
    
         
            -
                    table = table.to_s if table.is_a?(Symbol)
         
     | 
| 
       1636 
     | 
    
         
            -
                    @tables << table
         
     | 
| 
       1637 
     | 
    
         
            -
                    self
         
     | 
| 
       1638 
     | 
    
         
            -
                  end
         
     | 
| 
       1639 
     | 
    
         
            -
             
     | 
| 
       1640 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1641 
     | 
    
         
            -
                  def context
         
     | 
| 
       1642 
     | 
    
         
            -
                    @options[:context] || Groonga::Context.default
         
     | 
| 
       1643 
     | 
    
         
            -
                  end
         
     | 
| 
       1644 
     | 
    
         
            -
             
     | 
| 
       1645 
     | 
    
         
            -
                  private
         
     | 
| 
       1646 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1647 
     | 
    
         
            -
                  AVAILABLE_OPTION_KEYS = [:context, :change, :force,
         
     | 
| 
       1648 
     | 
    
         
            -
                                           :path, :persistent, :named_path]
         
     | 
| 
       1649 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1650 
     | 
    
         
            -
                  def validate_options(options)
         
     | 
| 
       1651 
     | 
    
         
            -
                    return if options.nil?
         
     | 
| 
       1652 
     | 
    
         
            -
                    unknown_keys = options.keys - AVAILABLE_OPTION_KEYS
         
     | 
| 
       1653 
     | 
    
         
            -
                    unless unknown_keys.empty?
         
     | 
| 
       1654 
     | 
    
         
            -
                      raise UnknownOptions.new(options, unknown_keys, AVAILABLE_OPTION_KEYS)
         
     | 
| 
       1655 
     | 
    
         
            -
                    end
         
     | 
| 
       1656 
     | 
    
         
            -
                  end
         
     | 
| 
       1657 
     | 
    
         
            -
             
     | 
| 
       1658 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1659 
     | 
    
         
            -
                  def create_options
         
     | 
| 
       1660 
     | 
    
         
            -
                    {
         
     | 
| 
       1661 
     | 
    
         
            -
                      :name => @name,
         
     | 
| 
       1662 
     | 
    
         
            -
                      :path => @options[:path],
         
     | 
| 
       1663 
     | 
    
         
            -
                      :persistent => persistent?,
         
     | 
| 
       1664 
     | 
    
         
            -
                      :context => context,
         
     | 
| 
       1665 
     | 
    
         
            -
                    }
         
     | 
| 
       1666 
     | 
    
         
            -
                  end
         
     | 
| 
       1667 
     | 
    
         
            -
             
     | 
| 
       1668 
     | 
    
         
            -
                  # @private
         
     | 
| 
       1669 
     | 
    
         
            -
                  def persistent?
         
     | 
| 
       1670 
     | 
    
         
            -
                    @options[:persistent].nil? ? true : @options[:persistent]
         
     | 
| 
       1671 
     | 
    
         
            -
                  end
         
     | 
| 
       1672 
     | 
    
         
            -
                end
         
     | 
| 
       1673 
     | 
    
         
            -
             
     | 
| 
       1674 
     | 
    
         
            -
                # @private
         
     | 
| 
       1675 
     | 
    
         
            -
                class ViewRemoveDefinition
         
     | 
| 
       1676 
     | 
    
         
            -
                  def initialize(name, options={})
         
     | 
| 
       1677 
     | 
    
         
            -
                    @name = name
         
     | 
| 
       1678 
     | 
    
         
            -
                    @options = options
         
     | 
| 
       1679 
     | 
    
         
            -
                  end
         
     | 
| 
       1680 
     | 
    
         
            -
             
     | 
| 
       1681 
     | 
    
         
            -
                  def define
         
     | 
| 
       1682 
     | 
    
         
            -
                    context = @options[:context] || Groonga::Context.default
         
     | 
| 
       1683 
     | 
    
         
            -
                    context[@name].remove
         
     | 
| 
       1684 
     | 
    
         
            -
                  end
         
     | 
| 
       1685 
     | 
    
         
            -
                end
         
     | 
| 
       1686 
     | 
    
         
            -
             
     | 
| 
       1687 
1460 
     | 
    
         
             
                # @private
         
     | 
| 
       1688 
1461 
     | 
    
         
             
                class ColumnDefinition
         
     | 
| 
       1689 
1462 
     | 
    
         
             
                  include Path
         
     | 
| 
         @@ -1729,13 +1502,22 @@ module Groonga 
     | 
|
| 
       1729 
1502 
     | 
    
         
             
                  end
         
     | 
| 
       1730 
1503 
     | 
    
         | 
| 
       1731 
1504 
     | 
    
         
             
                  def same_column?(context, column)
         
     | 
| 
       1732 
     | 
    
         
            -
                    column.range == resolved_type(context)
         
     | 
| 
      
 1505 
     | 
    
         
            +
                    return false unless column.range == resolved_type(context)
         
     | 
| 
      
 1506 
     | 
    
         
            +
                    if column.scalar?
         
     | 
| 
      
 1507 
     | 
    
         
            +
                      [nil, :scalar].include?(@options[:type])
         
     | 
| 
      
 1508 
     | 
    
         
            +
                    else
         
     | 
| 
      
 1509 
     | 
    
         
            +
                      return false unless @options[:type] == :vector
         
     | 
| 
      
 1510 
     | 
    
         
            +
                      with_weight = @options[:with_weight]
         
     | 
| 
      
 1511 
     | 
    
         
            +
                      with_weight = false if with_weight.nil?
         
     | 
| 
      
 1512 
     | 
    
         
            +
                      column.with_weight? == with_weight
         
     | 
| 
      
 1513 
     | 
    
         
            +
                    end
         
     | 
| 
       1733 
1514 
     | 
    
         
             
                  end
         
     | 
| 
       1734 
1515 
     | 
    
         | 
| 
       1735 
1516 
     | 
    
         
             
                  def define_options(context, table)
         
     | 
| 
       1736 
1517 
     | 
    
         
             
                    {
         
     | 
| 
       1737 
1518 
     | 
    
         
             
                      :path => path(context, table),
         
     | 
| 
       1738 
1519 
     | 
    
         
             
                      :type => @options[:type],
         
     | 
| 
      
 1520 
     | 
    
         
            +
                      :with_weight => @options[:with_weight],
         
     | 
| 
       1739 
1521 
     | 
    
         
             
                      :compress => @options[:compress],
         
     | 
| 
       1740 
1522 
     | 
    
         
             
                    }
         
     | 
| 
       1741 
1523 
     | 
    
         
             
                  end
         
     | 
    
        data/rroonga-build.rb
    CHANGED
    
    | 
         @@ -19,15 +19,15 @@ module RroongaBuild 
     | 
|
| 
       19 
19 
     | 
    
         
             
              module RequiredGroongaVersion
         
     | 
| 
       20 
20 
     | 
    
         
             
                MAJOR = 4
         
     | 
| 
       21 
21 
     | 
    
         
             
                MINOR = 0
         
     | 
| 
       22 
     | 
    
         
            -
                MICRO =  
     | 
| 
      
 22 
     | 
    
         
            +
                MICRO = 1
         
     | 
| 
       23 
23 
     | 
    
         
             
                VERSION = [MAJOR, MINOR, MICRO]
         
     | 
| 
       24 
     | 
    
         
            -
                RELEASED_DATE = Time.utc(2014,  
     | 
| 
      
 24 
     | 
    
         
            +
                RELEASED_DATE = Time.utc(2014, 3, 29)
         
     | 
| 
       25 
25 
     | 
    
         
             
              end
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
              module LatestGroongaVersion
         
     | 
| 
       28 
28 
     | 
    
         
             
                MAJOR = 4
         
     | 
| 
       29 
29 
     | 
    
         
             
                MINOR = 0
         
     | 
| 
       30 
     | 
    
         
            -
                MICRO =  
     | 
| 
      
 30 
     | 
    
         
            +
                MICRO = 1
         
     | 
| 
       31 
31 
     | 
    
         
             
                VERSION = [MAJOR, MINOR, MICRO]
         
     | 
| 
       32 
32 
     | 
    
         
             
              end
         
     | 
| 
       33 
33 
     | 
    
         | 
    
        data/rroonga.gemspec
    CHANGED
    
    | 
         @@ -59,7 +59,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       59 
59 
     | 
    
         
             
              description = clean_white_space.call(entries[entries.index("Description") + 1])
         
     | 
| 
       60 
60 
     | 
    
         
             
              s.summary, s.description, = description.split(/\n\n+/, 3)
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
     | 
    
         
            -
              s.files = ["README.textile", "AUTHORS", "Rakefile", "Gemfile"]
         
     | 
| 
      
 62 
     | 
    
         
            +
              s.files = ["README.textile", "AUTHORS", "Rakefile", "Gemfile", ".yardopts"]
         
     | 
| 
       63 
63 
     | 
    
         
             
              s.files += Dir.glob("doc/text/*.textile")
         
     | 
| 
       64 
64 
     | 
    
         
             
              s.files += ["#{s.name}.gemspec"]
         
     | 
| 
       65 
65 
     | 
    
         
             
              s.files += ["rroonga-build.rb", "extconf.rb"]
         
     | 
    
        data/test/test-array.rb
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (C) 2009- 
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright (C) 2009-2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
3 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       4 
4 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -117,11 +117,12 @@ class ArrayTest < Test::Unit::TestCase 
     | 
|
| 
       117 
117 
     | 
    
         
             
                users = Groonga::Array.create(:name => "Users")
         
     | 
| 
       118 
118 
     | 
    
         
             
                users.define_column("name", "ShortText")
         
     | 
| 
       119 
119 
     | 
    
         
             
                users.define_column("address", "ShortText")
         
     | 
| 
       120 
     | 
    
         
            -
                 
     | 
| 
       121 
     | 
    
         
            -
             
     | 
| 
       122 
     | 
    
         
            -
             
     | 
| 
      
 120 
     | 
    
         
            +
                large_data = "x" * (2 ** 16)
         
     | 
| 
      
 121 
     | 
    
         
            +
                100.times do |i|
         
     | 
| 
      
 122 
     | 
    
         
            +
                  users.add(:name => "user #{i}" + large_data,
         
     | 
| 
      
 123 
     | 
    
         
            +
                            :address => "address #{i}" + large_data)
         
     | 
| 
       123 
124 
     | 
    
         
             
                end
         
     | 
| 
       124 
     | 
    
         
            -
                assert_equal( 
     | 
| 
      
 125 
     | 
    
         
            +
                assert_equal(2, users.defrag)
         
     | 
| 
       125 
126 
     | 
    
         
             
              end
         
     | 
| 
       126 
127 
     | 
    
         | 
| 
       127 
128 
     | 
    
         
             
              def test_rename
         
     | 
    
        data/test/test-column.rb
    CHANGED
    
    | 
         @@ -93,20 +93,6 @@ class ColumnTest < Test::Unit::TestCase 
     | 
|
| 
       93 
93 
     | 
    
         
             
                assert_equal([@bookmarks_content], @bookmarks_index_content.sources)
         
     | 
| 
       94 
94 
     | 
    
         
             
              end
         
     | 
| 
       95 
95 
     | 
    
         | 
| 
       96 
     | 
    
         
            -
              def test_update_index_column
         
     | 
| 
       97 
     | 
    
         
            -
                groonga = @bookmarks.add
         
     | 
| 
       98 
     | 
    
         
            -
                groonga["content"] = "<html><body>groonga</body></html>"
         
     | 
| 
       99 
     | 
    
         
            -
             
     | 
| 
       100 
     | 
    
         
            -
                ruby = @bookmarks.add
         
     | 
| 
       101 
     | 
    
         
            -
                ruby["content"] = "<html><body>ruby</body></html>"
         
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
                @bookmarks_index_content[groonga.id] = groonga["content"]
         
     | 
| 
       104 
     | 
    
         
            -
                @bookmarks_index_content[ruby.id] = ruby["content"]
         
     | 
| 
       105 
     | 
    
         
            -
             
     | 
| 
       106 
     | 
    
         
            -
                assert_content_search([groonga], "groonga")
         
     | 
| 
       107 
     | 
    
         
            -
                assert_content_search([groonga, ruby], "html")
         
     | 
| 
       108 
     | 
    
         
            -
              end
         
     | 
| 
       109 
     | 
    
         
            -
             
     | 
| 
       110 
96 
     | 
    
         
             
              def test_range
         
     | 
| 
       111 
97 
     | 
    
         
             
                assert_equal(context[Groonga::Type::SHORT_TEXT], @bookmarks_uri.range)
         
     | 
| 
       112 
98 
     | 
    
         
             
                assert_equal(context[Groonga::Type::TEXT], @bookmarks_comment.range)
         
     | 
    
        data/test/test-database.rb
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (C) 2009- 
     | 
| 
      
 1 
     | 
    
         
            +
            # Copyright (C) 2009-2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
3 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       4 
4 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -146,11 +146,12 @@ class DatabaseTest < Test::Unit::TestCase 
     | 
|
| 
       146 
146 
     | 
    
         
             
                  end
         
     | 
| 
       147 
147 
     | 
    
         
             
                end
         
     | 
| 
       148 
148 
     | 
    
         
             
                users = context["Users"]
         
     | 
| 
       149 
     | 
    
         
            -
                 
     | 
| 
       150 
     | 
    
         
            -
             
     | 
| 
       151 
     | 
    
         
            -
             
     | 
| 
      
 149 
     | 
    
         
            +
                large_data = "x" * (2 ** 16)
         
     | 
| 
      
 150 
     | 
    
         
            +
                100.times do |i|
         
     | 
| 
      
 151 
     | 
    
         
            +
                  users.add(:name => "user #{i}" + large_data,
         
     | 
| 
      
 152 
     | 
    
         
            +
                            :address => "address #{i}" + large_data)
         
     | 
| 
       152 
153 
     | 
    
         
             
                end
         
     | 
| 
       153 
     | 
    
         
            -
                assert_equal( 
     | 
| 
      
 154 
     | 
    
         
            +
                assert_equal(2, @database.defrag)
         
     | 
| 
       154 
155 
     | 
    
         
             
              end
         
     | 
| 
       155 
156 
     | 
    
         | 
| 
       156 
157 
     | 
    
         
             
              def test_tables
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
     | 
    
         
            -
            # Copyright (C) 2011- 
     | 
| 
      
 3 
     | 
    
         
            +
            # Copyright (C) 2011-2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         
             
            #
         
     | 
| 
       5 
5 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       6 
6 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -158,12 +158,13 @@ class DoubleArrayTrieTest < Test::Unit::TestCase 
     | 
|
| 
       158 
158 
     | 
    
         
             
                                                        :key_type => "ShortText")
         
     | 
| 
       159 
159 
     | 
    
         
             
                users.define_column("name", "ShortText")
         
     | 
| 
       160 
160 
     | 
    
         
             
                users.define_column("address", "ShortText")
         
     | 
| 
       161 
     | 
    
         
            -
                 
     | 
| 
      
 161 
     | 
    
         
            +
                large_data = "x" * (2 ** 16)
         
     | 
| 
      
 162 
     | 
    
         
            +
                100.times do |i|
         
     | 
| 
       162 
163 
     | 
    
         
             
                  users.add("user #{i}",
         
     | 
| 
       163 
     | 
    
         
            -
                            :name => "user #{i}"  
     | 
| 
       164 
     | 
    
         
            -
                            :address => "address #{i}"  
     | 
| 
      
 164 
     | 
    
         
            +
                            :name => "user #{i}" + large_data,
         
     | 
| 
      
 165 
     | 
    
         
            +
                            :address => "address #{i}" + large_data)
         
     | 
| 
       165 
166 
     | 
    
         
             
                end
         
     | 
| 
       166 
     | 
    
         
            -
                assert_equal( 
     | 
| 
      
 167 
     | 
    
         
            +
                assert_equal(2, users.defrag)
         
     | 
| 
       167 
168 
     | 
    
         
             
              end
         
     | 
| 
       168 
169 
     | 
    
         | 
| 
       169 
170 
     | 
    
         
             
              def test_rename
         
     | 
    
        data/test/test-expression.rb
    CHANGED
    
    | 
         @@ -37,7 +37,7 @@ class ExpressionTest < Test::Unit::TestCase 
     | 
|
| 
       37 
37 
     | 
    
         | 
| 
       38 
38 
     | 
    
         
             
              def test_get_value
         
     | 
| 
       39 
39 
     | 
    
         
             
                users = Groonga::Hash.create(:name => "Users")
         
     | 
| 
       40 
     | 
    
         
            -
                 
     | 
| 
      
 40 
     | 
    
         
            +
                users.define_column("name", "ShortText")
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
                morita = users.add("morita", :name => "mori daijiro")
         
     | 
| 
       43 
43 
     | 
    
         | 
| 
         @@ -51,7 +51,7 @@ class ExpressionTest < Test::Unit::TestCase 
     | 
|
| 
       51 
51 
     | 
    
         | 
| 
       52 
52 
     | 
    
         
             
              def test_get_value_with_variable
         
     | 
| 
       53 
53 
     | 
    
         
             
                users = Groonga::Hash.create(:name => "Users")
         
     | 
| 
       54 
     | 
    
         
            -
                 
     | 
| 
      
 54 
     | 
    
         
            +
                users.define_column("name", "ShortText")
         
     | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
                morita = users.add("morita", :name => "mori daijiro")
         
     | 
| 
       57 
57 
     | 
    
         
             
                gunyara_kun = users.add("gunyara-kun", :name => "Tasuku SUENAGA")
         
     | 
    
        data/test/test-hash.rb
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
     | 
    
         
            -
            # Copyright (C) 2009- 
     | 
| 
      
 3 
     | 
    
         
            +
            # Copyright (C) 2009-2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         
             
            #
         
     | 
| 
       5 
5 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       6 
6 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -367,12 +367,13 @@ class HashTest < Test::Unit::TestCase 
     | 
|
| 
       367 
367 
     | 
    
         
             
                                             :key_type => "ShortText")
         
     | 
| 
       368 
368 
     | 
    
         
             
                users.define_column("name", "ShortText")
         
     | 
| 
       369 
369 
     | 
    
         
             
                users.define_column("address", "ShortText")
         
     | 
| 
       370 
     | 
    
         
            -
                 
     | 
| 
      
 370 
     | 
    
         
            +
                large_data = "x" * (2 ** 16)
         
     | 
| 
      
 371 
     | 
    
         
            +
                100.times do |i|
         
     | 
| 
       371 
372 
     | 
    
         
             
                  users.add("user #{i}",
         
     | 
| 
       372 
     | 
    
         
            -
                            :name => "user #{i}"  
     | 
| 
       373 
     | 
    
         
            -
                            :address => "address #{i}"  
     | 
| 
      
 373 
     | 
    
         
            +
                            :name => "user #{i}" + large_data,
         
     | 
| 
      
 374 
     | 
    
         
            +
                            :address => "address #{i}" + large_data)
         
     | 
| 
       374 
375 
     | 
    
         
             
                end
         
     | 
| 
       375 
     | 
    
         
            -
                assert_equal( 
     | 
| 
      
 376 
     | 
    
         
            +
                assert_equal(2, users.defrag)
         
     | 
| 
       376 
377 
     | 
    
         
             
              end
         
     | 
| 
       377 
378 
     | 
    
         | 
| 
       378 
379 
     | 
    
         
             
              def test_rename
         
     | 
    
        data/test/test-index-column.rb
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # -*- coding: utf-8 -*-
         
     | 
| 
       2 
2 
     | 
    
         
             
            #
         
     | 
| 
       3 
     | 
    
         
            -
            # Copyright (C) 2009- 
     | 
| 
      
 3 
     | 
    
         
            +
            # Copyright (C) 2009-2014  Kouhei Sutou <kou@clear-code.com>
         
     | 
| 
       4 
4 
     | 
    
         
             
            #
         
     | 
| 
       5 
5 
     | 
    
         
             
            # This library is free software; you can redistribute it and/or
         
     | 
| 
       6 
6 
     | 
    
         
             
            # modify it under the terms of the GNU Lesser General Public
         
     | 
| 
         @@ -55,40 +55,24 @@ class IndexColumnTest < Test::Unit::TestCase 
     | 
|
| 
       55 
55 
     | 
    
         
             
              class CRUDTest < self
         
     | 
| 
       56 
56 
     | 
    
         
             
                setup
         
     | 
| 
       57 
57 
     | 
    
         
             
                def setup_schema
         
     | 
| 
       58 
     | 
    
         
            -
                   
     | 
| 
       59 
     | 
    
         
            -
             
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                                               :key_type => "ShortText",
         
     | 
| 
       63 
     | 
    
         
            -
                                               :default_tokenizer => "TokenBigram")
         
     | 
| 
       64 
     | 
    
         
            -
                  @index = terms.define_index_column("content", @articles,
         
     | 
| 
       65 
     | 
    
         
            -
                                                     :with_position => true,
         
     | 
| 
       66 
     | 
    
         
            -
                                                     :with_section => true)
         
     | 
| 
       67 
     | 
    
         
            -
                end
         
     | 
| 
       68 
     | 
    
         
            -
             
     | 
| 
       69 
     | 
    
         
            -
                def test_array_set_with_record
         
     | 
| 
       70 
     | 
    
         
            -
                  content = <<-EOC
         
     | 
| 
       71 
     | 
    
         
            -
                  groonga は組み込み型の全文検索エンジンライブラリです。
         
     | 
| 
       72 
     | 
    
         
            -
                  DBMSやスクリプト言語処理系等に組み込むことによって、その
         
     | 
| 
       73 
     | 
    
         
            -
                  全文検索機能を強化することができます。また、リレーショナ
         
     | 
| 
       74 
     | 
    
         
            -
                  ルモデルに基づくデータストア機能を内包しており、groonga
         
     | 
| 
       75 
     | 
    
         
            -
                  単体でも高速なデータストアサーバとして使用することができ
         
     | 
| 
       76 
     | 
    
         
            -
                  ます。
         
     | 
| 
       77 
     | 
    
         
            -
             
     | 
| 
       78 
     | 
    
         
            -
                  ■全文検索方式
         
     | 
| 
       79 
     | 
    
         
            -
                  転置索引型の全文検索エンジンです。転置索引は圧縮されてファ
         
     | 
| 
       80 
     | 
    
         
            -
                  イルに格納され、検索時のディスク読み出し量を小さく、かつ
         
     | 
| 
       81 
     | 
    
         
            -
                  局所的に抑えるように設計されています。用途に応じて以下の
         
     | 
| 
       82 
     | 
    
         
            -
                  索引タイプを選択できます。
         
     | 
| 
       83 
     | 
    
         
            -
                  EOC
         
     | 
| 
       84 
     | 
    
         
            -
             
     | 
| 
       85 
     | 
    
         
            -
                  groonga = @articles.add(:content => content)
         
     | 
| 
      
 58 
     | 
    
         
            +
                  Groonga::Schema.define do |schema|
         
     | 
| 
      
 59 
     | 
    
         
            +
                    schema.create_table("Articles") do |table|
         
     | 
| 
      
 60 
     | 
    
         
            +
                      table.text("content")
         
     | 
| 
      
 61 
     | 
    
         
            +
                    end
         
     | 
| 
       86 
62 
     | 
    
         | 
| 
       87 
     | 
    
         
            -
             
     | 
| 
       88 
     | 
    
         
            -
             
     | 
| 
      
 63 
     | 
    
         
            +
                    schema.create_table("Terms",
         
     | 
| 
      
 64 
     | 
    
         
            +
                                        :type => :hash,
         
     | 
| 
      
 65 
     | 
    
         
            +
                                        :key_type => "ShortText",
         
     | 
| 
      
 66 
     | 
    
         
            +
                                        :default_tokenizer => "TokenBigram") do |table|
         
     | 
| 
      
 67 
     | 
    
         
            +
                      table.index("Articles.content",
         
     | 
| 
      
 68 
     | 
    
         
            +
                                  :name => "articles_content",
         
     | 
| 
      
 69 
     | 
    
         
            +
                                  :with_position => true,
         
     | 
| 
      
 70 
     | 
    
         
            +
                                  :with_section => true)
         
     | 
| 
      
 71 
     | 
    
         
            +
                    end
         
     | 
| 
       89 
72 
     | 
    
         
             
                  end
         
     | 
| 
       90 
     | 
    
         
            -
             
     | 
| 
       91 
     | 
    
         
            -
             
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
                  @articles = Groonga["Articles"]
         
     | 
| 
      
 75 
     | 
    
         
            +
                  @index = Groonga["Terms.articles_content"]
         
     | 
| 
       92 
76 
     | 
    
         
             
                end
         
     | 
| 
       93 
77 
     | 
    
         | 
| 
       94 
78 
     | 
    
         
             
                def test_add
         
     | 
| 
         @@ -365,4 +349,150 @@ class IndexColumnTest < Test::Unit::TestCase 
     | 
|
| 
       365 
349 
     | 
    
         
             
                               @index.disk_usage)
         
     | 
| 
       366 
350 
     | 
    
         
             
                end
         
     | 
| 
       367 
351 
     | 
    
         
             
              end
         
     | 
| 
      
 352 
     | 
    
         
            +
             
     | 
| 
      
 353 
     | 
    
         
            +
              class SearchTest < self
         
     | 
| 
      
 354 
     | 
    
         
            +
                class WeightTest < self
         
     | 
| 
      
 355 
     | 
    
         
            +
                  def setup
         
     | 
| 
      
 356 
     | 
    
         
            +
                    super
         
     | 
| 
      
 357 
     | 
    
         
            +
                    setup_schema
         
     | 
| 
      
 358 
     | 
    
         
            +
                  end
         
     | 
| 
      
 359 
     | 
    
         
            +
             
     | 
| 
      
 360 
     | 
    
         
            +
                  def setup_schema
         
     | 
| 
      
 361 
     | 
    
         
            +
                    Groonga::Schema.define do |schema|
         
     | 
| 
      
 362 
     | 
    
         
            +
                      schema.create_table("Memos",
         
     | 
| 
      
 363 
     | 
    
         
            +
                                          :type => :hash,
         
     | 
| 
      
 364 
     | 
    
         
            +
                                          :key_type => :short_text) do |table|
         
     | 
| 
      
 365 
     | 
    
         
            +
                        table.short_text("tags",
         
     | 
| 
      
 366 
     | 
    
         
            +
                                         :type => :vector,
         
     | 
| 
      
 367 
     | 
    
         
            +
                                         :with_weight => true)
         
     | 
| 
      
 368 
     | 
    
         
            +
                      end
         
     | 
| 
      
 369 
     | 
    
         
            +
             
     | 
| 
      
 370 
     | 
    
         
            +
                      schema.create_table("Tags",
         
     | 
| 
      
 371 
     | 
    
         
            +
                                          :type => :hash,
         
     | 
| 
      
 372 
     | 
    
         
            +
                                          :key_type => :short_text) do |table|
         
     | 
| 
      
 373 
     | 
    
         
            +
                        table.index("Memos.tags",
         
     | 
| 
      
 374 
     | 
    
         
            +
                                    :name => "memos_index",
         
     | 
| 
      
 375 
     | 
    
         
            +
                                    :with_weight => true)
         
     | 
| 
      
 376 
     | 
    
         
            +
                      end
         
     | 
| 
      
 377 
     | 
    
         
            +
                    end
         
     | 
| 
      
 378 
     | 
    
         
            +
             
     | 
| 
      
 379 
     | 
    
         
            +
                    @memos = context["Memos"]
         
     | 
| 
      
 380 
     | 
    
         
            +
                    @index = context["Tags.memos_index"]
         
     | 
| 
      
 381 
     | 
    
         
            +
                  end
         
     | 
| 
      
 382 
     | 
    
         
            +
             
     | 
| 
      
 383 
     | 
    
         
            +
                  def search(keyword, options={})
         
     | 
| 
      
 384 
     | 
    
         
            +
                    @index.search(keyword, options).collect do |record|
         
     | 
| 
      
 385 
     | 
    
         
            +
                      {
         
     | 
| 
      
 386 
     | 
    
         
            +
                        :key => record._key,
         
     | 
| 
      
 387 
     | 
    
         
            +
                        :score => record.score,
         
     | 
| 
      
 388 
     | 
    
         
            +
                      }
         
     | 
| 
      
 389 
     | 
    
         
            +
                    end
         
     | 
| 
      
 390 
     | 
    
         
            +
                  end
         
     | 
| 
      
 391 
     | 
    
         
            +
             
     | 
| 
      
 392 
     | 
    
         
            +
                  def test_index
         
     | 
| 
      
 393 
     | 
    
         
            +
                    record = @memos.add("Rroonga is fun!")
         
     | 
| 
      
 394 
     | 
    
         
            +
                    record.tags = [
         
     | 
| 
      
 395 
     | 
    
         
            +
                      {
         
     | 
| 
      
 396 
     | 
    
         
            +
                        :value => "rroonga",
         
     | 
| 
      
 397 
     | 
    
         
            +
                        :weight => 9,
         
     | 
| 
      
 398 
     | 
    
         
            +
                      }
         
     | 
| 
      
 399 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 400 
     | 
    
         
            +
             
     | 
| 
      
 401 
     | 
    
         
            +
                    expected = [
         
     | 
| 
      
 402 
     | 
    
         
            +
                      {
         
     | 
| 
      
 403 
     | 
    
         
            +
                        :key => "Rroonga is fun!",
         
     | 
| 
      
 404 
     | 
    
         
            +
                        :score => 10,
         
     | 
| 
      
 405 
     | 
    
         
            +
                      }
         
     | 
| 
      
 406 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 407 
     | 
    
         
            +
                    assert_equal(expected, search("rroonga"))
         
     | 
| 
      
 408 
     | 
    
         
            +
                  end
         
     | 
| 
      
 409 
     | 
    
         
            +
             
     | 
| 
      
 410 
     | 
    
         
            +
                  def test_search
         
     | 
| 
      
 411 
     | 
    
         
            +
                    record = @memos.add("Rroonga is fun!")
         
     | 
| 
      
 412 
     | 
    
         
            +
                    record.tags = [
         
     | 
| 
      
 413 
     | 
    
         
            +
                      {
         
     | 
| 
      
 414 
     | 
    
         
            +
                        :value => "rroonga",
         
     | 
| 
      
 415 
     | 
    
         
            +
                      }
         
     | 
| 
      
 416 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 417 
     | 
    
         
            +
             
     | 
| 
      
 418 
     | 
    
         
            +
                    expected = [
         
     | 
| 
      
 419 
     | 
    
         
            +
                      {
         
     | 
| 
      
 420 
     | 
    
         
            +
                        :key => "Rroonga is fun!",
         
     | 
| 
      
 421 
     | 
    
         
            +
                        :score => 5,
         
     | 
| 
      
 422 
     | 
    
         
            +
                      }
         
     | 
| 
      
 423 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 424 
     | 
    
         
            +
                    assert_equal(expected, search("rroonga", :weight => 5))
         
     | 
| 
      
 425 
     | 
    
         
            +
                  end
         
     | 
| 
      
 426 
     | 
    
         
            +
             
     | 
| 
      
 427 
     | 
    
         
            +
                  def test_index_and_search
         
     | 
| 
      
 428 
     | 
    
         
            +
                    record = @memos.add("Rroonga is fun!")
         
     | 
| 
      
 429 
     | 
    
         
            +
                    record.tags = [
         
     | 
| 
      
 430 
     | 
    
         
            +
                      {
         
     | 
| 
      
 431 
     | 
    
         
            +
                        :value => "rroonga",
         
     | 
| 
      
 432 
     | 
    
         
            +
                        :weight => 9,
         
     | 
| 
      
 433 
     | 
    
         
            +
                      }
         
     | 
| 
      
 434 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 435 
     | 
    
         
            +
             
     | 
| 
      
 436 
     | 
    
         
            +
                    expected = [
         
     | 
| 
      
 437 
     | 
    
         
            +
                      {
         
     | 
| 
      
 438 
     | 
    
         
            +
                        :key => "Rroonga is fun!",
         
     | 
| 
      
 439 
     | 
    
         
            +
                        :score => 50
         
     | 
| 
      
 440 
     | 
    
         
            +
                      }
         
     | 
| 
      
 441 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 442 
     | 
    
         
            +
                    assert_equal(expected, search("rroonga", :weight => 5))
         
     | 
| 
      
 443 
     | 
    
         
            +
                  end
         
     | 
| 
      
 444 
     | 
    
         
            +
                end
         
     | 
| 
      
 445 
     | 
    
         
            +
             
     | 
| 
      
 446 
     | 
    
         
            +
                class OperatorTest < self
         
     | 
| 
      
 447 
     | 
    
         
            +
                  def setup
         
     | 
| 
      
 448 
     | 
    
         
            +
                    super
         
     | 
| 
      
 449 
     | 
    
         
            +
                    setup_schema
         
     | 
| 
      
 450 
     | 
    
         
            +
                  end
         
     | 
| 
      
 451 
     | 
    
         
            +
             
     | 
| 
      
 452 
     | 
    
         
            +
                  def setup_schema
         
     | 
| 
      
 453 
     | 
    
         
            +
                    Groonga::Schema.define do |schema|
         
     | 
| 
      
 454 
     | 
    
         
            +
                      schema.create_table("Memos",
         
     | 
| 
      
 455 
     | 
    
         
            +
                                          :type => :hash,
         
     | 
| 
      
 456 
     | 
    
         
            +
                                          :key_type => :short_text) do |table|
         
     | 
| 
      
 457 
     | 
    
         
            +
                        table.short_text("tags", :type => :vector)
         
     | 
| 
      
 458 
     | 
    
         
            +
                      end
         
     | 
| 
      
 459 
     | 
    
         
            +
             
     | 
| 
      
 460 
     | 
    
         
            +
                      schema.create_table("Tags",
         
     | 
| 
      
 461 
     | 
    
         
            +
                                          :type => :hash,
         
     | 
| 
      
 462 
     | 
    
         
            +
                                          :key_type => :short_text) do |table|
         
     | 
| 
      
 463 
     | 
    
         
            +
                        table.index("Memos.tags",
         
     | 
| 
      
 464 
     | 
    
         
            +
                                    :name => "memos_index")
         
     | 
| 
      
 465 
     | 
    
         
            +
                      end
         
     | 
| 
      
 466 
     | 
    
         
            +
                    end
         
     | 
| 
      
 467 
     | 
    
         
            +
             
     | 
| 
      
 468 
     | 
    
         
            +
                    @memos = context["Memos"]
         
     | 
| 
      
 469 
     | 
    
         
            +
                    @index = context["Tags.memos_index"]
         
     | 
| 
      
 470 
     | 
    
         
            +
                  end
         
     | 
| 
      
 471 
     | 
    
         
            +
             
     | 
| 
      
 472 
     | 
    
         
            +
                  def test_adjust
         
     | 
| 
      
 473 
     | 
    
         
            +
                    @memos.add("Rroonga is fun!", :tags => ["rroonga", "groonga"])
         
     | 
| 
      
 474 
     | 
    
         
            +
                    @memos.add("Groonga is fast!", :tags => ["groonga"])
         
     | 
| 
      
 475 
     | 
    
         
            +
             
     | 
| 
      
 476 
     | 
    
         
            +
                    result = @index.search("groonga")
         
     | 
| 
      
 477 
     | 
    
         
            +
                    @index.search("rroonga", :result => result, :operator => :adjust)
         
     | 
| 
      
 478 
     | 
    
         
            +
                    expected = [
         
     | 
| 
      
 479 
     | 
    
         
            +
                      {
         
     | 
| 
      
 480 
     | 
    
         
            +
                        :key => "Rroonga is fun!",
         
     | 
| 
      
 481 
     | 
    
         
            +
                        :score => 2,
         
     | 
| 
      
 482 
     | 
    
         
            +
                      },
         
     | 
| 
      
 483 
     | 
    
         
            +
                      {
         
     | 
| 
      
 484 
     | 
    
         
            +
                        :key => "Groonga is fast!",
         
     | 
| 
      
 485 
     | 
    
         
            +
                        :score => 1,
         
     | 
| 
      
 486 
     | 
    
         
            +
                      }
         
     | 
| 
      
 487 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 488 
     | 
    
         
            +
                    actual = result.collect do |record|
         
     | 
| 
      
 489 
     | 
    
         
            +
                      {
         
     | 
| 
      
 490 
     | 
    
         
            +
                        :key => record._key,
         
     | 
| 
      
 491 
     | 
    
         
            +
                        :score => record.score,
         
     | 
| 
      
 492 
     | 
    
         
            +
                      }
         
     | 
| 
      
 493 
     | 
    
         
            +
                    end
         
     | 
| 
      
 494 
     | 
    
         
            +
                    assert_equal(expected, actual)
         
     | 
| 
      
 495 
     | 
    
         
            +
                  end
         
     | 
| 
      
 496 
     | 
    
         
            +
                end
         
     | 
| 
      
 497 
     | 
    
         
            +
              end
         
     | 
| 
       368 
498 
     | 
    
         
             
            end
         
     |