rroonga 1.3.0-x86-mingw32 → 1.3.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +33 -2
- data/benchmark/common.rb +2 -2
- data/benchmark/read-write-many-small-items.rb +71 -62
- data/benchmark/write-many-small-items.rb +61 -53
- data/ext/groonga/rb-grn-context.c +23 -5
- data/ext/groonga/rb-grn-index-column.c +2 -6
- data/ext/groonga/rb-grn-operator.c +31 -1
- data/ext/groonga/rb-grn-variable-size-column.c +77 -1
- data/ext/groonga/rb-grn.h +2 -11
- data/ext/groonga/rb-groonga.c +1 -2
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/command.rb +169 -0
- data/lib/groonga/context.rb +4 -124
- data/lib/groonga/dumper.rb +10 -8
- data/lib/groonga/record.rb +7 -0
- data/lib/groonga/schema.rb +98 -7
- data/rroonga-build.rb +3 -3
- data/test/{test-context-select.rb → test-command-select.rb} +3 -3
- data/test/test-record.rb +18 -1
- data/test/test-schema-dumper.rb +48 -0
- data/test/test-schema-type.rb +35 -0
- data/test/test-schema.rb +81 -11
- data/test/test-table-select.rb +49 -38
- data/test/test-variable-size-column.rb +30 -0
- data/vendor/local/bin/grntest.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga/plugin.h +3 -2
- data/vendor/local/include/groonga/groonga.h +106 -78
- 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/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +5 -2
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +4 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +102 -27
- data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +130 -21
- data/vendor/local/share/doc/groonga/en/html/_sources/output.txt +164 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +13 -1
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +5 -5
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +11 -7
- data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +60 -52
- data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +38 -35
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/community.html +14 -12
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution.html +15 -13
- data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/expr.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +71 -36
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +53 -33
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/index.html +92 -87
- data/vendor/local/share/doc/groonga/en/html/install.html +109 -40
- data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -19
- data/vendor/local/share/doc/groonga/en/html/log.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news.html +233 -112
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +302 -0
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/reference.html +59 -55
- data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/spec.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest.html +7 -12
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +124 -164
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +11 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/type.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +4 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +102 -27
- data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +130 -21
- data/vendor/local/share/doc/groonga/ja/html/_sources/output.txt +164 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +13 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +11 -7
- data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +55 -47
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +38 -35
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands.html +41 -41
- data/vendor/local/share/doc/groonga/ja/html/community.html +10 -8
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/expr.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +71 -36
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +53 -33
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/index.html +84 -79
- data/vendor/local/share/doc/groonga/ja/html/install.html +92 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/log.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news.html +202 -99
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +287 -0
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/reference.html +59 -55
- data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +7 -11
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +93 -115
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/type.html +31 -31
- data/vendor/local/share/doc/groonga/source/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/source/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/source/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/source/community.txt +4 -3
- data/vendor/local/share/doc/groonga/source/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +8 -8
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +4 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +4 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +3 -15
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +2 -7
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -7
- data/vendor/local/share/doc/groonga/source/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/source/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/source/index.txt +2 -2
- data/vendor/local/share/doc/groonga/source/install.txt +102 -27
- data/vendor/local/share/doc/groonga/source/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/source/news.txt +130 -21
- data/vendor/local/share/doc/groonga/source/output.txt +164 -0
- data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/source/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/source/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/source/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/source/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/source/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/source/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/source/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/source/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/source/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/source/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/source/type.txt +3 -3
- data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +1 -0
- data/vendor/local/share/groonga/html/admin/index.html +40 -0
- data/vendor/local/share/groonga/html/admin/js/jquery.flot-0.7.min.js +6 -0
- data/vendor/local/share/groonga/html/admin/js/jquery.flot.license.txt +22 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +560 -138
- data/vendor/local/share/man/man1/groonga.1 +637 -223
- metadata +887 -898
- data/ext/groonga/Makefile +0 -184
- data/ext/groonga/rb-grn-query.c +0 -260
- data/test/test-query.rb +0 -22
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8; mode: ruby -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -168,7 +168,38 @@ relative_binary_dir = File.join("vendor", "local")
|
|
168
168
|
vendor_dir = File.join(base_dir, relative_vendor_dir)
|
169
169
|
binary_dir = File.join(base_dir, relative_binary_dir)
|
170
170
|
|
171
|
-
groonga_win32_i386_p = ENV["
|
171
|
+
groonga_win32_i386_p = ENV["GROONGA64"] != "yes"
|
172
|
+
|
173
|
+
namespace :win32 do
|
174
|
+
namespace :groonga do
|
175
|
+
task :download do
|
176
|
+
require "open-uri"
|
177
|
+
require "rroonga-build"
|
178
|
+
groonga_version = RroongaBuild::RequiredGroongaVersion::VERSION.join(".")
|
179
|
+
base_name = "groonga-#{groonga_version}-"
|
180
|
+
if groonga_win32_i386_p
|
181
|
+
base_name << "x86"
|
182
|
+
else
|
183
|
+
base_name << "x64"
|
184
|
+
end
|
185
|
+
base_name << ".zip"
|
186
|
+
base_url = "http://packages.groonga.org/windows/groonga/"
|
187
|
+
Dir.chdir(base_dir) do
|
188
|
+
unless File.exist?(base_name)
|
189
|
+
open("#{base_url}#{base_name}", "rb") do |zip|
|
190
|
+
File.open(base_name, "wb") do |output|
|
191
|
+
output.print(zip.read)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
sh("unzip", base_name)
|
196
|
+
rm_rf(relative_binary_dir)
|
197
|
+
mkdir_p(File.dirname(relative_binary_dir))
|
198
|
+
mv(File.basename(base_name, ".*"), relative_binary_dir)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
172
203
|
|
173
204
|
Rake::ExtensionTask.new("groonga", spec) do |ext|
|
174
205
|
if groonga_win32_i386_p
|
data/benchmark/common.rb
CHANGED
@@ -35,7 +35,7 @@ def report(index=0)
|
|
35
35
|
end
|
36
36
|
|
37
37
|
if index.zero?
|
38
|
-
puts(" " * (width - 1) + Benchmark::Tms::CAPTION.rstrip + "memory".rjust(
|
38
|
+
puts(" " * (width - 1) + Benchmark::Tms::CAPTION.rstrip + "memory".rjust(11))
|
39
39
|
end
|
40
40
|
# GC.disable
|
41
41
|
before = memory_usage
|
@@ -44,6 +44,6 @@ def report(index=0)
|
|
44
44
|
GC.start
|
45
45
|
size = memory_usage - before
|
46
46
|
|
47
|
-
formatted_size = "%
|
47
|
+
formatted_size = "%7.3f" % size
|
48
48
|
puts "#{label.ljust(width)} #{result.to_s.strip} #{formatted_size}MB"
|
49
49
|
end
|
@@ -3,32 +3,31 @@
|
|
3
3
|
# This benchmark is based on Tokyo Cabinet's benchmark at
|
4
4
|
# http://alpha.mixi.co.jp/blog/?p=791
|
5
5
|
#
|
6
|
-
# On my environment at
|
7
|
-
# % for x in {0..
|
8
|
-
#
|
9
|
-
# Hash
|
10
|
-
# groonga: Hash
|
11
|
-
# groonga:
|
12
|
-
# groonga:
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# TC:
|
16
|
-
# TC:
|
17
|
-
# TC:
|
18
|
-
# TC: Tree: file 1.290000 0.180000 1.470000 ( 1.476853) 12.805MB
|
6
|
+
# On my environment at 2012/01/25:
|
7
|
+
# % for x in {0..8}; do ruby1.9.1 benchmark/read-write-many-small-items.rb $x; done
|
8
|
+
# user system total real memory
|
9
|
+
# Hash 0.410000 0.000000 0.410000 ( 0.412228) 44.895MB
|
10
|
+
# groonga: Hash 0.910000 0.030000 0.940000 ( 0.938278) 38.863MB
|
11
|
+
# groonga: PatriciaTrie 1.050000 0.020000 1.070000 ( 1.076237) 34.832MB
|
12
|
+
# groonga: DoubleArrayTrie 1.050000 0.040000 1.090000 ( 1.083912) 34.852MB
|
13
|
+
# Localmemcache: file 0.610000 0.040000 0.650000 ( 0.641539) 61.441MB
|
14
|
+
# TC: Hash: memory 0.470000 0.010000 0.480000 ( 0.477577) 55.910MB
|
15
|
+
# TC: Tree: memory 0.430000 0.010000 0.440000 ( 0.441939) 44.484MB
|
16
|
+
# TC: Hash: file 0.980000 0.990000 1.970000 ( 1.971581) 17.684MB
|
17
|
+
# TC: Tree: file 0.650000 0.030000 0.680000 ( 0.683004) 19.801MB
|
19
18
|
#
|
20
|
-
# CPU: Intel(R) Core(TM)
|
21
|
-
# Memory:
|
22
|
-
# Ruby: Debian GNU/Linux sid at
|
23
|
-
# ruby 1.
|
24
|
-
# groonga: HEAD at
|
25
|
-
#
|
26
|
-
# Localmemcache:
|
27
|
-
# Tokyo Cabinet: 1.4.
|
28
|
-
# Tokyo Cabinet Ruby: 1.
|
19
|
+
# CPU: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz stepping 05
|
20
|
+
# Memory: 8GB
|
21
|
+
# Ruby: Debian GNU/Linux sid at 2012/01/25:
|
22
|
+
# ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
|
23
|
+
# groonga: HEAD at 2012/01/25: 07dce043cc8cfbbecbcdc43bf7c6d5c2d085237a
|
24
|
+
# rroonga: master at 2012/01/25: 29099bff93377733d81dc2398c3403e1293301dc
|
25
|
+
# Localmemcache: 0.4.4
|
26
|
+
# Tokyo Cabinet: 1.4.37
|
27
|
+
# Tokyo Cabinet Ruby: 1.31
|
29
28
|
#
|
30
29
|
# NOTE:
|
31
|
-
# * groonga, Localmemcache and Tokyo Cabinet are built with "-
|
30
|
+
# * groonga, Localmemcache and Tokyo Cabinet are built with "-O2" option.
|
32
31
|
# * Ruby bindings of them are built with "-O2" option.
|
33
32
|
|
34
33
|
require File.join(File.dirname(__FILE__), "common.rb")
|
@@ -40,44 +39,54 @@ n.times do |i|
|
|
40
39
|
values << "%08d" % i
|
41
40
|
end
|
42
41
|
|
42
|
+
ruby_hash = {}
|
43
43
|
item("Hash") do
|
44
|
-
@hash = {}
|
45
44
|
values.each do |value|
|
46
|
-
|
47
|
-
|
45
|
+
ruby_hash[value] = value
|
46
|
+
ruby_hash[value]
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
51
50
|
begin
|
52
51
|
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
53
|
-
$LOAD_PATH.unshift(File.join(base_dir, "ext"))
|
52
|
+
$LOAD_PATH.unshift(File.join(base_dir, "ext", "groonga"))
|
54
53
|
$LOAD_PATH.unshift(File.join(base_dir, "lib"))
|
55
54
|
|
56
55
|
require 'groonga'
|
57
56
|
tmp_dir = "/tmp/groonga"
|
58
57
|
FileUtils.rm_rf(tmp_dir)
|
59
58
|
FileUtils.mkdir(tmp_dir)
|
59
|
+
Groonga::Context.default.encoding = :none
|
60
60
|
@database = Groonga::Database.create(:path => "#{tmp_dir}/db")
|
61
|
+
column_name = "value"
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
@column = @hash.define_column(column_name, "ShortText")
|
63
|
+
groonga_hash = Groonga::Hash.create(:name => "Hash",
|
64
|
+
:key_type => "ShortText")
|
65
|
+
groonga_hash.define_column(column_name, "ShortText")
|
66
|
+
item("groonga: Hash") do
|
67
67
|
values.each do |value|
|
68
|
-
|
69
|
-
|
68
|
+
groonga_hash.set_column_value(value, column_name, value)
|
69
|
+
groonga_hash.column_value(value, column_name)
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
@column = @trie.define_column(column_name, "ShortText")
|
73
|
+
patricia_trie = Groonga::PatriciaTrie.create(:name => "PatriciaTrie",
|
74
|
+
:key_type => "ShortText")
|
75
|
+
patricia_trie.define_column(column_name, "ShortText")
|
76
|
+
item("groonga: PatriciaTrie") do
|
78
77
|
values.each do |value|
|
79
|
-
|
80
|
-
|
78
|
+
patricia_trie.set_column_value(value, column_name, value)
|
79
|
+
patricia_trie.column_value(value, column_name)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
double_array_trie = Groonga::DoubleArrayTrie.create(:name => "DoubleArrayTrie",
|
84
|
+
:key_type => "ShortText")
|
85
|
+
double_array_trie.define_column(column_name, "ShortText")
|
86
|
+
item("groonga: DoubleArrayTrie") do
|
87
|
+
values.each do |value|
|
88
|
+
patricia_trie.set_column_value(value, column_name, value)
|
89
|
+
patricia_trie.column_value(value, column_name)
|
81
90
|
end
|
82
91
|
end
|
83
92
|
rescue LoadError
|
@@ -86,13 +95,13 @@ end
|
|
86
95
|
begin
|
87
96
|
require 'localmemcache'
|
88
97
|
|
98
|
+
LocalMemCache.drop(:namespace => "read-write-many-small-items",
|
99
|
+
:force => true)
|
100
|
+
mem_cache = LocalMemCache.new(:namespace => "read-write-many-small-items")
|
89
101
|
item("Localmemcache: file") do
|
90
|
-
LocalMemCache.drop(:namespace => "read-write-many-small-items",
|
91
|
-
:force => true)
|
92
|
-
@db = LocalMemCache.new(:namespace => "read-write-many-small-items")
|
93
102
|
values.each do |value|
|
94
|
-
|
95
|
-
|
103
|
+
mem_cache[value] = value
|
104
|
+
mem_cache[value]
|
96
105
|
end
|
97
106
|
end
|
98
107
|
rescue LoadError
|
@@ -101,41 +110,41 @@ end
|
|
101
110
|
begin
|
102
111
|
require 'tokyocabinet'
|
103
112
|
|
113
|
+
tc_hash_memory = TokyoCabinet::ADB::new
|
114
|
+
tc_hash_memory.open("*#bnum=#{n}#mode=wct#xmsiz=0")
|
104
115
|
item("TC: Hash: memory") do
|
105
|
-
@db = TokyoCabinet::ADB::new
|
106
|
-
@db.open("*#bnum=#{n}#mode=wct#xmsiz=0")
|
107
116
|
values.each do |value|
|
108
|
-
|
109
|
-
|
117
|
+
tc_hash_memory.put(value, value)
|
118
|
+
tc_hash_memory.get(value)
|
110
119
|
end
|
111
120
|
end
|
112
121
|
|
122
|
+
tc_tree_memory = TokyoCabinet::ADB::new
|
123
|
+
tc_tree_memory.open("+#bnum=#{n}#mode=wct#xmsiz=0")
|
113
124
|
item("TC: Tree: memory") do
|
114
|
-
@db = TokyoCabinet::ADB::new
|
115
|
-
@db.open("+#bnum=#{n}#mode=wct#xmsiz=0")
|
116
125
|
values.each do |value|
|
117
|
-
|
118
|
-
|
126
|
+
tc_tree_memory.put(value, value)
|
127
|
+
tc_tree_memory.get(value)
|
119
128
|
end
|
120
129
|
end
|
121
130
|
|
122
131
|
hash_file = Tempfile.new(["tc-hash", ".tch"])
|
132
|
+
tc_hash_file = TokyoCabinet::ADB::new
|
133
|
+
tc_hash_file.open("#{hash_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
123
134
|
item("TC: Hash: file") do
|
124
|
-
@db = TokyoCabinet::ADB::new
|
125
|
-
@db.open("#{hash_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
126
135
|
values.each do |value|
|
127
|
-
|
128
|
-
|
136
|
+
tc_hash_file.put(value, value)
|
137
|
+
tc_hash_file.get(value)
|
129
138
|
end
|
130
139
|
end
|
131
140
|
|
132
141
|
tree_file = Tempfile.new(["tc-tree", ".tcb"])
|
142
|
+
tc_tree_file = TokyoCabinet::ADB::new
|
143
|
+
tc_tree_file.open("#{tree_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
133
144
|
item("TC: Tree: file") do
|
134
|
-
@db = TokyoCabinet::ADB::new
|
135
|
-
@db.open("#{tree_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
136
145
|
values.each do |value|
|
137
|
-
|
138
|
-
|
146
|
+
tc_tree_file.put(value, value)
|
147
|
+
tc_tree_file.get(value)
|
139
148
|
end
|
140
149
|
end
|
141
150
|
rescue LoadError
|
@@ -3,32 +3,31 @@
|
|
3
3
|
# This benchmark is based on Tokyo Cabinet's benchmark at
|
4
4
|
# http://alpha.mixi.co.jp/blog/?p=791
|
5
5
|
#
|
6
|
-
# On my environment at
|
7
|
-
# % for x in {0..
|
8
|
-
#
|
9
|
-
# Hash
|
10
|
-
# groonga: Hash
|
11
|
-
# groonga:
|
12
|
-
# groonga:
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# TC:
|
16
|
-
# TC:
|
17
|
-
# TC:
|
18
|
-
# TC: Tree: file 0.720000 0.130000 0.850000 ( 0.877557) 6.102MB
|
6
|
+
# On my environment at 2012/01/25:
|
7
|
+
# % for x in {0..8}; do ruby1.9.1 benchmark/write-many-small-items.rb $x; done
|
8
|
+
# user system total real memory
|
9
|
+
# Hash 0.320000 0.030000 0.350000 ( 0.345441) 44.910MB
|
10
|
+
# groonga: Hash 0.490000 0.020000 0.510000 ( 0.512336) 23.305MB
|
11
|
+
# groonga: PatriciaTrie 0.560000 0.010000 0.570000 ( 0.572077) 19.242MB
|
12
|
+
# groonga: DoubleArrayTrie 0.700000 0.020000 0.720000 ( 0.730448) 39.789MB
|
13
|
+
# Localmemcache: file 0.510000 0.040000 0.550000 ( 0.549663) 45.898MB
|
14
|
+
# TC: Hash: memory 0.270000 0.020000 0.290000 ( 0.292051) 40.148MB
|
15
|
+
# TC: Tree: memory 0.220000 0.010000 0.230000 ( 0.229233) 28.727MB
|
16
|
+
# TC: Hash: file 0.610000 0.630000 1.240000 ( 1.247094) 2.129MB
|
17
|
+
# TC: Tree: file 0.340000 0.040000 0.380000 ( 0.377910) 4.000MB
|
19
18
|
#
|
20
|
-
# CPU: Intel(R) Core(TM)
|
21
|
-
# Memory:
|
22
|
-
# Ruby: Debian GNU/Linux sid at
|
23
|
-
# ruby 1.
|
24
|
-
# groonga: HEAD at
|
25
|
-
#
|
26
|
-
# Localmemcache:
|
27
|
-
# Tokyo Cabinet: 1.4.
|
28
|
-
# Tokyo Cabinet Ruby: 1.
|
19
|
+
# CPU: Intel(R) Core(TM) i7 CPU 860 @ 2.80GHz stepping 05
|
20
|
+
# Memory: 8GB
|
21
|
+
# Ruby: Debian GNU/Linux sid at 2012/01/25:
|
22
|
+
# ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
|
23
|
+
# groonga: HEAD at 2012/01/25: 07dce043cc8cfbbecbcdc43bf7c6d5c2d085237a
|
24
|
+
# rroonga: master at 2012/01/25: 29099bff93377733d81dc2398c3403e1293301dc
|
25
|
+
# Localmemcache: 0.4.4
|
26
|
+
# Tokyo Cabinet: 1.4.37
|
27
|
+
# Tokyo Cabinet Ruby: 1.31
|
29
28
|
#
|
30
29
|
# NOTE:
|
31
|
-
# * groonga, Localmemcache and Tokyo Cabinet are built with "-
|
30
|
+
# * groonga, Localmemcache and Tokyo Cabinet are built with "-O2" option.
|
32
31
|
# * Ruby bindings of them are built with "-O2" option.
|
33
32
|
|
34
33
|
require File.join(File.dirname(__FILE__), "common.rb")
|
@@ -40,41 +39,50 @@ n.times do |i|
|
|
40
39
|
values << "%08d" % i
|
41
40
|
end
|
42
41
|
|
42
|
+
ruby_hash = {}
|
43
43
|
item("Hash") do
|
44
|
-
@hash = {}
|
45
44
|
values.each do |value|
|
46
|
-
|
45
|
+
ruby_hash[value] = value
|
47
46
|
end
|
48
47
|
end
|
49
48
|
|
50
49
|
begin
|
51
50
|
base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
52
|
-
$LOAD_PATH.unshift(File.join(base_dir, "ext"))
|
51
|
+
$LOAD_PATH.unshift(File.join(base_dir, "ext", "groonga"))
|
53
52
|
$LOAD_PATH.unshift(File.join(base_dir, "lib"))
|
54
53
|
|
55
54
|
require 'groonga'
|
56
55
|
tmp_dir = "/tmp/groonga"
|
57
56
|
FileUtils.rm_rf(tmp_dir)
|
58
57
|
FileUtils.mkdir(tmp_dir)
|
58
|
+
Groonga::Context.default.encoding = :none
|
59
59
|
@database = Groonga::Database.create(:path => "#{tmp_dir}/db")
|
60
|
+
column_name = "value"
|
60
61
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
@column = @hash.define_column(column_name, "ShortText")
|
62
|
+
groonga_hash = Groonga::Hash.create(:name => "Hash",
|
63
|
+
:key_type => "ShortText")
|
64
|
+
groonga_hash.define_column(column_name, "ShortText")
|
65
|
+
item("groonga: Hash") do
|
66
66
|
values.each do |value|
|
67
|
-
|
67
|
+
groonga_hash.set_column_value(value, column_name, value)
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
@column = @trie.define_column(column_name, "ShortText")
|
71
|
+
patricia_trie = Groonga::PatriciaTrie.create(:name => "PatriciaTrie",
|
72
|
+
:key_type => "ShortText")
|
73
|
+
patricia_trie.define_column(column_name, "ShortText")
|
74
|
+
item("groonga: PatriciaTrie") do
|
76
75
|
values.each do |value|
|
77
|
-
|
76
|
+
patricia_trie.set_column_value(value, column_name, value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
double_array_trie = Groonga::DoubleArrayTrie.create(:name => "DoubleArrayTrie",
|
81
|
+
:key_type => "ShortText")
|
82
|
+
double_array_trie.define_column(column_name, "ShortText")
|
83
|
+
item("groonga: DoubleArrayTrie") do
|
84
|
+
values.each do |value|
|
85
|
+
double_array_trie.set_column_value(value, column_name, value)
|
78
86
|
end
|
79
87
|
end
|
80
88
|
rescue LoadError
|
@@ -83,11 +91,11 @@ end
|
|
83
91
|
begin
|
84
92
|
require 'localmemcache'
|
85
93
|
|
94
|
+
LocalMemCache.drop(:namespace => "write-many-small-items", :force => true)
|
95
|
+
mem_cache = LocalMemCache.new(:namespace => "write-many-small-items")
|
86
96
|
item("Localmemcache: file") do
|
87
|
-
LocalMemCache.drop(:namespace => "write-many-small-items", :force => true)
|
88
|
-
@db = LocalMemCache.new(:namespace => "write-many-small-items")
|
89
97
|
values.each do |value|
|
90
|
-
|
98
|
+
mem_cache[value] = value
|
91
99
|
end
|
92
100
|
end
|
93
101
|
rescue LoadError
|
@@ -96,37 +104,37 @@ end
|
|
96
104
|
begin
|
97
105
|
require 'tokyocabinet'
|
98
106
|
|
107
|
+
tc_hash_memory = TokyoCabinet::ADB::new
|
108
|
+
tc_hash_memory.open("*#bnum=#{n}#mode=wct#xmsiz=0")
|
99
109
|
item("TC: Hash: memory") do
|
100
|
-
@db = TokyoCabinet::ADB::new
|
101
|
-
@db.open("*#bnum=#{n}#mode=wct#xmsiz=0")
|
102
110
|
values.each do |value|
|
103
|
-
|
111
|
+
tc_hash_memory.put(value, value)
|
104
112
|
end
|
105
113
|
end
|
106
114
|
|
115
|
+
tc_tree_memory = TokyoCabinet::ADB::new
|
116
|
+
tc_tree_memory.open("+#bnum=#{n}#mode=wct#xmsiz=0")
|
107
117
|
item("TC: Tree: memory") do
|
108
|
-
@db = TokyoCabinet::ADB::new
|
109
|
-
@db.open("+#bnum=#{n}#mode=wct#xmsiz=0")
|
110
118
|
values.each do |value|
|
111
|
-
|
119
|
+
tc_tree_memory.put(value, value)
|
112
120
|
end
|
113
121
|
end
|
114
122
|
|
115
123
|
hash_file = Tempfile.new(["tc-hash", ".tch"])
|
124
|
+
tc_hash_file = TokyoCabinet::ADB::new
|
125
|
+
tc_hash_file.open("#{hash_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
116
126
|
item("TC: Hash: file") do
|
117
|
-
@db = TokyoCabinet::ADB::new
|
118
|
-
@db.open("#{hash_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
119
127
|
values.each do |value|
|
120
|
-
|
128
|
+
tc_hash_file.put(value, value)
|
121
129
|
end
|
122
130
|
end
|
123
131
|
|
124
132
|
tree_file = Tempfile.new(["tc-tree", ".tcb"])
|
133
|
+
tc_tree_file = TokyoCabinet::ADB::new
|
134
|
+
tc_tree_file.open("#{tree_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
125
135
|
item("TC: Tree: file") do
|
126
|
-
@db = TokyoCabinet::ADB::new
|
127
|
-
@db.open("#{tree_file.path}#bnum=#{n}#mode=wct#xmsiz=0")
|
128
136
|
values.each do |value|
|
129
|
-
|
137
|
+
tc_tree_file.put(value, value)
|
130
138
|
end
|
131
139
|
end
|
132
140
|
rescue LoadError
|
@@ -211,13 +211,31 @@ VALUE
|
|
211
211
|
rb_grn_context_rb_string_encode (grn_ctx *context, VALUE rb_string)
|
212
212
|
{
|
213
213
|
#ifdef HAVE_RUBY_ENCODING_H
|
214
|
-
|
214
|
+
int index, to_index;
|
215
|
+
rb_encoding *encoding, *to_encoding;
|
216
|
+
grn_encoding context_encoding;
|
217
|
+
|
218
|
+
context_encoding = context->encoding;
|
219
|
+
if (context->encoding == GRN_ENC_DEFAULT)
|
220
|
+
context->encoding = grn_get_default_encoding();
|
221
|
+
if (context->encoding == GRN_ENC_NONE)
|
222
|
+
return rb_string;
|
223
|
+
|
224
|
+
if (RSTRING_LEN(rb_string) < 0)
|
225
|
+
return rb_string;
|
215
226
|
|
216
227
|
encoding = rb_enc_get(rb_string);
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
228
|
+
to_encoding = rb_grn_encoding_to_ruby_encoding(context_encoding);
|
229
|
+
index = rb_enc_to_index(encoding);
|
230
|
+
to_index = rb_enc_to_index(to_encoding);
|
231
|
+
if (index == to_index)
|
232
|
+
return rb_string;
|
233
|
+
|
234
|
+
if (rb_enc_asciicompat(to_encoding) && rb_enc_str_asciionly_p(rb_string))
|
235
|
+
return rb_string;
|
236
|
+
|
237
|
+
rb_string = rb_str_encode(rb_string, rb_enc_from_encoding(to_encoding),
|
238
|
+
0, Qnil);
|
221
239
|
#endif
|
222
240
|
return rb_string;
|
223
241
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
3
|
+
Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
|
5
5
|
This library is free software; you can redistribute it and/or
|
6
6
|
modify it under the terms of the GNU Lesser General Public
|
@@ -453,11 +453,7 @@ rb_grn_index_column_search (int argc, VALUE *argv, VALUE self)
|
|
453
453
|
|
454
454
|
rb_scan_args(argc, argv, "11", &rb_query, &options);
|
455
455
|
|
456
|
-
if (CBOOL2RVAL(rb_obj_is_kind_of(rb_query,
|
457
|
-
grn_query *_query;
|
458
|
-
_query = RVAL2GRNQUERY(rb_query);
|
459
|
-
query = (grn_obj *)_query;
|
460
|
-
} else if (CBOOL2RVAL(rb_obj_is_kind_of(rb_query, rb_cInteger))) {
|
456
|
+
if (CBOOL2RVAL(rb_obj_is_kind_of(rb_query, rb_cInteger))) {
|
461
457
|
grn_id id;
|
462
458
|
id = NUM2UINT(rb_query);
|
463
459
|
GRN_TEXT_SET(context, id_query, &id, sizeof(grn_id));
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009-
|
3
|
+
Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
|
5
5
|
This library is free software; you can redistribute it and/or
|
6
6
|
modify it under the terms of the GNU Lesser General Public
|
@@ -20,6 +20,36 @@
|
|
20
20
|
|
21
21
|
VALUE rb_mGrnOperator;
|
22
22
|
|
23
|
+
grn_operator
|
24
|
+
rb_grn_operator_from_ruby_object (VALUE rb_operator)
|
25
|
+
{
|
26
|
+
grn_operator operator = GRN_OP_OR;
|
27
|
+
|
28
|
+
if (NIL_P(rb_operator) ||
|
29
|
+
rb_grn_equal_option(rb_operator, "or") ||
|
30
|
+
rb_grn_equal_option(rb_operator, "||")) {
|
31
|
+
operator = GRN_OP_OR;
|
32
|
+
} else if (rb_grn_equal_option(rb_operator, "and") ||
|
33
|
+
rb_grn_equal_option(rb_operator, "+") ||
|
34
|
+
rb_grn_equal_option(rb_operator, "&&")) {
|
35
|
+
operator = GRN_OP_AND;
|
36
|
+
} else if (rb_grn_equal_option(rb_operator, "but") ||
|
37
|
+
rb_grn_equal_option(rb_operator, "not") ||
|
38
|
+
rb_grn_equal_option(rb_operator, "-")) {
|
39
|
+
operator = GRN_OP_BUT;
|
40
|
+
} else if (rb_grn_equal_option(rb_operator, "adjust") ||
|
41
|
+
rb_grn_equal_option(rb_operator, ">")) {
|
42
|
+
operator = GRN_OP_ADJUST;
|
43
|
+
} else {
|
44
|
+
rb_raise(rb_eArgError,
|
45
|
+
"operator should be one of "
|
46
|
+
"[:or, :||, :and, :+, :&&, :but, :not, :-, :adjust, :>]: <%s>",
|
47
|
+
rb_grn_inspect(rb_operator));
|
48
|
+
}
|
49
|
+
|
50
|
+
return operator;
|
51
|
+
}
|
52
|
+
|
23
53
|
void
|
24
54
|
rb_grn_init_operator (VALUE mGrn)
|
25
55
|
{
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
3
|
+
Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
|
5
5
|
This library is free software; you can redistribute it and/or
|
6
6
|
modify it under the terms of the GNU Lesser General Public
|
@@ -28,6 +28,80 @@ VALUE rb_cGrnVariableSizeColumn;
|
|
28
28
|
* 可変長データ用のカラム。
|
29
29
|
*/
|
30
30
|
|
31
|
+
/*
|
32
|
+
* Document-method: compressed?
|
33
|
+
*
|
34
|
+
* call-seq:
|
35
|
+
* column.compressed? -> boolean
|
36
|
+
* column.compressed?(type) -> boolean
|
37
|
+
*
|
38
|
+
* Returns whether the column is compressed or not. If
|
39
|
+
* @type@ is specified, it returns whether the column is
|
40
|
+
* compressed by @type@ or not.
|
41
|
+
*
|
42
|
+
* @return [Boolean] whether the column is compressed or not.
|
43
|
+
* @param [:zlib, :lzo] type (nil) If @type@ isn't @nil@,
|
44
|
+
* it checks whether specified compressed type is used or
|
45
|
+
* not.
|
46
|
+
* @since 1.3.1
|
47
|
+
*/
|
48
|
+
static VALUE
|
49
|
+
rb_grn_variable_size_column_compressed_p (int argc, VALUE *argv, VALUE self)
|
50
|
+
{
|
51
|
+
RbGrnColumn *rb_grn_column;
|
52
|
+
grn_ctx *context = NULL;
|
53
|
+
grn_obj *column;
|
54
|
+
grn_obj_flags flags;
|
55
|
+
VALUE type;
|
56
|
+
grn_bool compressed_p = GRN_FALSE;
|
57
|
+
grn_bool accept_any_type = GRN_FALSE;
|
58
|
+
grn_bool need_zlib_check = GRN_FALSE;
|
59
|
+
grn_bool need_lzo_check = GRN_FALSE;
|
60
|
+
|
61
|
+
rb_scan_args(argc, argv, "01", &type);
|
62
|
+
|
63
|
+
if (NIL_P(type)) {
|
64
|
+
accept_any_type = GRN_TRUE;
|
65
|
+
} else {
|
66
|
+
if (rb_grn_equal_option(type, "zlib")) {
|
67
|
+
need_zlib_check = GRN_TRUE;
|
68
|
+
} else if (rb_grn_equal_option(type, "lzo")) {
|
69
|
+
need_lzo_check = GRN_TRUE;
|
70
|
+
} else {
|
71
|
+
rb_raise(rb_eArgError,
|
72
|
+
"compressed type should be <:zlib> or <:lzo>: <%s>",
|
73
|
+
rb_grn_inspect(type));
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
rb_grn_column = SELF(self);
|
78
|
+
rb_grn_object_deconstruct(RB_GRN_OBJECT(rb_grn_column), &column, &context,
|
79
|
+
NULL, NULL,
|
80
|
+
NULL, NULL);
|
81
|
+
|
82
|
+
flags = column->header.flags;
|
83
|
+
switch (flags & GRN_OBJ_COMPRESS_MASK) {
|
84
|
+
case GRN_OBJ_COMPRESS_ZLIB:
|
85
|
+
if (accept_any_type || need_zlib_check) {
|
86
|
+
grn_obj support_p;
|
87
|
+
GRN_BOOL_INIT(&support_p, 0);
|
88
|
+
grn_obj_get_info(context, NULL, GRN_INFO_SUPPORT_ZLIB, &support_p);
|
89
|
+
compressed_p = GRN_BOOL_VALUE(&support_p);
|
90
|
+
}
|
91
|
+
break;
|
92
|
+
case GRN_OBJ_COMPRESS_LZO:
|
93
|
+
if (accept_any_type || need_lzo_check) {
|
94
|
+
grn_obj support_p;
|
95
|
+
GRN_BOOL_INIT(&support_p, 0);
|
96
|
+
grn_obj_get_info(context, NULL, GRN_INFO_SUPPORT_LZO, &support_p);
|
97
|
+
compressed_p = GRN_BOOL_VALUE(&support_p);
|
98
|
+
}
|
99
|
+
break;
|
100
|
+
}
|
101
|
+
|
102
|
+
return CBOOL2RVAL(compressed_p);
|
103
|
+
}
|
104
|
+
|
31
105
|
/*
|
32
106
|
* Document-method: defrag
|
33
107
|
*
|
@@ -77,6 +151,8 @@ rb_grn_init_variable_size_column (VALUE mGrn)
|
|
77
151
|
rb_cGrnVariableSizeColumn =
|
78
152
|
rb_define_class_under(mGrn, "VariableSizeColumn", rb_cGrnColumn);
|
79
153
|
|
154
|
+
rb_define_method(rb_cGrnVariableSizeColumn, "compressed?",
|
155
|
+
rb_grn_variable_size_column_compressed_p, -1);
|
80
156
|
rb_define_method(rb_cGrnVariableSizeColumn, "defrag",
|
81
157
|
rb_grn_variable_size_column_defrag, -1);
|
82
158
|
}
|