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/ext/groonga/rb-grn.h
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- 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
|
@@ -72,7 +72,7 @@ RB_GRN_BEGIN_DECLS
|
|
72
72
|
|
73
73
|
#define RB_GRN_MAJOR_VERSION 1
|
74
74
|
#define RB_GRN_MINOR_VERSION 3
|
75
|
-
#define RB_GRN_MICRO_VERSION
|
75
|
+
#define RB_GRN_MICRO_VERSION 1
|
76
76
|
|
77
77
|
#define RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS 32
|
78
78
|
|
@@ -227,7 +227,6 @@ RB_GRN_VAR VALUE rb_cGrnAccessor;
|
|
227
227
|
RB_GRN_VAR VALUE rb_cGrnViewAccessor;
|
228
228
|
RB_GRN_VAR VALUE rb_cGrnRecord;
|
229
229
|
RB_GRN_VAR VALUE rb_cGrnViewRecord;
|
230
|
-
RB_GRN_VAR VALUE rb_cGrnQuery;
|
231
230
|
RB_GRN_VAR VALUE rb_cGrnLogger;
|
232
231
|
RB_GRN_VAR VALUE rb_cGrnSnippet;
|
233
232
|
RB_GRN_VAR VALUE rb_cGrnVariable;
|
@@ -270,7 +269,6 @@ void rb_grn_init_accessor (VALUE mGrn);
|
|
270
269
|
void rb_grn_init_view_accessor (VALUE mGrn);
|
271
270
|
void rb_grn_init_record (VALUE mGrn);
|
272
271
|
void rb_grn_init_view_record (VALUE mGrn);
|
273
|
-
void rb_grn_init_query (VALUE mGrn);
|
274
272
|
void rb_grn_init_variable (VALUE mGrn);
|
275
273
|
void rb_grn_init_operator (VALUE mGrn);
|
276
274
|
void rb_grn_init_expression (VALUE mGrn);
|
@@ -555,9 +553,6 @@ VALUE rb_grn_column_expression_builder_build
|
|
555
553
|
#define GRNACCESSOR2RVAL(context, accessor, owner) \
|
556
554
|
(rb_grn_accessor_to_ruby_object(context, accessor, owner))
|
557
555
|
|
558
|
-
#define RVAL2GRNQUERY(object) (rb_grn_query_from_ruby_object(object))
|
559
|
-
#define GRNQUERY2RVAL(context, column)(rb_grn_query_to_ruby_object(context, column))
|
560
|
-
|
561
556
|
#define RVAL2GRNOPERATOR(object) (rb_grn_operator_from_ruby_object(object))
|
562
557
|
|
563
558
|
#define RVAL2GRNLOGGER(object) (rb_grn_logger_from_ruby_object(object))
|
@@ -665,10 +660,6 @@ VALUE rb_grn_index_cursor_to_ruby_object (grn_ctx *context,
|
|
665
660
|
grn_obj *cursor,
|
666
661
|
grn_bool owner);
|
667
662
|
|
668
|
-
grn_query *rb_grn_query_from_ruby_object (VALUE object);
|
669
|
-
VALUE rb_grn_query_to_ruby_object (grn_ctx *context,
|
670
|
-
grn_query *query);
|
671
|
-
|
672
663
|
grn_operator rb_grn_operator_from_ruby_object (VALUE object);
|
673
664
|
|
674
665
|
grn_logger_info *
|
data/ext/groonga/rb-groonga.c
CHANGED
@@ -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
|
@@ -138,7 +138,6 @@ Init_groonga (void)
|
|
138
138
|
rb_grn_init_view_accessor(mGrn);
|
139
139
|
rb_grn_init_record(mGrn);
|
140
140
|
rb_grn_init_view_record(mGrn);
|
141
|
-
rb_grn_init_query(mGrn);
|
142
141
|
rb_grn_init_variable(mGrn);
|
143
142
|
rb_grn_init_operator(mGrn);
|
144
143
|
rb_grn_init_expression(mGrn);
|
data/lib/1.8/groonga.so
CHANGED
Binary file
|
data/lib/1.9/groonga.so
CHANGED
Binary file
|
@@ -0,0 +1,169 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Copyright (C) 2012 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
|
+
module Groonga
|
19
|
+
module Command
|
20
|
+
class Builder
|
21
|
+
class << self
|
22
|
+
def escape_value(value)
|
23
|
+
escaped_value = value.to_s.gsub(/"/, '\\"')
|
24
|
+
"\"#{escaped_value}\""
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
attr_reader :command, :arguments
|
29
|
+
def initialize(command, arguments={})
|
30
|
+
@command = command
|
31
|
+
@arguments = arguments
|
32
|
+
end
|
33
|
+
|
34
|
+
def [](key)
|
35
|
+
@arguments[key]
|
36
|
+
end
|
37
|
+
|
38
|
+
def []=(key, value)
|
39
|
+
@arguments[key] = value
|
40
|
+
end
|
41
|
+
|
42
|
+
def build
|
43
|
+
query = "#{@command} "
|
44
|
+
@arguments.each do |key, value|
|
45
|
+
value = value.join(", ") if value.is_a?(::Array)
|
46
|
+
escaped_value = self.class.escape_value(value)
|
47
|
+
query << " --#{key} #{escaped_value}"
|
48
|
+
end
|
49
|
+
query
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
class Select
|
54
|
+
def initialize(context, table, options)
|
55
|
+
@context = context
|
56
|
+
@table = table
|
57
|
+
@options = normalize_options(options)
|
58
|
+
end
|
59
|
+
|
60
|
+
def exec
|
61
|
+
request_id = @context.send(query)
|
62
|
+
loop do
|
63
|
+
response_id, result = @context.receive
|
64
|
+
if request_id == response_id
|
65
|
+
drill_down_keys = @options["drilldown"]
|
66
|
+
if drill_down_keys.is_a?(String)
|
67
|
+
drill_down_keys = drill_down_keys.split(/(?:\s+|\s*,\s*)/)
|
68
|
+
end
|
69
|
+
return Result.parse(result, drill_down_keys)
|
70
|
+
end
|
71
|
+
# raise if request_id < response_id
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
def normalize_options(options)
|
77
|
+
normalized_options = {}
|
78
|
+
options.each do |key, value|
|
79
|
+
normalized_options[normalize_option_name(key)] = value
|
80
|
+
end
|
81
|
+
normalized_options
|
82
|
+
end
|
83
|
+
|
84
|
+
def normalize_option_name(name)
|
85
|
+
name = name.to_s.gsub(/-/, "_").gsub(/drill_down/, "drilldown")
|
86
|
+
name.gsub(/sort_by/, 'sortby')
|
87
|
+
end
|
88
|
+
|
89
|
+
def query
|
90
|
+
if @table.is_a?(String)
|
91
|
+
table_name = @table
|
92
|
+
else
|
93
|
+
table_name = @table.name
|
94
|
+
end
|
95
|
+
builder = Builder.new("select", @options.merge(:table => table_name))
|
96
|
+
builder.build
|
97
|
+
end
|
98
|
+
|
99
|
+
class Result < Struct.new(:n_hits, :columns, :values, :drill_down)
|
100
|
+
class << self
|
101
|
+
def parse(json, drill_down_keys)
|
102
|
+
select_result, *drill_down_results = JSON.parse(json)
|
103
|
+
result = new
|
104
|
+
n_hits, columns, values = extract_result(select_result)
|
105
|
+
result.n_hits = n_hits
|
106
|
+
result.columns = columns
|
107
|
+
result.values = values
|
108
|
+
if drill_down_results
|
109
|
+
result.drill_down = parse_drill_down_results(drill_down_results,
|
110
|
+
drill_down_keys)
|
111
|
+
end
|
112
|
+
result
|
113
|
+
end
|
114
|
+
|
115
|
+
def create_records(columns, values)
|
116
|
+
records = []
|
117
|
+
values.each do |value|
|
118
|
+
record = {}
|
119
|
+
columns.each_with_index do |(name, type), i|
|
120
|
+
record[name] = convert_value(value[i], type)
|
121
|
+
end
|
122
|
+
records << record
|
123
|
+
end
|
124
|
+
records
|
125
|
+
end
|
126
|
+
|
127
|
+
private
|
128
|
+
def parse_drill_down_results(results, keys)
|
129
|
+
named_results = {}
|
130
|
+
results.each_with_index do |drill_down, i|
|
131
|
+
n_hits, columns, values = extract_result(drill_down)
|
132
|
+
drill_down_result = DrillDownResult.new
|
133
|
+
drill_down_result.n_hits = n_hits
|
134
|
+
drill_down_result.columns = columns
|
135
|
+
drill_down_result.values = values
|
136
|
+
named_results[keys[i]] = drill_down_result
|
137
|
+
end
|
138
|
+
named_results
|
139
|
+
end
|
140
|
+
|
141
|
+
def extract_result(result)
|
142
|
+
meta_data, columns, *values = result
|
143
|
+
n_hits, = meta_data
|
144
|
+
[n_hits, columns, values]
|
145
|
+
end
|
146
|
+
|
147
|
+
def convert_value(value, type)
|
148
|
+
case type
|
149
|
+
when "Time"
|
150
|
+
Time.at(value)
|
151
|
+
else
|
152
|
+
value
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
def records
|
158
|
+
@records ||= self.class.create_records(columns, values)
|
159
|
+
end
|
160
|
+
|
161
|
+
class DrillDownResult < Struct.new(:n_hits, :columns, :values)
|
162
|
+
def records
|
163
|
+
@records ||= Result.create_records(columns, values)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
data/lib/groonga/context.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2010-
|
3
|
+
# Copyright (C) 2010-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
|
@@ -15,6 +15,8 @@
|
|
15
15
|
# License along with this library; if not, write to the Free Software
|
16
16
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
17
|
|
18
|
+
require "groonga/command"
|
19
|
+
|
18
20
|
module Groonga
|
19
21
|
class Context
|
20
22
|
# _path_ にある既存のデータベースを開く。ブロックを指定した場
|
@@ -70,130 +72,8 @@ module Groonga
|
|
70
72
|
# @option options [Array] XXX TODO
|
71
73
|
# TODO
|
72
74
|
def select(table, options={})
|
73
|
-
select =
|
75
|
+
select = Command::Select.new(self, table, options)
|
74
76
|
select.exec
|
75
77
|
end
|
76
|
-
|
77
|
-
class SelectResult < Struct.new(:n_hits, :columns, :values,
|
78
|
-
:drill_down)
|
79
|
-
class << self
|
80
|
-
def parse(json, drill_down_keys)
|
81
|
-
select_result, *drill_down_results = JSON.parse(json)
|
82
|
-
result = new
|
83
|
-
n_hits, columns, values = extract_result(select_result)
|
84
|
-
result.n_hits = n_hits
|
85
|
-
result.columns = columns
|
86
|
-
result.values = values
|
87
|
-
if drill_down_results
|
88
|
-
result.drill_down = parse_drill_down_results(drill_down_results,
|
89
|
-
drill_down_keys)
|
90
|
-
end
|
91
|
-
result
|
92
|
-
end
|
93
|
-
|
94
|
-
def create_records(columns, values)
|
95
|
-
records = []
|
96
|
-
values.each do |value|
|
97
|
-
record = {}
|
98
|
-
columns.each_with_index do |(name, type), i|
|
99
|
-
record[name] = convert_value(value[i], type)
|
100
|
-
end
|
101
|
-
records << record
|
102
|
-
end
|
103
|
-
records
|
104
|
-
end
|
105
|
-
|
106
|
-
private
|
107
|
-
def parse_drill_down_results(results, keys)
|
108
|
-
named_results = {}
|
109
|
-
results.each_with_index do |drill_down, i|
|
110
|
-
n_hits, columns, values = extract_result(drill_down)
|
111
|
-
drill_down_result = DrillDownResult.new
|
112
|
-
drill_down_result.n_hits = n_hits
|
113
|
-
drill_down_result.columns = columns
|
114
|
-
drill_down_result.values = values
|
115
|
-
named_results[keys[i]] = drill_down_result
|
116
|
-
end
|
117
|
-
named_results
|
118
|
-
end
|
119
|
-
|
120
|
-
def extract_result(result)
|
121
|
-
meta_data, columns, *values = result
|
122
|
-
n_hits, = meta_data
|
123
|
-
[n_hits, columns, values]
|
124
|
-
end
|
125
|
-
|
126
|
-
def convert_value(value, type)
|
127
|
-
case type
|
128
|
-
when "Time"
|
129
|
-
Time.at(value)
|
130
|
-
else
|
131
|
-
value
|
132
|
-
end
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
def records
|
137
|
-
@records ||= self.class.create_records(columns, values)
|
138
|
-
end
|
139
|
-
|
140
|
-
class DrillDownResult < Struct.new(:n_hits, :columns, :values)
|
141
|
-
def records
|
142
|
-
@records ||= SelectResult.create_records(columns, values)
|
143
|
-
end
|
144
|
-
end
|
145
|
-
end
|
146
|
-
|
147
|
-
class SelectCommand
|
148
|
-
def initialize(context, table, options)
|
149
|
-
@context = context
|
150
|
-
@table = table
|
151
|
-
@options = normalize_options(options)
|
152
|
-
end
|
153
|
-
|
154
|
-
def exec
|
155
|
-
request_id = @context.send(query)
|
156
|
-
loop do
|
157
|
-
response_id, result = @context.receive
|
158
|
-
if request_id == response_id
|
159
|
-
drill_down_keys = @options["drilldown"]
|
160
|
-
if drill_down_keys.is_a?(String)
|
161
|
-
drill_down_keys = drill_down_keys.split(/(?:\s+|\s*,\s*)/)
|
162
|
-
end
|
163
|
-
return SelectResult.parse(result, drill_down_keys)
|
164
|
-
end
|
165
|
-
# raise if request_id < response_id
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
|
-
private
|
170
|
-
def normalize_options(options)
|
171
|
-
normalized_options = {}
|
172
|
-
options.each do |key, value|
|
173
|
-
normalized_options[normalize_option_name(key)] = value
|
174
|
-
end
|
175
|
-
normalized_options
|
176
|
-
end
|
177
|
-
|
178
|
-
def normalize_option_name(name)
|
179
|
-
name = name.to_s.gsub(/-/, "_").gsub(/drill_down/, "drilldown")
|
180
|
-
name.gsub(/sort_by/, 'sortby')
|
181
|
-
end
|
182
|
-
|
183
|
-
def query
|
184
|
-
if @table.is_a?(String)
|
185
|
-
table_name = @table
|
186
|
-
else
|
187
|
-
table_name = @table.name
|
188
|
-
end
|
189
|
-
_query = "select #{table_name}"
|
190
|
-
@options.each do |key, value|
|
191
|
-
value = value.join(", ") if value.is_a?(::Array)
|
192
|
-
escaped_value = value.to_s.gsub(/"/, '\\"')
|
193
|
-
_query << " --#{key} \"#{escaped_value}\""
|
194
|
-
end
|
195
|
-
_query
|
196
|
-
end
|
197
|
-
end
|
198
78
|
end
|
199
79
|
end
|
data/lib/groonga/dumper.rb
CHANGED
@@ -302,14 +302,12 @@ module Groonga
|
|
302
302
|
def column_method(column)
|
303
303
|
range = column.range
|
304
304
|
case range.name
|
305
|
-
when "
|
306
|
-
"
|
307
|
-
when
|
308
|
-
"
|
309
|
-
when
|
310
|
-
"
|
311
|
-
when "UInt64"
|
312
|
-
"unsigned_integer64"
|
305
|
+
when "Bool"
|
306
|
+
"boolean"
|
307
|
+
when /\AInt(8|16|32|64)\z/
|
308
|
+
"integer#{$1}"
|
309
|
+
when /\AUInt(8|16|32|64)\z/
|
310
|
+
"unsigned_integer#{$1}"
|
313
311
|
when "Float"
|
314
312
|
"float"
|
315
313
|
when "Time"
|
@@ -320,6 +318,10 @@ module Groonga
|
|
320
318
|
"text"
|
321
319
|
when "LongText"
|
322
320
|
"long_text"
|
321
|
+
when "TokyoGeoPoint"
|
322
|
+
"tokyo_geo_point"
|
323
|
+
when "WGS84GeoPoint"
|
324
|
+
"wgs84_geo_point"
|
323
325
|
else
|
324
326
|
raise ArgumentError, "unsupported column: #{column.inspect}"
|
325
327
|
end
|
data/lib/groonga/record.rb
CHANGED
@@ -161,6 +161,13 @@ module Groonga
|
|
161
161
|
self["_score"]
|
162
162
|
end
|
163
163
|
|
164
|
+
# Sets score. Score column exists only search result table.
|
165
|
+
#
|
166
|
+
# @param [Integer] new_score The new score.
|
167
|
+
def score=(new_score)
|
168
|
+
self["_score"] = new_score
|
169
|
+
end
|
170
|
+
|
164
171
|
# Groonga::Record#scoreが利用できる場合は +true+ を
|
165
172
|
# 返す。
|
166
173
|
def support_score?
|
data/lib/groonga/schema.rb
CHANGED
@@ -516,6 +516,10 @@ module Groonga
|
|
516
516
|
"text" => "Text",
|
517
517
|
"binary" => "LongText",
|
518
518
|
"long_text" => "LongText",
|
519
|
+
"int8" => "Int8",
|
520
|
+
"integer8" => "Int8",
|
521
|
+
"int16" => "Int16",
|
522
|
+
"integer16" => "Int16",
|
519
523
|
"int" => "Int32",
|
520
524
|
"integer" => "Int32",
|
521
525
|
"int32" => "Int32",
|
@@ -523,6 +527,10 @@ module Groonga
|
|
523
527
|
"decimal" => "Int64",
|
524
528
|
"int64" => "Int64",
|
525
529
|
"integer64" => "Int64",
|
530
|
+
"uint8" => "UInt8",
|
531
|
+
"unsigned_integer8" => "UInt8",
|
532
|
+
"uint16" => "UInt16",
|
533
|
+
"unsigned_integer16" => "UInt16",
|
526
534
|
"uint" => "UInt32",
|
527
535
|
"unsigned_integer" => "UInt32",
|
528
536
|
"uint32" => "UInt32",
|
@@ -535,6 +543,9 @@ module Groonga
|
|
535
543
|
"time" => "Time",
|
536
544
|
"date" => "Time",
|
537
545
|
"boolean" => "Bool",
|
546
|
+
"tokyo_geo_point" => "TokyoGeoPoint",
|
547
|
+
"geo_point" => "WGS84GeoPoint",
|
548
|
+
"wgs84_geo_point" => "WGS84GeoPoint",
|
538
549
|
"delimit" => "TokenDelimit",
|
539
550
|
"token_delimit" => "TokenDelimit",
|
540
551
|
"unigram" => "TokenUnigram",
|
@@ -1158,6 +1169,28 @@ module Groonga
|
|
1158
1169
|
self
|
1159
1170
|
end
|
1160
1171
|
|
1172
|
+
# Defines a 8 bit signed integer column named @name@.
|
1173
|
+
#
|
1174
|
+
# @param [String or Symbol] name the column name
|
1175
|
+
# @param [Hash] options ({}) the options
|
1176
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1177
|
+
# available @options@.
|
1178
|
+
def integer8(name, options={})
|
1179
|
+
column(name, "Int8", options)
|
1180
|
+
end
|
1181
|
+
alias_method :int8, :integer8
|
1182
|
+
|
1183
|
+
# Defines a 16 bit signed integer column named @name@.
|
1184
|
+
#
|
1185
|
+
# @param [String or Symbol] name the column name
|
1186
|
+
# @param [Hash] options ({}) the options
|
1187
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1188
|
+
# available @options@.
|
1189
|
+
def integer16(name, options={})
|
1190
|
+
column(name, "Int16", options)
|
1191
|
+
end
|
1192
|
+
alias_method :int16, :integer16
|
1193
|
+
|
1161
1194
|
# 名前が _name_ の32bit符号付き整数のカラムを作成する。
|
1162
1195
|
#
|
1163
1196
|
# _options_ に指定可能な値は
|
@@ -1177,6 +1210,28 @@ module Groonga
|
|
1177
1210
|
end
|
1178
1211
|
alias_method :int64, :integer64
|
1179
1212
|
|
1213
|
+
# Defines a 8 bit unsigned integer column named @name@.
|
1214
|
+
#
|
1215
|
+
# @param [String or Symbol] name the column name
|
1216
|
+
# @param [Hash] options ({}) the options
|
1217
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1218
|
+
# available @options@.
|
1219
|
+
def unsigned_integer8(name, options={})
|
1220
|
+
column(name, "UInt8", options)
|
1221
|
+
end
|
1222
|
+
alias_method :uint8, :unsigned_integer8
|
1223
|
+
|
1224
|
+
# Defines a 16 bit unsigned integer column named @name@.
|
1225
|
+
#
|
1226
|
+
# @param [String or Symbol] name the column name
|
1227
|
+
# @param [Hash] options ({}) the options
|
1228
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1229
|
+
# available @options@.
|
1230
|
+
def unsigned_integer16(name, options={})
|
1231
|
+
column(name, "UInt16", options)
|
1232
|
+
end
|
1233
|
+
alias_method :uint16, :unsigned_integer16
|
1234
|
+
|
1180
1235
|
# 名前が _name_ の32bit符号なし整数のカラムを作成する。
|
1181
1236
|
#
|
1182
1237
|
# _options_ に指定可能な値は
|
@@ -1272,6 +1327,40 @@ module Groonga
|
|
1272
1327
|
end
|
1273
1328
|
alias_method :bool, :boolean
|
1274
1329
|
|
1330
|
+
# Defines a 8 bit signed integer column named @name@.
|
1331
|
+
#
|
1332
|
+
# @param [String or Symbol] name the column name
|
1333
|
+
# @param [Hash] options ({}) the options
|
1334
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1335
|
+
# available @options@.
|
1336
|
+
def integer8(name, options={})
|
1337
|
+
column(name, "Int8", options)
|
1338
|
+
end
|
1339
|
+
alias_method :int8, :integer8
|
1340
|
+
|
1341
|
+
# Defines a geo point in Tokyo geodetic system column
|
1342
|
+
# named @name@.
|
1343
|
+
#
|
1344
|
+
# @param [String or Symbol] name the column name
|
1345
|
+
# @param [Hash] options ({}) the options
|
1346
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1347
|
+
# available @options@.
|
1348
|
+
def tokyo_geo_point(name, options={})
|
1349
|
+
column(name, "TokyoGeoPoint", options)
|
1350
|
+
end
|
1351
|
+
|
1352
|
+
# Defines a geo point in WGS 84 (World Geodetic System) column
|
1353
|
+
# named @name@.
|
1354
|
+
#
|
1355
|
+
# @param [String or Symbol] name the column name
|
1356
|
+
# @param [Hash] options ({}) the options
|
1357
|
+
# @see Groonga::Schema::TableDefinition#column for
|
1358
|
+
# available @options@.
|
1359
|
+
def wgs84_geo_point(name, options={})
|
1360
|
+
column(name, "WGS84GeoPoint", options)
|
1361
|
+
end
|
1362
|
+
alias_method :geo_point, :wgs84_geo_point
|
1363
|
+
|
1275
1364
|
# @private
|
1276
1365
|
def [](name, definition_class=nil)
|
1277
1366
|
@definitions.find do |definition|
|
@@ -1651,23 +1740,25 @@ module Groonga
|
|
1651
1740
|
end
|
1652
1741
|
end
|
1653
1742
|
table.define_column(@name,
|
1654
|
-
|
1743
|
+
resolved_type(context),
|
1655
1744
|
options)
|
1656
1745
|
end
|
1657
1746
|
|
1658
1747
|
private
|
1659
|
-
def
|
1748
|
+
def resolved_type(context)
|
1749
|
+
return @type if @type.is_a?(Groonga::Object)
|
1660
1750
|
if @type.respond_to?(:call)
|
1661
|
-
|
1751
|
+
resolved_type_name = @type.call(context)
|
1662
1752
|
else
|
1663
|
-
|
1753
|
+
resolved_type_name = @type
|
1664
1754
|
end
|
1665
|
-
Schema.normalize_type(
|
1755
|
+
normalized_type_name = Schema.normalize_type(resolved_type_name,
|
1756
|
+
:context => context)
|
1757
|
+
context[normalized_type_name]
|
1666
1758
|
end
|
1667
1759
|
|
1668
1760
|
def same_column?(context, column)
|
1669
|
-
|
1670
|
-
column.range == context[normalize_type(context)]
|
1761
|
+
column.range == resolved_type(context)
|
1671
1762
|
end
|
1672
1763
|
|
1673
1764
|
def define_options(context, table)
|
data/rroonga-build.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env 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
|
@@ -18,8 +18,8 @@
|
|
18
18
|
module RroongaBuild
|
19
19
|
module RequiredGroongaVersion
|
20
20
|
MAJOR = 1
|
21
|
-
MINOR =
|
22
|
-
MICRO =
|
21
|
+
MINOR = 3
|
22
|
+
MICRO = 0
|
23
23
|
VERSION = [MAJOR, MINOR, MICRO]
|
24
24
|
end
|
25
25
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2010 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2010-2012 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# License along with this library; if not, write to the Free Software
|
14
14
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
15
|
|
16
|
-
class
|
16
|
+
class CommandSelectTest < Test::Unit::TestCase
|
17
17
|
include GroongaTestUtils
|
18
18
|
|
19
19
|
setup :setup_database
|
@@ -100,7 +100,7 @@ class ContextSelectTest < Test::Unit::TestCase
|
|
100
100
|
|
101
101
|
def test_drill_down_with_no_hit
|
102
102
|
result = context.select(@users,
|
103
|
-
:filter => "_key == \"no hit\"",
|
103
|
+
:filter => "_key == \"no\\ hit\"",
|
104
104
|
:output_columns => ["_key"],
|
105
105
|
:drill_down => ["_key", "book"],
|
106
106
|
:drill_down_output_columns => "_key",
|
data/test/test-record.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009-
|
1
|
+
# Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -233,6 +233,23 @@ class RecordTest < Test::Unit::TestCase
|
|
233
233
|
end)
|
234
234
|
end
|
235
235
|
|
236
|
+
def test_score=
|
237
|
+
groonga = @bookmarks.add
|
238
|
+
groonga["content"] = "full text search search search engine."
|
239
|
+
|
240
|
+
google = @bookmarks.add
|
241
|
+
google["content"] = "Web search engine."
|
242
|
+
|
243
|
+
results = @bookmarks_content_index.search("search")
|
244
|
+
results.each do |record|
|
245
|
+
record.score *= 10
|
246
|
+
end
|
247
|
+
assert_equal([[groonga.id, 30], [google.id, 10]],
|
248
|
+
results.collect do |record|
|
249
|
+
[record.id, record.score]
|
250
|
+
end)
|
251
|
+
end
|
252
|
+
|
236
253
|
def test_increment!
|
237
254
|
groonga = @bookmarks.add
|
238
255
|
assert_equal(0, groonga["rate"])
|