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
data/test/test-snippet.rb
DELETED
@@ -1,130 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2009-2010 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 SnippetTest < Test::Unit::TestCase
|
19
|
-
include GroongaTestUtils
|
20
|
-
|
21
|
-
def setup_encoding
|
22
|
-
Groonga::Encoding.default = :utf8
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_new_without_arguments
|
26
|
-
assert_nothing_raised do
|
27
|
-
Groonga::Snippet.new
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def test_execute
|
32
|
-
snippet = Groonga::Snippet.new
|
33
|
-
snippet.add_keyword("検索", :open_tag => "[[", :close_tag => "]]")
|
34
|
-
assert_equal(["groonga は組み込み型の全文[[検索]]エンジンライブラリです。DBMSやスクリプト",
|
35
|
-
"組み込むことによって、その全文[[検索]]機能を強化することができます。ま"],
|
36
|
-
snippet.execute(text))
|
37
|
-
end
|
38
|
-
|
39
|
-
def test_execute_with_nil
|
40
|
-
snippet = Groonga::Snippet.new
|
41
|
-
snippet.add_keyword("検索", :open_tag => "[[", :close_tag => "]]")
|
42
|
-
message = "snippet text must be String: <nil>"
|
43
|
-
assert_raise(Groonga::InvalidArgument.new(message)) do
|
44
|
-
snippet.execute(nil)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_invalid_encoding
|
49
|
-
Groonga::Context.default.encoding = :shift_jis
|
50
|
-
snippet = Groonga::Snippet.new
|
51
|
-
snippet.add_keyword("検索")
|
52
|
-
assert_equal([], snippet.execute(text))
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_default_tag
|
56
|
-
snippet = Groonga::Snippet.new(:default_open_tag => "<<",
|
57
|
-
:default_close_tag => ">>")
|
58
|
-
snippet.add_keyword("全文")
|
59
|
-
assert_equal(["groonga は組み込み型の<<全文>>検索エンジンライブラリです。DBMSやスクリプト",
|
60
|
-
"等に組み込むことによって、その<<全文>>検索機能を強化することができます"],
|
61
|
-
snippet.execute(text))
|
62
|
-
end
|
63
|
-
|
64
|
-
def test_width
|
65
|
-
snippet = Groonga::Snippet.new(:width => 30,
|
66
|
-
:default_open_tag => "{",
|
67
|
-
:default_close_tag => "}")
|
68
|
-
snippet.add_keyword("データ")
|
69
|
-
assert_equal(["基づく{データ}ストア機",
|
70
|
-
"高速\nな{データ}ストア"],
|
71
|
-
snippet.execute(text))
|
72
|
-
end
|
73
|
-
|
74
|
-
def test_max_results
|
75
|
-
snippet = Groonga::Snippet.new(:width => 30,
|
76
|
-
:max_results => 1,
|
77
|
-
:default_open_tag => "{",
|
78
|
-
:default_close_tag => "}")
|
79
|
-
snippet.add_keyword("データ")
|
80
|
-
assert_equal(["基づく{データ}ストア機"],
|
81
|
-
snippet.execute(text))
|
82
|
-
end
|
83
|
-
|
84
|
-
def test_normalize
|
85
|
-
options_without_normalize = {
|
86
|
-
:width => 30,
|
87
|
-
:default_open_tag => "{",
|
88
|
-
:default_close_tag => "}",
|
89
|
-
}
|
90
|
-
snippet = Groonga::Snippet.new(options_without_normalize)
|
91
|
-
snippet.add_keyword("処理系等")
|
92
|
-
assert_equal([], snippet.execute(text))
|
93
|
-
|
94
|
-
options_with_normalize = options_without_normalize.merge(:normalize => true)
|
95
|
-
snippet = Groonga::Snippet.new(options_with_normalize)
|
96
|
-
snippet.add_keyword("処理系等")
|
97
|
-
assert_equal(["ト言語{処理\n系等}に組"],
|
98
|
-
snippet.execute(text))
|
99
|
-
end
|
100
|
-
|
101
|
-
def test_html_escape
|
102
|
-
text = "groonga は組み込み型の全文検索エンジン&データストアライブラリです。"
|
103
|
-
options_without_html_escape = {
|
104
|
-
:width => 30,
|
105
|
-
:default_open_tag => "<",
|
106
|
-
:default_close_tag => ">",
|
107
|
-
}
|
108
|
-
snippet = Groonga::Snippet.new(options_without_html_escape)
|
109
|
-
snippet.add_keyword("エンジン")
|
110
|
-
assert_equal(["文検索<エンジン>&デー"],
|
111
|
-
snippet.execute(text))
|
112
|
-
|
113
|
-
options_with_html_escape =
|
114
|
-
options_without_html_escape.merge(:html_escape => true)
|
115
|
-
snippet = Groonga::Snippet.new(options_with_html_escape)
|
116
|
-
snippet.add_keyword("エンジン")
|
117
|
-
assert_equal(["文検索<エンジン>&デー"],
|
118
|
-
snippet.execute(text))
|
119
|
-
end
|
120
|
-
|
121
|
-
private
|
122
|
-
def text
|
123
|
-
<<-EOT
|
124
|
-
groonga は組み込み型の全文検索エンジンライブラリです。DBMSやスクリプト言語処理
|
125
|
-
系等に組み込むことによって、その全文検索機能を強化することができます。また、リ
|
126
|
-
レーショナルモデルに基づくデータストア機能を内包しており、groonga単体でも高速
|
127
|
-
なデータストアサーバとして使用することができます。
|
128
|
-
EOT
|
129
|
-
end
|
130
|
-
end
|
data/test/test-table-cursor.rb
DELETED
@@ -1,187 +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 TableCursorTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
def setup
|
20
|
-
setup_database
|
21
|
-
|
22
|
-
@bookmarks_path = @tables_dir + "table"
|
23
|
-
@bookmarks = Groonga::PatriciaTrie.create(:name => "Bookmarks",
|
24
|
-
:path => @bookmarks_path.to_s)
|
25
|
-
@groonga_bookmark = @bookmarks.add("groonga")
|
26
|
-
@cutter_bookmark = @bookmarks.add("Cutter")
|
27
|
-
@ruby_bookmark = @bookmarks.add("Ruby")
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_open
|
31
|
-
keys = []
|
32
|
-
@bookmarks.open_cursor do |cursor|
|
33
|
-
while cursor.next
|
34
|
-
keys << cursor.key
|
35
|
-
end
|
36
|
-
end
|
37
|
-
assert_equal(["Cutter", "Ruby", "groonga"],
|
38
|
-
keys)
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_open_ascendent
|
42
|
-
record_and_key_list = []
|
43
|
-
@bookmarks.open_cursor(:order => :ascending) do |cursor|
|
44
|
-
record_and_key_list = cursor.collect {|record| [record, cursor.key]}
|
45
|
-
end
|
46
|
-
assert_equal([[@cutter_bookmark, "Cutter"],
|
47
|
-
[@ruby_bookmark, "Ruby"],
|
48
|
-
[@groonga_bookmark, "groonga"]],
|
49
|
-
record_and_key_list)
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_without_limit_and_offset
|
53
|
-
users = create_users
|
54
|
-
add_users(users)
|
55
|
-
results = []
|
56
|
-
users.open_cursor do |cursor|
|
57
|
-
cursor.each do |record|
|
58
|
-
results << record["name"]
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
assert_equal((100..199).collect {|i| "user#{i}"},
|
63
|
-
results)
|
64
|
-
end
|
65
|
-
|
66
|
-
def test_with_limit
|
67
|
-
users = create_users
|
68
|
-
add_users(users)
|
69
|
-
results = []
|
70
|
-
users.open_cursor(:limit => 20) do |cursor|
|
71
|
-
cursor.each do |record|
|
72
|
-
results << record["name"]
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
assert_equal((100...120).collect {|i| "user#{i}"},
|
77
|
-
results)
|
78
|
-
end
|
79
|
-
|
80
|
-
def test_with_offset
|
81
|
-
users = create_users
|
82
|
-
add_users(users)
|
83
|
-
results = []
|
84
|
-
users.open_cursor(:offset => 20) do |cursor|
|
85
|
-
cursor.each do |record|
|
86
|
-
results << record["name"]
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
assert_equal((120...200).collect {|i| "user#{i}"},
|
91
|
-
results)
|
92
|
-
end
|
93
|
-
|
94
|
-
def test_with_limit_and_offset
|
95
|
-
users = create_users
|
96
|
-
add_users(users)
|
97
|
-
results = []
|
98
|
-
users.open_cursor(:limit => 20, :offset => 20) do |cursor|
|
99
|
-
cursor.each do |record|
|
100
|
-
results << record["name"]
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
|
-
assert_equal((120...140).collect {|i| "user#{i}"},
|
105
|
-
results)
|
106
|
-
end
|
107
|
-
|
108
|
-
def test_delete
|
109
|
-
users = create_users
|
110
|
-
add_users(users)
|
111
|
-
|
112
|
-
users.open_cursor(:limit => 20) do |cursor|
|
113
|
-
20.times do
|
114
|
-
cursor.next
|
115
|
-
cursor.delete
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
results = []
|
120
|
-
users.open_cursor do |cursor|
|
121
|
-
cursor.each do |record|
|
122
|
-
results << record["name"]
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
assert_equal((120...200).collect {|i| "user#{i}"},
|
127
|
-
results)
|
128
|
-
end
|
129
|
-
|
130
|
-
def test_patricia_trie_cursor_key
|
131
|
-
sites = Groonga::PatriciaTrie.create(:name => "Sites")
|
132
|
-
sites.add("http://groonga.org/")
|
133
|
-
sites.open_cursor do |cursor|
|
134
|
-
cursor.next
|
135
|
-
assert_equal("http://groonga.org/", cursor.key)
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
def test_order_by_id
|
140
|
-
sites = Groonga::PatriciaTrie.create(:name => "Sites")
|
141
|
-
sites.add("http://qwik.jp/senna/")
|
142
|
-
sites.add("http://www.ruby-lang.org/")
|
143
|
-
sites.add("http://groonga.org/")
|
144
|
-
keys = []
|
145
|
-
sites.open_cursor(:order_by => :id) do |cursor|
|
146
|
-
while cursor.next
|
147
|
-
keys << cursor.key
|
148
|
-
end
|
149
|
-
end
|
150
|
-
assert_equal(["http://qwik.jp/senna/",
|
151
|
-
"http://www.ruby-lang.org/",
|
152
|
-
"http://groonga.org/"],
|
153
|
-
keys)
|
154
|
-
end
|
155
|
-
|
156
|
-
def test_order_by_key
|
157
|
-
sites = Groonga::PatriciaTrie.create(:name => "Sites")
|
158
|
-
sites.add("http://www.ruby-lang.org/")
|
159
|
-
sites.add("http://qwik.jp/senna/")
|
160
|
-
sites.add("http://groonga.org/")
|
161
|
-
keys = []
|
162
|
-
sites.open_cursor(:order_by => :key) do |cursor|
|
163
|
-
while cursor.next
|
164
|
-
keys << cursor.key
|
165
|
-
end
|
166
|
-
end
|
167
|
-
assert_equal(["http://groonga.org/",
|
168
|
-
"http://qwik.jp/senna/",
|
169
|
-
"http://www.ruby-lang.org/"],
|
170
|
-
keys)
|
171
|
-
end
|
172
|
-
|
173
|
-
private
|
174
|
-
def create_users
|
175
|
-
users = Groonga::Array.create(:name => "Users")
|
176
|
-
users.define_column("name", "ShortText")
|
177
|
-
users
|
178
|
-
end
|
179
|
-
|
180
|
-
def add_users(users)
|
181
|
-
(0...100).to_a.each do |i|
|
182
|
-
user = users.add
|
183
|
-
user["name"] = "user#{i + 100}"
|
184
|
-
end
|
185
|
-
users
|
186
|
-
end
|
187
|
-
end
|
data/test/test-table-dumper.rb
DELETED
@@ -1,83 +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 TableDumperTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
setup :setup_database, :before => :append
|
20
|
-
|
21
|
-
def setup
|
22
|
-
setup_tables
|
23
|
-
end
|
24
|
-
|
25
|
-
def setup_tables
|
26
|
-
Groonga::Schema.define do |schema|
|
27
|
-
schema.create_table("Users",
|
28
|
-
:type => :hash,
|
29
|
-
:key_type => "ShortText") do |table|
|
30
|
-
table.text("name")
|
31
|
-
end
|
32
|
-
|
33
|
-
schema.create_table("Posts") do |table|
|
34
|
-
table.text("title")
|
35
|
-
table.reference("author", "Users")
|
36
|
-
table.integer("rank")
|
37
|
-
table.unsigned_integer("n_goods")
|
38
|
-
table.text("tags", :type => :vector)
|
39
|
-
table.boolean("published")
|
40
|
-
table.time("created_at")
|
41
|
-
end
|
42
|
-
|
43
|
-
schema.change_table("Users") do |table|
|
44
|
-
table.index("Posts.author")
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_empty
|
50
|
-
assert_equal(<<-EOS, dump("Posts"))
|
51
|
-
load --table Posts
|
52
|
-
[
|
53
|
-
["_id","author","created_at","n_goods","published","rank","tags","title"]
|
54
|
-
]
|
55
|
-
EOS
|
56
|
-
end
|
57
|
-
|
58
|
-
def test_with_records
|
59
|
-
posts.add(:author => "mori",
|
60
|
-
:created_at => Time.parse("2010-03-08 16:52 JST"),
|
61
|
-
:n_goods => 4,
|
62
|
-
:published => true,
|
63
|
-
:rank => 10,
|
64
|
-
:tags => ["search", "mori"],
|
65
|
-
:title => "Why search engine find?")
|
66
|
-
assert_equal(<<-EOS, dump("Posts"))
|
67
|
-
load --table Posts
|
68
|
-
[
|
69
|
-
["_id","author","created_at","n_goods","published","rank","tags","title"],
|
70
|
-
[1,"mori",1268034720.0,4,true,10,["search","mori"],"Why search engine find?"]
|
71
|
-
]
|
72
|
-
EOS
|
73
|
-
end
|
74
|
-
|
75
|
-
private
|
76
|
-
def dump(table_name)
|
77
|
-
Groonga::TableDumper.new(context[table_name]).dump
|
78
|
-
end
|
79
|
-
|
80
|
-
def posts
|
81
|
-
context["Posts"]
|
82
|
-
end
|
83
|
-
end
|
@@ -1,100 +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
|
-
module TestOffsetAndLimitSupport
|
17
|
-
def test_zero_and_positive_offset
|
18
|
-
assert_equal(((100 + 0)...200).to_a, ids(:offset => 0))
|
19
|
-
assert_equal(((100 + 32)...200).to_a, ids(:offset => 32))
|
20
|
-
assert_equal(((100 + 99)...200).to_a, ids(:offset => 99))
|
21
|
-
assert_raise(Groonga::TooLargeOffset) do
|
22
|
-
ids(:offset => 100)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_negative_offset
|
27
|
-
assert_equal(((200 - 1)...200).to_a, ids(:offset => -1))
|
28
|
-
assert_equal(((200 - 32)...200).to_a, ids(:offset => -32))
|
29
|
-
assert_equal(((200 - 100)...200).to_a, ids(:offset => -100))
|
30
|
-
assert_raise(Groonga::TooSmallOffset) do
|
31
|
-
ids(:offset => -101)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_zero_and_positive_limit
|
36
|
-
all_ids = (100...200).to_a
|
37
|
-
assert_equal(all_ids[0, 0], ids(:limit => 0))
|
38
|
-
assert_equal(all_ids[0, 32], ids(:limit => 32))
|
39
|
-
assert_equal(all_ids[0, 100], ids(:limit => 100))
|
40
|
-
assert_nothing_raised do
|
41
|
-
ids(:limit => 101)
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_negative_limit
|
46
|
-
all_ids = (100...200).to_a
|
47
|
-
assert_equal(all_ids[0..-1], ids(:limit => -1))
|
48
|
-
assert_equal(all_ids[0..-32], ids(:limit => -32))
|
49
|
-
assert_equal(all_ids[0..-100], ids(:limit => -100))
|
50
|
-
assert_equal([], ids(:limit => -101))
|
51
|
-
end
|
52
|
-
|
53
|
-
private
|
54
|
-
def create_bookmarks
|
55
|
-
@bookmarks = Groonga::Array.create(:name => "Bookmarks")
|
56
|
-
@bookmarks.define_column("id", "Int32")
|
57
|
-
@bookmarks
|
58
|
-
end
|
59
|
-
|
60
|
-
def add_ids
|
61
|
-
100.times do |i|
|
62
|
-
bookmark = @bookmarks.add
|
63
|
-
bookmark["id"] = i + 100
|
64
|
-
end
|
65
|
-
@bookmarks
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
class TestOffsetAndLimit < Test::Unit::TestCase
|
70
|
-
include GroongaTestUtils
|
71
|
-
def setup
|
72
|
-
setup_database
|
73
|
-
@bookmarks = create_bookmarks
|
74
|
-
add_ids
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
class TestTableCursorOffsetAndLimit < TestOffsetAndLimit
|
79
|
-
include TestOffsetAndLimitSupport
|
80
|
-
|
81
|
-
private
|
82
|
-
def ids(options={})
|
83
|
-
@bookmarks.open_cursor(options) do |cursor|
|
84
|
-
cursor.collect do |record|
|
85
|
-
record["id"]
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
class TestTableSortOffsetAndLimit < TestOffsetAndLimit
|
92
|
-
include TestOffsetAndLimitSupport
|
93
|
-
|
94
|
-
private
|
95
|
-
def ids(options={})
|
96
|
-
@bookmarks.sort([:key => "id", :order => :asc], options).collect do |record|
|
97
|
-
record["id"]
|
98
|
-
end
|
99
|
-
end
|
100
|
-
end
|
@@ -1,80 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
#
|
3
|
-
# Copyright (C) 2010 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 TableSelectMecabTest < Test::Unit::TestCase
|
19
|
-
include GroongaTestUtils
|
20
|
-
|
21
|
-
setup :setup_database
|
22
|
-
|
23
|
-
setup
|
24
|
-
def check_mecab_availability
|
25
|
-
omit("MeCab isn't available") if context["TokenMecab"].nil?
|
26
|
-
end
|
27
|
-
|
28
|
-
setup
|
29
|
-
def setup_tables
|
30
|
-
Groonga::Schema.define do |schema|
|
31
|
-
schema.create_table("Users", :key_type => "ShortText") do |table|
|
32
|
-
end
|
33
|
-
|
34
|
-
schema.create_table("Comments", :type => :array) do |table|
|
35
|
-
table.short_text("title")
|
36
|
-
table.text("content")
|
37
|
-
table.time("created_at")
|
38
|
-
table.reference("user", "Users")
|
39
|
-
end
|
40
|
-
|
41
|
-
schema.create_table("Terms",
|
42
|
-
:type => :patricia_trie,
|
43
|
-
:default_tokenizer => "TokenMecab") do |table|
|
44
|
-
table.index("Comments.title", :with_section => true)
|
45
|
-
table.index("Comments.content", :with_section => true)
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
setup
|
51
|
-
def setup_comments
|
52
|
-
@comments = context["Comments"]
|
53
|
-
@hello = @comments.add(:title => "Hello",
|
54
|
-
:content => "Hello Good-bye!",
|
55
|
-
:created_at => Time.parse("2009-08-09"),
|
56
|
-
:user => "morita")
|
57
|
-
@hello_only_in_content =
|
58
|
-
@comments.add(:title => "(no title)",
|
59
|
-
:content => "Hello! Hello! Hello!",
|
60
|
-
:created_at => Time.parse("2009-07-09"))
|
61
|
-
@test = @comments.add(:title => "title",
|
62
|
-
:content => "test",
|
63
|
-
:created_at => Time.parse("2009-06-09"),
|
64
|
-
:user => "gunyara-kun")
|
65
|
-
@japanese =
|
66
|
-
@comments.add(:title => "日本語",
|
67
|
-
:content => "うちのボロTVはまだ現役です",
|
68
|
-
:created_at => Time.parse("2009-06-09"),
|
69
|
-
:user => "darashi")
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_match
|
73
|
-
result = @comments.select do |record|
|
74
|
-
record.content =~ "ボロ"
|
75
|
-
end
|
76
|
-
assert_equal_select_result(["日本語"], result) do |record|
|
77
|
-
record.title
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
3
|
-
# Copyright (C) 2009 SHIDARA Yoji <dara@shidara.net>
|
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 TableSelectNormalizeTest < Test::Unit::TestCase
|
19
|
-
include GroongaTestUtils
|
20
|
-
|
21
|
-
setup :setup_database
|
22
|
-
|
23
|
-
setup
|
24
|
-
def setup_comments
|
25
|
-
@comments = Groonga::Array.create(:name => "Comments")
|
26
|
-
@comments.define_column("content", "Text")
|
27
|
-
@comments.define_column("created_at", "Time")
|
28
|
-
options = {
|
29
|
-
:name => "Terms",
|
30
|
-
:default_tokenizer => "TokenBigramSplitSymbol",
|
31
|
-
:key_normalize => true,
|
32
|
-
}
|
33
|
-
terms = Groonga::PatriciaTrie.create(options)
|
34
|
-
terms.define_index_column("comment_content", @comments,
|
35
|
-
:with_section => true,
|
36
|
-
:with_position => true,
|
37
|
-
:source => "Comments.content")
|
38
|
-
@japanese_comment =
|
39
|
-
@comments.add(:content => "うちのボロTV(アナログ...)はまだ現役です",
|
40
|
-
:created_at => Time.parse("2009-06-09"))
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_select_query_with_japanese
|
44
|
-
result = @comments.select("content:@ボロTV")
|
45
|
-
assert_equal_select_result([@japanese_comment], result)
|
46
|
-
end
|
47
|
-
|
48
|
-
def test_select_query_with_japanese_parenthesis
|
49
|
-
result = @comments.select("content:@)は")
|
50
|
-
assert_equal_select_result([@japanese_comment], result)
|
51
|
-
end
|
52
|
-
|
53
|
-
def test_select_query_only_in_japanese
|
54
|
-
result = @comments.select("content:@うちの")
|
55
|
-
assert_equal_select_result([@japanese_comment], result)
|
56
|
-
end
|
57
|
-
end
|