rroonga 2.0.8-x86-mingw32 → 2.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +2 -2
- data/bin/groonga-index-dump +47 -0
- data/doc/text/news.textile +733 -0
- data/doc/text/tutorial.textile +535 -0
- data/example/bookmark.rb +1 -1
- data/ext/groonga/rb-grn-database.c +21 -24
- data/ext/groonga/rb-grn-double-array-trie.c +50 -58
- data/ext/groonga/rb-grn-exception.c +18 -1
- data/ext/groonga/rb-grn-hash.c +18 -3
- data/ext/groonga/rb-grn-index-column.c +50 -2
- data/ext/groonga/rb-grn-normalizer.c +83 -0
- data/ext/groonga/rb-grn-object.c +18 -14
- data/ext/groonga/rb-grn-patricia-trie.c +17 -2
- data/ext/groonga/rb-grn-query-logger.c +263 -0
- data/ext/groonga/rb-grn-snippet.c +6 -0
- data/ext/groonga/rb-grn-table-key-support.c +204 -13
- data/ext/groonga/rb-grn-table.c +124 -46
- data/ext/groonga/rb-grn.h +14 -3
- data/ext/groonga/rb-groonga.c +2 -0
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga.rb +2 -1
- data/lib/groonga/database.rb +7 -0
- data/lib/groonga/dumper.rb +21 -2
- data/lib/groonga/index-column.rb +170 -0
- data/lib/groonga/query-logger.rb +129 -0
- data/lib/groonga/record.rb +32 -8
- data/lib/groonga/schema.rb +231 -288
- data/rroonga-build.rb +2 -2
- data/rroonga.gemspec +11 -7
- data/test/groonga-test-utils.rb +18 -6
- data/test/test-hash.rb +49 -20
- data/test/test-index-cursor.rb +4 -4
- data/{Gemfile → test/test-normalizer.rb} +9 -5
- data/test/test-pagination.rb +1 -1
- data/test/test-patricia-trie.rb +8 -0
- data/test/test-schema.rb +16 -13
- data/test/test-snippet.rb +5 -0
- data/test/test-table.rb +24 -12
- data/test/test-view.rb +0 -1
- 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-config +2 -2
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
- data/vendor/local/include/groonga/groonga.h +25 -14
- data/vendor/local/include/groonga/groonga/normalizer.h +55 -0
- data/vendor/local/include/groonga/groonga/tokenizer.h +33 -13
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +2 -2
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.la +2 -2
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +2 -2
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +2 -2
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +1 -1
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +1 -1
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +1 -1
- data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/sbin/groonga-httpd-restart +9 -3
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +6 -6
- 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 +4 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +59 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +0 -12
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +3 -3
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development.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/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/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/index.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/install.html +10 -11
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +16 -53
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news.html +146 -82
- 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/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/type.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec.html +6 -6
- 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/suggest.html +6 -6
- 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/troubleshooting.html +6 -6
- 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/tutorial.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +265 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +6 -6
- 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 +4 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +59 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +0 -12
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +2 -2
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.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/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/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/index.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/install.html +10 -11
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +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 +16 -51
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +126 -82
- 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/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/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/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/select.html +5 -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 +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/set.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/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +5 -5
- 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.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +5 -5
- 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 +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec.html +6 -6
- 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/suggest.html +6 -6
- 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/troubleshooting.html +6 -6
- 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/tutorial.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +259 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-data-with-three-relationship.log +23 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-data.log +16 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-schema-with-three-relationship.log +30 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-schema.log +20 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-select-with-three-relationship.log +86 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-select.log +41 -0
- data/vendor/local/share/doc/groonga/source/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/source/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/source/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/source/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/source/news.txt +59 -0
- data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +338 -93
- data/vendor/local/share/man/man1/groonga.1 +341 -92
- metadata +1258 -1242
- data/AUTHORS +0 -5
- data/Rakefile +0 -203
- data/bin/groonga-query-log-extract +0 -117
data/rroonga-build.rb
CHANGED
data/rroonga.gemspec
CHANGED
@@ -15,6 +15,8 @@
|
|
15
15
|
# License along with this library; if not, write to the Free Software
|
16
16
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
17
|
|
18
|
+
require "English"
|
19
|
+
|
18
20
|
base_dir = File.dirname(__FILE__)
|
19
21
|
ext_dir = File.join(base_dir, "ext", "groonga")
|
20
22
|
|
@@ -40,13 +42,15 @@ Gem::Specification.new do |s|
|
|
40
42
|
s.version = guess_version.call(ext_dir)
|
41
43
|
|
42
44
|
authors_path = File.join(base_dir, "AUTHORS")
|
43
|
-
authors
|
45
|
+
authors = []
|
46
|
+
emails = []
|
47
|
+
File.readlines(authors_path).each do |line|
|
44
48
|
if /\s*<([^<>]*)>$/ =~ line
|
45
|
-
|
46
|
-
|
47
|
-
nil
|
49
|
+
authors << $PREMATCH
|
50
|
+
emails << $1
|
48
51
|
end
|
49
|
-
end
|
52
|
+
end
|
53
|
+
|
50
54
|
s.authors = authors
|
51
55
|
s.email = emails
|
52
56
|
|
@@ -56,6 +60,7 @@ Gem::Specification.new do |s|
|
|
56
60
|
s.summary, s.description, = description.split(/\n\n+/, 3)
|
57
61
|
|
58
62
|
s.files = ["README.textile", "AUTHORS", "Rakefile", "Gemfile"]
|
63
|
+
s.files = Dir.glob("doc/text/*.textile")
|
59
64
|
s.files += ["#{s.name}.gemspec"]
|
60
65
|
s.files += ["rroonga-build.rb", "extconf.rb"]
|
61
66
|
Dir.chdir(base_dir) do
|
@@ -83,8 +88,7 @@ Gem::Specification.new do |s|
|
|
83
88
|
s.add_development_dependency("rake-compiler")
|
84
89
|
s.add_development_dependency("bundler")
|
85
90
|
s.add_development_dependency("yard")
|
86
|
-
|
87
|
-
s.add_development_dependency("packnga", ["= 0.9.4"])
|
91
|
+
s.add_development_dependency("packnga")
|
88
92
|
s.add_development_dependency("RedCloth")
|
89
93
|
end
|
90
94
|
|
data/test/groonga-test-utils.rb
CHANGED
@@ -40,6 +40,8 @@ module GroongaTestUtils
|
|
40
40
|
|
41
41
|
setup_encoding
|
42
42
|
setup_context
|
43
|
+
|
44
|
+
@database = nil
|
43
45
|
end
|
44
46
|
|
45
47
|
def setup_tmp_directory
|
@@ -60,8 +62,12 @@ module GroongaTestUtils
|
|
60
62
|
|
61
63
|
def setup_log_path
|
62
64
|
@dump_log = false
|
65
|
+
|
63
66
|
Groonga::Logger.log_path = (@tmp_dir + "groonga.log").to_s
|
64
|
-
|
67
|
+
|
68
|
+
@query_log_path = @tmp_dir + "groonga-query.log"
|
69
|
+
query_logger = Groonga::FileQueryLogger.new(@query_log_path.to_s)
|
70
|
+
Groonga::QueryLogger.register(query_logger, :all => true)
|
65
71
|
end
|
66
72
|
|
67
73
|
def setup_tables_directory
|
@@ -102,8 +108,15 @@ module GroongaTestUtils
|
|
102
108
|
@database = Groonga::Database.create(:path => @database_path.to_s)
|
103
109
|
end
|
104
110
|
|
105
|
-
def
|
111
|
+
def teardown_database
|
112
|
+
return if @database.nil?
|
113
|
+
|
114
|
+
@database.close
|
106
115
|
@database = nil
|
116
|
+
end
|
117
|
+
|
118
|
+
def teardown_sandbox
|
119
|
+
teardown_database
|
107
120
|
Groonga::Context.default.close
|
108
121
|
Groonga::Context.default = nil
|
109
122
|
GC.start
|
@@ -114,17 +127,16 @@ module GroongaTestUtils
|
|
114
127
|
def teardown_log_path
|
115
128
|
return unless @dump_log
|
116
129
|
log_path = Groonga::Logger.log_path
|
117
|
-
query_log_path = Groonga::Logger.query_log_path
|
118
130
|
if File.exist?(log_path)
|
119
131
|
header = "--- log: #{log_path} ---"
|
120
132
|
puts(header)
|
121
133
|
puts(File.read(log_path))
|
122
134
|
puts("-" * header.length)
|
123
135
|
end
|
124
|
-
if
|
125
|
-
header = "--- query log: #{query_log_path} ---"
|
136
|
+
if @query_log_path.exist?
|
137
|
+
header = "--- query log: #{@query_log_path} ---"
|
126
138
|
puts(header)
|
127
|
-
puts(
|
139
|
+
puts(@query_log_path.read)
|
128
140
|
puts("-" * header.length)
|
129
141
|
end
|
130
142
|
end
|
data/test/test-hash.rb
CHANGED
@@ -26,25 +26,38 @@ class HashTest < Test::Unit::TestCase
|
|
26
26
|
:support_key?)
|
27
27
|
end
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
class DeleteTest < self
|
30
|
+
setup
|
31
|
+
def setup_data
|
32
|
+
bookmarks_path = @tables_dir + "bookmarks"
|
33
|
+
@bookmarks = Groonga::Hash.create(:name => "Bookmarks",
|
34
|
+
:key_type => "ShortText",
|
35
|
+
:path => bookmarks_path.to_s)
|
36
|
+
|
37
|
+
@groonga = @bookmarks.add("groonga")
|
38
|
+
@google = @bookmarks.add("Google")
|
39
|
+
@cutter = @bookmarks.add("Cutter")
|
40
|
+
end
|
37
41
|
|
38
|
-
|
39
|
-
|
42
|
+
def test_id
|
43
|
+
@bookmarks.delete(@google.id)
|
44
|
+
assert_equal(["groonga", "Cutter"],
|
45
|
+
@bookmarks.collect {|bookmark| bookmark.key})
|
46
|
+
end
|
40
47
|
|
41
|
-
|
42
|
-
|
43
|
-
|
48
|
+
def test_key
|
49
|
+
@bookmarks.delete(@cutter.key)
|
50
|
+
assert_equal(["groonga", "Google"],
|
51
|
+
@bookmarks.collect {|bookmark| bookmark.key})
|
52
|
+
end
|
44
53
|
|
45
|
-
|
46
|
-
|
47
|
-
|
54
|
+
def test_expression
|
55
|
+
@bookmarks.delete do |record|
|
56
|
+
record.key == @groonga.key
|
57
|
+
end
|
58
|
+
assert_equal(["Google", "Cutter"],
|
59
|
+
@bookmarks.collect {|bookmark| bookmark.key})
|
60
|
+
end
|
48
61
|
end
|
49
62
|
|
50
63
|
def test_value
|
@@ -86,8 +99,10 @@ class HashTest < Test::Unit::TestCase
|
|
86
99
|
"domain: <ShortText>, " +
|
87
100
|
"range: (nil), " +
|
88
101
|
"flags: <>, " +
|
102
|
+
"size: <0>, " +
|
89
103
|
"encoding: <#{encoding.inspect}>, " +
|
90
|
-
"
|
104
|
+
"default_tokenizer: (nil), " +
|
105
|
+
"normalizer: (nil)>",
|
91
106
|
anonymous_table.inspect)
|
92
107
|
end
|
93
108
|
|
@@ -100,8 +115,10 @@ class HashTest < Test::Unit::TestCase
|
|
100
115
|
"domain: <ShortText>, " +
|
101
116
|
"range: (nil), " +
|
102
117
|
"flags: <>, " +
|
118
|
+
"size: <0>, " +
|
103
119
|
"encoding: <#{encoding.inspect}>, " +
|
104
|
-
"
|
120
|
+
"default_tokenizer: (nil), " +
|
121
|
+
"normalizer: (nil)>",
|
105
122
|
anonymous_table.inspect)
|
106
123
|
end
|
107
124
|
|
@@ -115,8 +132,10 @@ class HashTest < Test::Unit::TestCase
|
|
115
132
|
"domain: <ShortText>, " +
|
116
133
|
"range: (nil), " +
|
117
134
|
"flags: <>, " +
|
135
|
+
"size: <0>, " +
|
118
136
|
"encoding: <#{encoding.inspect}>, " +
|
119
|
-
"
|
137
|
+
"default_tokenizer: (nil), " +
|
138
|
+
"normalizer: (nil)>",
|
120
139
|
named_table.inspect)
|
121
140
|
end
|
122
141
|
|
@@ -129,8 +148,10 @@ class HashTest < Test::Unit::TestCase
|
|
129
148
|
"domain: <ShortText>, " +
|
130
149
|
"range: (nil), " +
|
131
150
|
"flags: <>, " +
|
151
|
+
"size: <0>, " +
|
132
152
|
"encoding: <#{encoding.inspect}>, " +
|
133
|
-
"
|
153
|
+
"default_tokenizer: (nil), " +
|
154
|
+
"normalizer: (nil)>",
|
134
155
|
named_table.inspect)
|
135
156
|
end
|
136
157
|
|
@@ -147,6 +168,14 @@ class HashTest < Test::Unit::TestCase
|
|
147
168
|
hash.default_tokenizer)
|
148
169
|
end
|
149
170
|
|
171
|
+
def test_normalizer
|
172
|
+
hash = Groonga::Hash.create
|
173
|
+
assert_nil(hash.normalizer)
|
174
|
+
hash.normalizer = "NormalizerAuto"
|
175
|
+
assert_equal(Groonga["NormalizerAuto"],
|
176
|
+
hash.normalizer)
|
177
|
+
end
|
178
|
+
|
150
179
|
def test_search
|
151
180
|
users = Groonga::Array.create(:name => "Users")
|
152
181
|
users.define_column("name", "ShortText")
|
data/test/test-index-cursor.rb
CHANGED
@@ -134,10 +134,10 @@ class IndexCursorTest < Test::Unit::TestCase
|
|
134
134
|
:term_frequency, :weight, :n_rest_postings]
|
135
135
|
|
136
136
|
expected = [
|
137
|
-
[1, 1, 1, 0, 1, 0,
|
138
|
-
[2, 1, 1,
|
139
|
-
[2, 1, 2, 0, 1, 0,
|
140
|
-
[3, 1, 2,
|
137
|
+
[1, 1, 1, 0, 1, 0, 0],
|
138
|
+
[2, 1, 1, 1, 1, 0, 0],
|
139
|
+
[2, 1, 2, 0, 1, 0, 0],
|
140
|
+
[3, 1, 2, 2, 1, 0, 0],
|
141
141
|
[3, 1, 3, 0, 1, 0, 0],
|
142
142
|
[3, 1, 4, 1, 1, 0, 0],
|
143
143
|
[3, 1, 5, 3, 1, 0, 0],
|
@@ -1,6 +1,4 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2012 Kouhei Sutou <kou@clear-code.com>
|
4
2
|
#
|
5
3
|
# This library is free software; you can redistribute it and/or
|
6
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -15,6 +13,12 @@
|
|
15
13
|
# License along with this library; if not, write to the Free Software
|
16
14
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
15
|
|
18
|
-
|
16
|
+
class NormalizerTest < Test::Unit::TestCase
|
17
|
+
include GroongaTestUtils
|
18
|
+
|
19
|
+
setup :setup_database
|
19
20
|
|
20
|
-
|
21
|
+
def test_normalize
|
22
|
+
assert_equal("abc", Groonga::Normalizer.normalize("AbC"))
|
23
|
+
end
|
24
|
+
end
|
data/test/test-pagination.rb
CHANGED
@@ -244,6 +244,6 @@ class PaginationTest < Test::Unit::TestCase
|
|
244
244
|
:first_page? => users.first_page?,
|
245
245
|
:last_page? => users.last_page?,
|
246
246
|
:have_pages? => users.have_pages?,
|
247
|
-
:keys => users.collect
|
247
|
+
:keys => users.collect {|record| record.value.key})
|
248
248
|
end
|
249
249
|
end
|
data/test/test-patricia-trie.rb
CHANGED
@@ -40,6 +40,14 @@ class PatriciaTrieTest < Test::Unit::TestCase
|
|
40
40
|
trie.default_tokenizer)
|
41
41
|
end
|
42
42
|
|
43
|
+
def test_normalizer
|
44
|
+
trie = Groonga::PatriciaTrie.create
|
45
|
+
assert_nil(trie.normalizer)
|
46
|
+
trie.normalizer = "NormalizerAuto"
|
47
|
+
assert_equal(Groonga["NormalizerAuto"],
|
48
|
+
trie.normalizer)
|
49
|
+
end
|
50
|
+
|
43
51
|
def test_search
|
44
52
|
users = Groonga::Array.create(:name => "Users")
|
45
53
|
users.define_column("name", "ShortText")
|
data/test/test-schema.rb
CHANGED
@@ -108,10 +108,11 @@ class SchemaTest < Test::Unit::TestCase
|
|
108
108
|
"domain: <Int32>, " +
|
109
109
|
"range: <UInt32>, " +
|
110
110
|
"flags: <>, " +
|
111
|
+
"size: <0>, " +
|
111
112
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
112
|
-
"
|
113
|
+
"default_tokenizer: <#{tokenizer.name}>, " +
|
114
|
+
"normalizer: (nil)>",
|
113
115
|
table.inspect)
|
114
|
-
assert_equal(tokenizer, table.default_tokenizer)
|
115
116
|
end
|
116
117
|
|
117
118
|
def test_rename
|
@@ -154,9 +155,9 @@ class SchemaTest < Test::Unit::TestCase
|
|
154
155
|
:path => path.to_s,
|
155
156
|
:value_type => "Float",
|
156
157
|
:default_tokenizer => "TokenBigram",
|
157
|
-
:key_normalize => true,
|
158
158
|
:key_with_sis => true,
|
159
|
-
:named_path => true
|
159
|
+
:named_path => true,
|
160
|
+
:normalizer => "NormalizerAuto") do |table|
|
160
161
|
end
|
161
162
|
table = context["Posts"]
|
162
163
|
assert_equal("#<Groonga::PatriciaTrie " +
|
@@ -165,11 +166,12 @@ class SchemaTest < Test::Unit::TestCase
|
|
165
166
|
"path: <#{path}>, " +
|
166
167
|
"domain: <Int32>, " +
|
167
168
|
"range: <Float>, " +
|
168
|
-
"flags: <KEY_WITH_SIS
|
169
|
+
"flags: <KEY_WITH_SIS>, " +
|
170
|
+
"size: <0>, " +
|
169
171
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
170
|
-
"
|
172
|
+
"default_tokenizer: <TokenBigram>, " +
|
173
|
+
"normalizer: <NormalizerAuto>>",
|
171
174
|
table.inspect)
|
172
|
-
assert_equal(context["TokenBigram"], table.default_tokenizer)
|
173
175
|
end
|
174
176
|
|
175
177
|
def test_rename
|
@@ -206,15 +208,15 @@ class SchemaTest < Test::Unit::TestCase
|
|
206
208
|
end
|
207
209
|
|
208
210
|
def test_full_option
|
209
|
-
path = @tmp_dir + "
|
211
|
+
path = @tmp_dir + "double-array-trie.groonga"
|
210
212
|
Groonga::Schema.create_table("Posts",
|
211
213
|
:type => :double_array_trie,
|
212
214
|
:key_type => "integer",
|
213
215
|
:path => path.to_s,
|
214
216
|
:value_type => "Float",
|
215
217
|
:default_tokenizer => "TokenBigram",
|
216
|
-
:
|
217
|
-
:
|
218
|
+
:named_path => true,
|
219
|
+
:normalizer => "NormalizerAuto") do |table|
|
218
220
|
end
|
219
221
|
table = context["Posts"]
|
220
222
|
assert_equal("#<Groonga::DoubleArrayTrie " +
|
@@ -223,11 +225,12 @@ class SchemaTest < Test::Unit::TestCase
|
|
223
225
|
"path: <#{path}>, " +
|
224
226
|
"domain: <Int32>, " +
|
225
227
|
"range: <Float>, " +
|
226
|
-
"flags:
|
228
|
+
"flags: <>, " +
|
229
|
+
"size: <0>, " +
|
227
230
|
"encoding: <#{Groonga::Encoding.default.inspect}>, " +
|
228
|
-
"
|
231
|
+
"default_tokenizer: <TokenBigram>, " +
|
232
|
+
"normalizer: <NormalizerAuto>>",
|
229
233
|
table.inspect)
|
230
|
-
assert_equal(context["TokenBigram"], table.default_tokenizer)
|
231
234
|
end
|
232
235
|
|
233
236
|
def test_rename
|
data/test/test-snippet.rb
CHANGED
data/test/test-table.rb
CHANGED
@@ -277,19 +277,30 @@ class TableTest < Test::Unit::TestCase
|
|
277
277
|
bookmark["created_at"].to_a)
|
278
278
|
end
|
279
279
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
280
|
+
class DeleteTest < self
|
281
|
+
setup
|
282
|
+
def setup_data
|
283
|
+
bookmarks_path = @tables_dir + "bookmarks"
|
284
|
+
@bookmarks = Groonga::Array.create(:name => "Bookmarks",
|
285
|
+
:path => bookmarks_path.to_s)
|
286
|
+
|
287
|
+
@bookmark_records = []
|
288
|
+
@bookmark_records << @bookmarks.add
|
289
|
+
@bookmark_records << @bookmarks.add
|
290
|
+
@bookmark_records << @bookmarks.add
|
291
|
+
end
|
284
292
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
293
|
+
def test_id
|
294
|
+
@bookmarks.delete(@bookmark_records.last.id)
|
295
|
+
assert_equal([1, 2], @bookmarks.collect(&:id))
|
296
|
+
end
|
289
297
|
|
290
|
-
|
291
|
-
|
292
|
-
|
298
|
+
def test_expression
|
299
|
+
@bookmarks.delete do |record|
|
300
|
+
record.id < 3
|
301
|
+
end
|
302
|
+
assert_equal([3], @bookmarks.collect(&:id))
|
303
|
+
end
|
293
304
|
end
|
294
305
|
|
295
306
|
def test_remove
|
@@ -407,8 +418,9 @@ class TableTest < Test::Unit::TestCase
|
|
407
418
|
empty1 = bookmarks.add
|
408
419
|
groonga = bookmarks.add(:uri => "http://groonga.org/")
|
409
420
|
empty2 = bookmarks.add
|
421
|
+
sorted_bookmarks = bookmarks.sort([{:key => "uri", :order => :descending}])
|
410
422
|
assert_equal([groonga, empty1, empty2],
|
411
|
-
|
423
|
+
sorted_bookmarks.collect(&:value))
|
412
424
|
end
|
413
425
|
|
414
426
|
def test_group
|