rroonga 2.0.2-x86-mingw32 → 2.0.3-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.
- data/AUTHORS +5 -0
- data/Gemfile +1 -12
- data/README.textile +73 -0
- data/Rakefile +4 -57
- data/bin/grndump +11 -1
- data/ext/groonga/extconf.rb +125 -54
- data/ext/groonga/rb-grn-context.c +25 -7
- data/ext/groonga/rb-grn-database.c +25 -0
- data/ext/groonga/rb-grn-object.c +19 -7
- data/ext/groonga/rb-grn-table.c +8 -10
- data/ext/groonga/rb-grn.h +9 -2
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/dumper.rb +2 -2
- data/lib/groonga/expression-builder.rb +33 -18
- data/rroonga-build.rb +1 -1
- data/vendor/local/bin/groonga-benchmark.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/libmsgpack-3.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/libstdc++-6.dll +0 -0
- data/vendor/local/bin/mecab-config +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga.h +5 -5
- 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 +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/groonga/plugins/tokenizers/mecab.la +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +0 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +4 -4
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +41 -10
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +71 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +154 -4
- data/vendor/local/share/doc/groonga/en/html/_static/underscore.js +21 -29
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +683 -162
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +170 -12
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands.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/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/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/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +23 -16
- data/vendor/local/share/doc/groonga/en/html/indexing.html +95 -14
- data/vendor/local/share/doc/groonga/en/html/install.html +67 -37
- data/vendor/local/share/doc/groonga/en/html/limitations.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/log.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 +161 -25
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference.html +5 -5
- 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/spec/search.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/spec.html +13 -11
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +33 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +33 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +37 -6
- 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.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +293 -29
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +340 -27
- 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 +282 -24
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +524 -15
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +103 -8
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +128 -13
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +155 -17
- 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/en/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +41 -10
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +71 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +154 -4
- data/vendor/local/share/doc/groonga/ja/html/_static/underscore.js +21 -29
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +601 -162
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +170 -12
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands.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/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/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/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +23 -16
- data/vendor/local/share/doc/groonga/ja/html/indexing.html +95 -14
- data/vendor/local/share/doc/groonga/ja/html/install.html +66 -37
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/log.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 +147 -25
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference.html +5 -5
- 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/spec/search.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/spec.html +13 -11
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +33 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +33 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +37 -6
- 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.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +292 -28
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +340 -27
- 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 +282 -24
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +524 -15
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +103 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +128 -13
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +155 -17
- 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/doc/groonga/ja/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/source/commands/select.txt +349 -109
- data/vendor/local/share/doc/groonga/source/commands/suggest-completion.log +28 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-correction.log +28 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-completion.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-correction.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-learn-suggestion.log +1 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-mixed.log +74 -1
- data/vendor/local/share/doc/groonga/source/commands/suggest-suggestion.log +32 -1
- data/vendor/local/share/doc/groonga/source/conf.py +3 -3
- data/vendor/local/share/doc/groonga/source/example/completion-1.log +28 -1
- data/vendor/local/share/doc/groonga/source/example/correction-1.log +28 -1
- data/vendor/local/share/doc/groonga/source/example/suggestion-1.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +1 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +46 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-4.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-5.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-6.log +38 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-7.log +40 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-8.log +48 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-1.log +6 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-2.log +100 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-3.log +5 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-4.log +80 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-5.log +75 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-6.log +31 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/index-7.log +38 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-1.log +7 -7
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-2.log +132 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-3.log +6 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-4.log +132 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-1.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-10.log +95 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-2.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-3.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-4.log +86 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-5.log +32 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-6.log +70 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-7.log +51 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-8.log +55 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/micro_blog-9.log +34 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/network-1.log +18 -1
- data/vendor/local/share/doc/groonga/source/example/tutorial/network-3.log +80 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-1.log +34 -3
- data/vendor/local/share/doc/groonga/source/example/tutorial/patricia_trie-2.log +89 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-1.log +8 -8
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-2.log +66 -2
- data/vendor/local/share/doc/groonga/source/example/tutorial/query_expansion-3.log +76 -2
- data/vendor/local/share/doc/groonga/source/install.txt +41 -10
- data/vendor/local/share/doc/groonga/source/news.txt +71 -0
- data/vendor/local/share/doc/groonga/source/tutorial/data.txt +1 -1
- data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +1 -1
- data/vendor/local/share/groonga/examples/dictionary/init-db.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +1 -1
- data/vendor/local/share/groonga/html/admin/css/{admin.css → groonga-admin.css} +5 -4
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ffd27a_256x240.png → redmond/images/ui-icons_217bc0_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_222222_256x240.png → redmond/images/ui-icons_2e83ff_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_228ef1_256x240.png → redmond/images/ui-icons_469bdd_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/images/ui-icons_ef8c08_256x240.png → redmond/images/ui-icons_d8e7f3_256x240.png} +0 -0
- data/vendor/local/share/groonga/html/admin/css/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/{ui-lightness/jquery-ui-1.8.1.custom.css → redmond/jquery-ui-1.8.18.custom.css} +169 -90
- data/vendor/local/share/groonga/html/admin/images/groonga.svg +121 -0
- data/vendor/local/share/groonga/html/admin/index.html +44 -1145
- data/vendor/local/share/groonga/html/admin/js/groonga-admin.js +1354 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-1.7.2.min.js +4 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.18.custom.min.js +356 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +2813 -331
- data/vendor/local/share/man/man1/groonga.1 +2898 -337
- data/vendor/local/share/mecab/dic/naist-jdic/sys.dic +0 -0
- data/vendor/local/share/mecab/dic/naist-jdic/unk.dic +0 -0
- metadata +988 -921
- data/test/groonga-test-utils.rb +0 -139
- data/test/run-test.rb +0 -60
- data/test/test-accessor.rb +0 -36
- data/test/test-array.rb +0 -123
- data/test/test-column.rb +0 -350
- data/test/test-command-select.rb +0 -147
- data/test/test-context.rb +0 -130
- data/test/test-database-dumper.rb +0 -259
- data/test/test-database.rb +0 -148
- data/test/test-double-array-trie.rb +0 -164
- data/test/test-encoding.rb +0 -33
- data/test/test-exception.rb +0 -96
- data/test/test-expression-builder.rb +0 -269
- data/test/test-expression.rb +0 -134
- data/test/test-fix-size-column.rb +0 -77
- data/test/test-gqtp.rb +0 -70
- data/test/test-hash.rb +0 -344
- data/test/test-index-column.rb +0 -180
- data/test/test-index-cursor.rb +0 -93
- data/test/test-logger.rb +0 -37
- data/test/test-pagination.rb +0 -249
- data/test/test-patricia-trie.rb +0 -415
- data/test/test-plugin.rb +0 -35
- data/test/test-procedure.rb +0 -37
- data/test/test-query-log.rb +0 -258
- data/test/test-record.rb +0 -569
- data/test/test-remote.rb +0 -63
- data/test/test-schema-create-table.rb +0 -267
- data/test/test-schema-dumper.rb +0 -235
- data/test/test-schema-type.rb +0 -208
- data/test/test-schema-view.rb +0 -90
- data/test/test-schema.rb +0 -886
- data/test/test-snippet.rb +0 -130
- data/test/test-table-cursor.rb +0 -187
- data/test/test-table-dumper.rb +0 -83
- data/test/test-table-offset-and-limit.rb +0 -100
- data/test/test-table-select-mecab.rb +0 -80
- data/test/test-table-select-normalize.rb +0 -57
- data/test/test-table-select-weight.rb +0 -123
- data/test/test-table-select.rb +0 -191
- data/test/test-table.rb +0 -675
- data/test/test-type.rb +0 -79
- data/test/test-variable-size-column.rb +0 -147
- data/test/test-variable.rb +0 -28
- data/test/test-vector-column.rb +0 -76
- data/test/test-version.rb +0 -61
- data/test/test-view.rb +0 -72
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/vendor/local/share/groonga/html/admin/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/local/share/groonga/html/admin/js/jquery-1.4.2.min.js +0 -154
- data/vendor/local/share/groonga/html/admin/js/jquery-ui-1.8.1.custom.min.js +0 -756
@@ -1,259 +0,0 @@
|
|
1
|
-
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
|
2
|
-
#
|
3
|
-
# This library is free software; you can redistribute it and/or
|
4
|
-
# modify it under the terms of the GNU Lesser General Public
|
5
|
-
# License version 2.1 as published by the Free Software Foundation.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
-
|
16
|
-
class DatabaseDumperTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
setup :setup_database, :before => :append
|
20
|
-
|
21
|
-
setup
|
22
|
-
def setup_tables
|
23
|
-
Groonga::Schema.define do |schema|
|
24
|
-
schema.create_table("Tags",
|
25
|
-
:type => :hash,
|
26
|
-
:key_type => :short_text,
|
27
|
-
:default_tokenizer => :delimit) do |table|
|
28
|
-
table.text("name")
|
29
|
-
end
|
30
|
-
|
31
|
-
schema.create_table("Users",
|
32
|
-
:type => :hash,
|
33
|
-
:key_type => "ShortText") do |table|
|
34
|
-
table.text("name")
|
35
|
-
end
|
36
|
-
|
37
|
-
schema.create_table("Posts") do |table|
|
38
|
-
table.text("title")
|
39
|
-
table.reference("author", "Users")
|
40
|
-
table.integer("rank")
|
41
|
-
table.unsigned_integer("n_goods")
|
42
|
-
table.short_text("tag_text")
|
43
|
-
table.reference("tags", "Tags", :type => :vector)
|
44
|
-
table.boolean("published")
|
45
|
-
table.time("created_at")
|
46
|
-
end
|
47
|
-
|
48
|
-
schema.change_table("Users") do |table|
|
49
|
-
table.index("Posts.author")
|
50
|
-
end
|
51
|
-
|
52
|
-
schema.change_table("Tags") do |table|
|
53
|
-
table.index("Posts.tag_text")
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
private
|
59
|
-
def dump(options={})
|
60
|
-
Groonga::DatabaseDumper.new(options).dump
|
61
|
-
end
|
62
|
-
|
63
|
-
def posts
|
64
|
-
context["Posts"]
|
65
|
-
end
|
66
|
-
|
67
|
-
def dumped_schema
|
68
|
-
<<-EOS
|
69
|
-
table_create Posts TABLE_NO_KEY
|
70
|
-
column_create Posts created_at COLUMN_SCALAR Time
|
71
|
-
column_create Posts n_goods COLUMN_SCALAR UInt32
|
72
|
-
column_create Posts published COLUMN_SCALAR Bool
|
73
|
-
column_create Posts rank COLUMN_SCALAR Int32
|
74
|
-
column_create Posts tag_text COLUMN_SCALAR ShortText
|
75
|
-
column_create Posts title COLUMN_SCALAR Text
|
76
|
-
|
77
|
-
table_create Tags TABLE_HASH_KEY --key_type ShortText --default_tokenizer TokenDelimit
|
78
|
-
column_create Tags name COLUMN_SCALAR Text
|
79
|
-
|
80
|
-
table_create Users TABLE_HASH_KEY --key_type ShortText
|
81
|
-
column_create Users name COLUMN_SCALAR Text
|
82
|
-
|
83
|
-
column_create Posts author COLUMN_SCALAR Users
|
84
|
-
column_create Posts tags COLUMN_VECTOR Tags
|
85
|
-
|
86
|
-
column_create Tags Posts_tag_text COLUMN_INDEX Posts tag_text
|
87
|
-
|
88
|
-
column_create Users Posts_author COLUMN_INDEX Posts author
|
89
|
-
EOS
|
90
|
-
end
|
91
|
-
|
92
|
-
class EmptyTest < DatabaseDumperTest
|
93
|
-
def test_default
|
94
|
-
assert_equal(dumped_schema, dump)
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
class HaveDataTest < DatabaseDumperTest
|
99
|
-
setup
|
100
|
-
def setup_data
|
101
|
-
posts.add(:author => "mori",
|
102
|
-
:created_at => Time.parse("2010-03-08 16:52 JST"),
|
103
|
-
:n_goods => 4,
|
104
|
-
:published => true,
|
105
|
-
:rank => 10,
|
106
|
-
:tag_text => "search mori",
|
107
|
-
:tags => ["search", "mori"],
|
108
|
-
:title => "Why search engine find?")
|
109
|
-
end
|
110
|
-
|
111
|
-
def test_default
|
112
|
-
assert_equal(<<-EOS, dump)
|
113
|
-
#{dumped_schema.chomp}
|
114
|
-
|
115
|
-
load --table Posts
|
116
|
-
[
|
117
|
-
["_id","author","created_at","n_goods","published","rank","tag_text","tags","title"],
|
118
|
-
[1,"mori",1268034720.0,4,true,10,"search mori",["search","mori"],"Why search engine find?"]
|
119
|
-
]
|
120
|
-
|
121
|
-
load --table Tags
|
122
|
-
[
|
123
|
-
["_key","name"],
|
124
|
-
["search",""],
|
125
|
-
["mori",""]
|
126
|
-
]
|
127
|
-
|
128
|
-
load --table Users
|
129
|
-
[
|
130
|
-
["_key","name"],
|
131
|
-
["mori",""]
|
132
|
-
]
|
133
|
-
EOS
|
134
|
-
end
|
135
|
-
|
136
|
-
def test_limit_tables
|
137
|
-
assert_equal(<<-EOS, dump(:tables => ["Posts"]))
|
138
|
-
#{dumped_schema.chomp}
|
139
|
-
|
140
|
-
load --table Posts
|
141
|
-
[
|
142
|
-
["_id","author","created_at","n_goods","published","rank","tag_text","tags","title"],
|
143
|
-
[1,"mori",1268034720.0,4,true,10,"search mori",["search","mori"],"Why search engine find?"]
|
144
|
-
]
|
145
|
-
EOS
|
146
|
-
end
|
147
|
-
|
148
|
-
def test_limit_tables_with_regexp
|
149
|
-
assert_equal(<<-EOS, dump(:tables => [/Posts?/]))
|
150
|
-
#{dumped_schema.chomp}
|
151
|
-
|
152
|
-
load --table Posts
|
153
|
-
[
|
154
|
-
["_id","author","created_at","n_goods","published","rank","tag_text","tags","title"],
|
155
|
-
[1,"mori",1268034720.0,4,true,10,"search mori",["search","mori"],"Why search engine find?"]
|
156
|
-
]
|
157
|
-
EOS
|
158
|
-
end
|
159
|
-
|
160
|
-
def test_exclude_tables
|
161
|
-
dump_options = {
|
162
|
-
:exclude_tables => ["Posts"],
|
163
|
-
}
|
164
|
-
assert_equal(<<-EOS, dump(dump_options))
|
165
|
-
#{dumped_schema.chomp}
|
166
|
-
|
167
|
-
load --table Tags
|
168
|
-
[
|
169
|
-
["_key","name"],
|
170
|
-
["search",""],
|
171
|
-
["mori",""]
|
172
|
-
]
|
173
|
-
|
174
|
-
load --table Users
|
175
|
-
[
|
176
|
-
["_key","name"],
|
177
|
-
["mori",""]
|
178
|
-
]
|
179
|
-
EOS
|
180
|
-
end
|
181
|
-
|
182
|
-
def test_exclude_tables_with_regexp
|
183
|
-
dump_options = {
|
184
|
-
:exclude_tables => [/Posts?/],
|
185
|
-
}
|
186
|
-
assert_equal(<<-EOS, dump(dump_options))
|
187
|
-
#{dumped_schema.chomp}
|
188
|
-
|
189
|
-
load --table Tags
|
190
|
-
[
|
191
|
-
["_key","name"],
|
192
|
-
["search",""],
|
193
|
-
["mori",""]
|
194
|
-
]
|
195
|
-
|
196
|
-
load --table Users
|
197
|
-
[
|
198
|
-
["_key","name"],
|
199
|
-
["mori",""]
|
200
|
-
]
|
201
|
-
EOS
|
202
|
-
end
|
203
|
-
|
204
|
-
def test_tables_combination
|
205
|
-
dump_options = {
|
206
|
-
:exclude_tables => ["Posts"],
|
207
|
-
:tables => ["Posts", "Users"],
|
208
|
-
}
|
209
|
-
assert_equal(<<-EOS, dump(dump_options))
|
210
|
-
#{dumped_schema.chomp}
|
211
|
-
|
212
|
-
load --table Users
|
213
|
-
[
|
214
|
-
["_key","name"],
|
215
|
-
["mori",""]
|
216
|
-
]
|
217
|
-
EOS
|
218
|
-
end
|
219
|
-
|
220
|
-
def test_no_schema
|
221
|
-
assert_equal(<<-EOS, dump(:dump_schema => false))
|
222
|
-
load --table Posts
|
223
|
-
[
|
224
|
-
["_id","author","created_at","n_goods","published","rank","tag_text","tags","title"],
|
225
|
-
[1,"mori",1268034720.0,4,true,10,"search mori",["search","mori"],"Why search engine find?"]
|
226
|
-
]
|
227
|
-
|
228
|
-
load --table Tags
|
229
|
-
[
|
230
|
-
["_key","name"],
|
231
|
-
["search",""],
|
232
|
-
["mori",""]
|
233
|
-
]
|
234
|
-
|
235
|
-
load --table Users
|
236
|
-
[
|
237
|
-
["_key","name"],
|
238
|
-
["mori",""]
|
239
|
-
]
|
240
|
-
EOS
|
241
|
-
end
|
242
|
-
|
243
|
-
def test_no_tables
|
244
|
-
assert_equal(<<-EOS, dump(:dump_tables => false))
|
245
|
-
#{dumped_schema.chomp}
|
246
|
-
EOS
|
247
|
-
end
|
248
|
-
end
|
249
|
-
|
250
|
-
class PluginTest < DatabaseDumperTest
|
251
|
-
def test_standard_plugin
|
252
|
-
Groonga::Plugin.register("suggest/suggest")
|
253
|
-
assert_equal("register suggest/suggest\n" +
|
254
|
-
"\n" +
|
255
|
-
dumped_schema,
|
256
|
-
dump)
|
257
|
-
end
|
258
|
-
end
|
259
|
-
end
|
data/test/test-database.rb
DELETED
@@ -1,148 +0,0 @@
|
|
1
|
-
# Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
|
2
|
-
#
|
3
|
-
# This library is free software; you can redistribute it and/or
|
4
|
-
# modify it under the terms of the GNU Lesser General Public
|
5
|
-
# License version 2.1 as published by the Free Software Foundation.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
-
|
16
|
-
class DatabaseTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
def test_create
|
20
|
-
assert_nil(Groonga::Context.default.database)
|
21
|
-
|
22
|
-
db_path = @tmp_dir + "db"
|
23
|
-
assert_not_predicate(db_path, :exist?)
|
24
|
-
database = Groonga::Database.create(:path => db_path.to_s)
|
25
|
-
assert_predicate(db_path, :exist?)
|
26
|
-
assert_not_predicate(database, :closed?)
|
27
|
-
|
28
|
-
assert_equal(database, Groonga::Context.default.database)
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_temporary
|
32
|
-
before_files = @tmp_dir.children
|
33
|
-
database = Groonga::Database.create
|
34
|
-
assert_nil(database.name)
|
35
|
-
assert_equal(before_files, @tmp_dir.children)
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_open
|
39
|
-
db_path = @tmp_dir + "db"
|
40
|
-
database = Groonga::Database.create(:path => db_path.to_s)
|
41
|
-
database.close
|
42
|
-
|
43
|
-
assert_predicate(database, :closed?)
|
44
|
-
called = false
|
45
|
-
Groonga::Database.open(db_path.to_s) do |_database|
|
46
|
-
database = _database
|
47
|
-
assert_not_predicate(database, :closed?)
|
48
|
-
called = true
|
49
|
-
end
|
50
|
-
assert_true(called)
|
51
|
-
assert_predicate(database, :closed?)
|
52
|
-
end
|
53
|
-
|
54
|
-
def test_close
|
55
|
-
db_path = @tmp_dir + "db"
|
56
|
-
database = Groonga::Database.create(:path => db_path.to_s)
|
57
|
-
database.close
|
58
|
-
|
59
|
-
database = Groonga::Database.open(db_path.to_s)
|
60
|
-
assert_not_predicate(database, :closed?)
|
61
|
-
database.close
|
62
|
-
assert_predicate(database, :closed?)
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_new
|
66
|
-
db_path = @tmp_dir + "db"
|
67
|
-
assert_raise(Groonga::NoSuchFileOrDirectory) do
|
68
|
-
Groonga::Database.new(db_path.to_s)
|
69
|
-
end
|
70
|
-
|
71
|
-
Groonga::Database.create(:path => db_path.to_s)
|
72
|
-
assert_not_predicate(Groonga::Database.new(db_path.to_s), :closed?)
|
73
|
-
end
|
74
|
-
|
75
|
-
def test_each
|
76
|
-
db_path = @tmp_dir + "db"
|
77
|
-
database = Groonga::Database.create(:path => db_path.to_s)
|
78
|
-
default_object_names = database.collect {|object| object.name}.sort
|
79
|
-
assert_send([default_object_names, :include?, "Bool"])
|
80
|
-
end
|
81
|
-
|
82
|
-
def test_encoding
|
83
|
-
assert_equal(Groonga::Encoding.default,
|
84
|
-
Groonga::Database.create.encoding)
|
85
|
-
end
|
86
|
-
|
87
|
-
def test_lock
|
88
|
-
database = Groonga::Database.create
|
89
|
-
|
90
|
-
assert_not_predicate(database, :locked?)
|
91
|
-
database.lock
|
92
|
-
assert_predicate(database, :locked?)
|
93
|
-
database.unlock
|
94
|
-
assert_not_predicate(database, :locked?)
|
95
|
-
end
|
96
|
-
|
97
|
-
def test_lock_failed
|
98
|
-
database = Groonga::Database.create
|
99
|
-
|
100
|
-
database.lock
|
101
|
-
assert_raise(Groonga::ResourceDeadlockAvoided) do
|
102
|
-
database.lock
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
def test_lock_block
|
107
|
-
database = Groonga::Database.create
|
108
|
-
|
109
|
-
assert_not_predicate(database, :locked?)
|
110
|
-
database.lock do
|
111
|
-
assert_predicate(database, :locked?)
|
112
|
-
end
|
113
|
-
assert_not_predicate(database, :locked?)
|
114
|
-
end
|
115
|
-
|
116
|
-
def test_clear_lock
|
117
|
-
database = Groonga::Database.create
|
118
|
-
|
119
|
-
assert_not_predicate(database, :locked?)
|
120
|
-
database.lock
|
121
|
-
assert_predicate(database, :locked?)
|
122
|
-
database.clear_lock
|
123
|
-
assert_not_predicate(database, :locked?)
|
124
|
-
end
|
125
|
-
|
126
|
-
def test_touch
|
127
|
-
database = Groonga::Database.create
|
128
|
-
assert_nothing_raised do
|
129
|
-
database.touch
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
def test_defrag
|
134
|
-
setup_database
|
135
|
-
Groonga::Schema.define do |schema|
|
136
|
-
schema.create_table("Users") do |table|
|
137
|
-
table.short_text("name")
|
138
|
-
table.short_text("address")
|
139
|
-
end
|
140
|
-
end
|
141
|
-
users = context["Users"]
|
142
|
-
1000.times do |i|
|
143
|
-
users.add(:name => "user #{i}" * 1000,
|
144
|
-
:address => "address #{i}" * 1000)
|
145
|
-
end
|
146
|
-
assert_equal(7, @database.defrag)
|
147
|
-
end
|
148
|
-
end
|
@@ -1,164 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
|
4
|
-
#
|
5
|
-
# This library is free software; you can redistribute it and/or
|
6
|
-
# modify it under the terms of the GNU Lesser General Public
|
7
|
-
# License version 2.1 as published by the Free Software Foundation.
|
8
|
-
#
|
9
|
-
# This library is distributed in the hope that it will be useful,
|
10
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12
|
-
# Lesser General Public License for more details.
|
13
|
-
#
|
14
|
-
# You should have received a copy of the GNU Lesser General Public
|
15
|
-
# License along with this library; if not, write to the Free Software
|
16
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
|
-
|
18
|
-
class DoubleArrayTrieTest < Test::Unit::TestCase
|
19
|
-
include GroongaTestUtils
|
20
|
-
include ERB::Util
|
21
|
-
|
22
|
-
setup :setup_database
|
23
|
-
|
24
|
-
def test_support_key?
|
25
|
-
assert_predicate(Groonga::DoubleArrayTrie.create(:name => "Users",
|
26
|
-
:key_type => "ShortText"),
|
27
|
-
:support_key?)
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_encoding
|
31
|
-
assert_equal(Groonga::Encoding.default,
|
32
|
-
Groonga::DoubleArrayTrie.create.encoding)
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_tokenizer
|
36
|
-
trie = Groonga::DoubleArrayTrie.create
|
37
|
-
assert_nil(trie.default_tokenizer)
|
38
|
-
trie.default_tokenizer = "TokenTrigram"
|
39
|
-
assert_equal(Groonga::Context.default["TokenTrigram"],
|
40
|
-
trie.default_tokenizer)
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_search
|
44
|
-
users = Groonga::Array.create(:name => "Users")
|
45
|
-
users.define_column("name", "ShortText")
|
46
|
-
|
47
|
-
bookmarks = Groonga::DoubleArrayTrie.create(:name => "Bookmarks",
|
48
|
-
:key_type => "ShortText")
|
49
|
-
bookmarks.define_column("user_id", users)
|
50
|
-
|
51
|
-
daijiro = users.add
|
52
|
-
daijiro["name"] = "daijiro"
|
53
|
-
gunyarakun = users.add
|
54
|
-
gunyarakun["name"] = "gunyarakun"
|
55
|
-
|
56
|
-
groonga = bookmarks.add("http://groonga.org/")
|
57
|
-
groonga["user_id"] = daijiro
|
58
|
-
|
59
|
-
records = bookmarks.search("http://groonga.org/")
|
60
|
-
assert_equal(["daijiro"],
|
61
|
-
records.records.collect {|record| record[".user_id.name"]})
|
62
|
-
end
|
63
|
-
|
64
|
-
def test_add
|
65
|
-
users = Groonga::DoubleArrayTrie.create(:name => "Users")
|
66
|
-
users.define_column("address", "Text")
|
67
|
-
me = users.add("me", :address => "me@example.com")
|
68
|
-
assert_equal("me@example.com", me[:address])
|
69
|
-
end
|
70
|
-
|
71
|
-
def test_default_tokenizer_on_create
|
72
|
-
terms = Groonga::DoubleArrayTrie.create(:name => "Terms",
|
73
|
-
:default_tokenizer => "TokenUnigram")
|
74
|
-
assert_equal(context[Groonga::Type::UNIGRAM],
|
75
|
-
terms.default_tokenizer)
|
76
|
-
end
|
77
|
-
|
78
|
-
def test_duplicated_name
|
79
|
-
Groonga::DoubleArrayTrie.create(:name => "Users")
|
80
|
-
assert_raise(Groonga::InvalidArgument) do
|
81
|
-
Groonga::DoubleArrayTrie.create(:name => "Users")
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def test_has_key?
|
86
|
-
users = Groonga::DoubleArrayTrie.create(:name => "Users")
|
87
|
-
assert_false(users.has_key?("morita"))
|
88
|
-
users.add("morita")
|
89
|
-
assert_true(users.has_key?("morita"))
|
90
|
-
end
|
91
|
-
|
92
|
-
def test_prefix_cursor
|
93
|
-
paths = Groonga::DoubleArrayTrie.create(:name => "Paths",
|
94
|
-
:key_type => 'ShortText')
|
95
|
-
paths.add('/')
|
96
|
-
paths.add('/tmp')
|
97
|
-
paths.add('/usr/bin')
|
98
|
-
paths.add('/usr/local/bin')
|
99
|
-
|
100
|
-
assert_prefix_cursor(["/usr/local/bin", "/usr/bin", "/tmp", "/"],
|
101
|
-
paths, "/", {:order => :desc})
|
102
|
-
assert_prefix_cursor(["/", "/tmp", "/usr/bin", "/usr/local/bin"],
|
103
|
-
paths, "/")
|
104
|
-
assert_prefix_cursor(["/usr/local/bin", "/usr/bin"],
|
105
|
-
paths, "/usr/local",
|
106
|
-
{:key_bytes => "/usr".size, :order => :desc})
|
107
|
-
assert_prefix_cursor(["/tmp", "/usr/bin"],
|
108
|
-
paths, "/",
|
109
|
-
{:offset => 1, :limit => 2})
|
110
|
-
end
|
111
|
-
|
112
|
-
def assert_prefix_cursor(expected, tables, prefix, options={})
|
113
|
-
actual = []
|
114
|
-
tables.open_prefix_cursor(prefix, options) do |cursor|
|
115
|
-
cursor.each do |record|
|
116
|
-
actual << record.key
|
117
|
-
end
|
118
|
-
end
|
119
|
-
assert_equal(expected, actual)
|
120
|
-
end
|
121
|
-
|
122
|
-
def test_add_uint_key
|
123
|
-
numbers = Groonga::DoubleArrayTrie.create(:name => "Numbers",
|
124
|
-
:key_type => "UInt32")
|
125
|
-
numbers.add(1)
|
126
|
-
numbers.add(2)
|
127
|
-
numbers.add(5)
|
128
|
-
numbers.add(7)
|
129
|
-
assert_equal([1, 2, 5, 7], numbers.collect {|number| number.key})
|
130
|
-
end
|
131
|
-
|
132
|
-
def test_added?
|
133
|
-
users = Groonga::DoubleArrayTrie.create(:name => "Users",
|
134
|
-
:key_type => "ShortText")
|
135
|
-
bob = users.add("bob")
|
136
|
-
assert_predicate(bob, :added?)
|
137
|
-
bob_again = users.add("bob")
|
138
|
-
assert_not_predicate(bob_again, :added?)
|
139
|
-
end
|
140
|
-
|
141
|
-
def test_defrag
|
142
|
-
users = Groonga::DoubleArrayTrie.create(:name => "Users",
|
143
|
-
:key_type => "ShortText")
|
144
|
-
users.define_column("name", "ShortText")
|
145
|
-
users.define_column("address", "ShortText")
|
146
|
-
1000.times do |i|
|
147
|
-
users.add("user #{i}",
|
148
|
-
:name => "user #{i}" * 1000,
|
149
|
-
:address => "address #{i}" * 1000)
|
150
|
-
end
|
151
|
-
assert_equal(7, users.defrag)
|
152
|
-
end
|
153
|
-
|
154
|
-
def test_rename
|
155
|
-
users = Groonga::DoubleArrayTrie.create(:name => "Users",
|
156
|
-
:key_type => "ShortText")
|
157
|
-
name = users.define_column("name", "ShortText")
|
158
|
-
address = users.define_column("address", "ShortText")
|
159
|
-
|
160
|
-
users.rename("People")
|
161
|
-
assert_equal(["People", "People.name", "People.address"],
|
162
|
-
[users.name, name.name, address.name])
|
163
|
-
end
|
164
|
-
end
|
data/test/test-encoding.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
2
|
-
#
|
3
|
-
# This library is free software; you can redistribute it and/or
|
4
|
-
# modify it under the terms of the GNU Lesser General Public
|
5
|
-
# License version 2.1 as published by the Free Software Foundation.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
-
|
16
|
-
class EncodingTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
def test_constants
|
20
|
-
assert_equal(:default, Groonga::Encoding::DEFAULT)
|
21
|
-
assert_equal(:none, Groonga::Encoding::NONE)
|
22
|
-
assert_equal(:euc_jp, Groonga::Encoding::EUC_JP)
|
23
|
-
assert_equal(:sjis, Groonga::Encoding::SJIS)
|
24
|
-
assert_equal(:utf8, Groonga::Encoding::UTF8)
|
25
|
-
assert_equal(:latin1, Groonga::Encoding::LATIN1)
|
26
|
-
assert_equal(:koi8r, Groonga::Encoding::KOI8R)
|
27
|
-
end
|
28
|
-
|
29
|
-
def test_default
|
30
|
-
Groonga::Encoding.default = :utf8
|
31
|
-
assert_equal(:utf8, Groonga::Encoding.default)
|
32
|
-
end
|
33
|
-
end
|
data/test/test-exception.rb
DELETED
@@ -1,96 +0,0 @@
|
|
1
|
-
# Copyright (C) 2009-2010 Kouhei Sutou <kou@clear-code.com>
|
2
|
-
#
|
3
|
-
# This library is free software; you can redistribute it and/or
|
4
|
-
# modify it under the terms of the GNU Lesser General Public
|
5
|
-
# License version 2.1 as published by the Free Software Foundation.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
-
|
16
|
-
class ExceptionTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
def test_defined
|
20
|
-
assert_not_const_defined(Groonga, :Success)
|
21
|
-
|
22
|
-
assert_const_defined(Groonga, :Error)
|
23
|
-
assert_const_defined(Groonga, :ObjectClosed)
|
24
|
-
|
25
|
-
assert_const_defined(Groonga, :EndOfData)
|
26
|
-
assert_const_defined(Groonga, :UnknownError)
|
27
|
-
assert_const_defined(Groonga, :OperationNotPermitted)
|
28
|
-
assert_const_defined(Groonga, :NoSuchFileOrDirectory)
|
29
|
-
assert_const_defined(Groonga, :NoSuchProcess)
|
30
|
-
assert_const_defined(Groonga, :InterruptedFunctionCall)
|
31
|
-
assert_const_defined(Groonga, :InputOutputError)
|
32
|
-
assert_const_defined(Groonga, :NoSuchDeviceOrAddress)
|
33
|
-
assert_const_defined(Groonga, :ArgumentListTooLong)
|
34
|
-
assert_const_defined(Groonga, :ExecFormatError)
|
35
|
-
assert_const_defined(Groonga, :BadFileDescriptor)
|
36
|
-
assert_const_defined(Groonga, :NoChildProcesses)
|
37
|
-
assert_const_defined(Groonga, :ResourceTemporarilyUnavailable)
|
38
|
-
assert_const_defined(Groonga, :NotEnoughSpace)
|
39
|
-
assert_const_defined(Groonga, :PermissionDenied)
|
40
|
-
assert_const_defined(Groonga, :BadAddress)
|
41
|
-
assert_const_defined(Groonga, :ResourceBusy)
|
42
|
-
assert_const_defined(Groonga, :FileExists)
|
43
|
-
assert_const_defined(Groonga, :ImproperLink)
|
44
|
-
assert_const_defined(Groonga, :NoSuchDevice)
|
45
|
-
assert_const_defined(Groonga, :NotADirectory)
|
46
|
-
assert_const_defined(Groonga, :IsADirectory)
|
47
|
-
assert_const_defined(Groonga, :InvalidArgument)
|
48
|
-
assert_const_defined(Groonga, :TooManyOpenFilesInSystem)
|
49
|
-
assert_const_defined(Groonga, :TooManyOpenFiles)
|
50
|
-
assert_const_defined(Groonga, :InappropriateIOControlOperation)
|
51
|
-
assert_const_defined(Groonga, :FileTooLarge)
|
52
|
-
assert_const_defined(Groonga, :NoSpaceLeftOnDevice)
|
53
|
-
assert_const_defined(Groonga, :InvalidSeek)
|
54
|
-
assert_const_defined(Groonga, :ReadOnlyFileSystem)
|
55
|
-
assert_const_defined(Groonga, :TooManyLinks)
|
56
|
-
assert_const_defined(Groonga, :BrokenPipe)
|
57
|
-
assert_const_defined(Groonga, :DomainError)
|
58
|
-
assert_const_defined(Groonga, :ResultTooLarge)
|
59
|
-
assert_const_defined(Groonga, :ResourceDeadlockAvoided)
|
60
|
-
assert_const_defined(Groonga, :NoMemoryAvailable)
|
61
|
-
assert_const_defined(Groonga, :FilenameTooLong)
|
62
|
-
assert_const_defined(Groonga, :NoLocksAvailable)
|
63
|
-
assert_const_defined(Groonga, :FunctionNotImplemented)
|
64
|
-
assert_const_defined(Groonga, :DirectoryNotEmpty)
|
65
|
-
assert_const_defined(Groonga, :IllegalByteSequence)
|
66
|
-
assert_const_defined(Groonga, :SocketNotInitialized)
|
67
|
-
assert_const_defined(Groonga, :OperationWouldBlock)
|
68
|
-
assert_const_defined(Groonga, :AddressIsNotAvailable)
|
69
|
-
assert_const_defined(Groonga, :NetworkIsDown)
|
70
|
-
assert_const_defined(Groonga, :NoBuffer)
|
71
|
-
assert_const_defined(Groonga, :SocketIsAlreadyConnected)
|
72
|
-
assert_const_defined(Groonga, :SocketIsNotConnected)
|
73
|
-
assert_const_defined(Groonga, :SocketIsAlreadyShutdowned)
|
74
|
-
assert_const_defined(Groonga, :OperationTimeout)
|
75
|
-
assert_const_defined(Groonga, :ConnectionRefused)
|
76
|
-
assert_const_defined(Groonga, :RangeError)
|
77
|
-
assert_const_defined(Groonga, :TokenizerError)
|
78
|
-
assert_const_defined(Groonga, :FileCorrupt)
|
79
|
-
assert_const_defined(Groonga, :InvalidFormat)
|
80
|
-
assert_const_defined(Groonga, :ObjectCorrupt)
|
81
|
-
assert_const_defined(Groonga, :TooManySymbolicLinks)
|
82
|
-
assert_const_defined(Groonga, :NotSocket)
|
83
|
-
assert_const_defined(Groonga, :OperationNotSupported)
|
84
|
-
assert_const_defined(Groonga, :AddressIsInUse)
|
85
|
-
assert_const_defined(Groonga, :ZLibError)
|
86
|
-
assert_const_defined(Groonga, :LZOError)
|
87
|
-
assert_const_defined(Groonga, :StackOverFlow)
|
88
|
-
assert_const_defined(Groonga, :SyntaxError)
|
89
|
-
assert_const_defined(Groonga, :RetryMax)
|
90
|
-
assert_const_defined(Groonga, :IncompatibleFileFormat)
|
91
|
-
assert_const_defined(Groonga, :UpdateNotAllowed)
|
92
|
-
assert_const_defined(Groonga, :TooSmallOffset)
|
93
|
-
assert_const_defined(Groonga, :TooLargeOffset)
|
94
|
-
assert_const_defined(Groonga, :TooSmallLimit)
|
95
|
-
end
|
96
|
-
end
|