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/Makefile
DELETED
@@ -1,184 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
#### Start of system configuration section. ####
|
5
|
-
|
6
|
-
srcdir = /home/kou/work/ruby/rroonga.win32/ext/groonga
|
7
|
-
topdir = /usr/lib/ruby/1.8/x86_64-linux
|
8
|
-
hdrdir = $(topdir)
|
9
|
-
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
|
-
exec_prefix = $(prefix)
|
11
|
-
prefix = $(DESTDIR)/usr
|
12
|
-
sharedstatedir = $(prefix)/com
|
13
|
-
mandir = $(prefix)/share/man
|
14
|
-
psdir = $(docdir)
|
15
|
-
oldincludedir = $(DESTDIR)/usr/include
|
16
|
-
localedir = $(datarootdir)/locale
|
17
|
-
bindir = $(exec_prefix)/bin
|
18
|
-
libexecdir = $(prefix)/lib/ruby1.8
|
19
|
-
sitedir = $(DESTDIR)/usr/local/lib/site_ruby
|
20
|
-
htmldir = $(docdir)
|
21
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
22
|
-
includedir = $(prefix)/include
|
23
|
-
infodir = $(prefix)/share/info
|
24
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
25
|
-
sysconfdir = $(DESTDIR)/etc
|
26
|
-
libdir = $(exec_prefix)/lib
|
27
|
-
sbindir = $(exec_prefix)/sbin
|
28
|
-
rubylibdir = $(libdir)/ruby/$(ruby_version)
|
29
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
30
|
-
dvidir = $(docdir)
|
31
|
-
vendordir = $(libdir)/ruby/vendor_ruby
|
32
|
-
datarootdir = $(prefix)/share
|
33
|
-
pdfdir = $(docdir)
|
34
|
-
archdir = $(rubylibdir)/$(arch)
|
35
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
36
|
-
datadir = $(datarootdir)
|
37
|
-
localstatedir = $(DESTDIR)/var
|
38
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
39
|
-
|
40
|
-
CC = cc
|
41
|
-
LIBRUBY = $(LIBRUBY_SO)
|
42
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
43
|
-
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
|
44
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
45
|
-
|
46
|
-
RUBY_EXTCONF_H =
|
47
|
-
CFLAGS = -fPIC -fno-strict-aliasing -g -g -O2 -fPIC $(cflags) -I/usr/include/groonga -Wall
|
48
|
-
INCFLAGS = -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.win32/ext/groonga
|
49
|
-
DEFS =
|
50
|
-
CPPFLAGS = -DRB_GRN_COMPILATION -DGRN_MAJOR_VERSION=0 -DGRN_MINOR_VERSION=1 -DGRN_MICRO_VERSION=9
|
51
|
-
CXXFLAGS = $(CFLAGS)
|
52
|
-
ldflags = -L. -rdynamic -Wl,-export-dynamic
|
53
|
-
dldflags =
|
54
|
-
archflag =
|
55
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
56
|
-
LDSHARED = $(CC) -shared
|
57
|
-
AR = ar
|
58
|
-
EXEEXT =
|
59
|
-
|
60
|
-
RUBY_INSTALL_NAME = ruby1.8
|
61
|
-
RUBY_SO_NAME = ruby1.8
|
62
|
-
arch = x86_64-linux
|
63
|
-
sitearch = x86_64-linux
|
64
|
-
ruby_version = 1.8
|
65
|
-
ruby = /usr/bin/ruby1.8
|
66
|
-
RUBY = $(ruby)
|
67
|
-
RM = rm -f
|
68
|
-
MAKEDIRS = mkdir -p
|
69
|
-
INSTALL = /usr/bin/install -c
|
70
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
71
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
72
|
-
COPY = cp
|
73
|
-
|
74
|
-
#### End of system configuration section. ####
|
75
|
-
|
76
|
-
preload =
|
77
|
-
|
78
|
-
libpath = . $(libdir)
|
79
|
-
LIBPATH = -L. -L$(libdir)
|
80
|
-
DEFFILE =
|
81
|
-
|
82
|
-
CLEANFILES = mkmf.log
|
83
|
-
DISTCLEANFILES =
|
84
|
-
|
85
|
-
extout =
|
86
|
-
extout_prefix =
|
87
|
-
target_prefix =
|
88
|
-
LOCAL_LIBS =
|
89
|
-
LIBS = $(LIBRUBYARG_SHARED) -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc
|
90
|
-
SRCS = rb-grn-patricia-trie.c rb-grn-hash.c rb-grn-hash-cursor.c rb-grn-logger.c rb-grn-index-column.c rb-grn-snippet.c rb-grn-view-record.c rb-grn-view-cursor.c rb-grn-exception.c rb-grn-accessor.c rb-grn-table-cursor.c rb-grn-database.c rb-grn-patricia-trie-cursor.c rb-grn-fix-size-column.c rb-grn-variable-size-column.c rb-grn-array-cursor.c rb-grn-type.c rb-grn-view.c rb-grn-record.c rb-grn-table.c rb-grn-encoding.c rb-grn-variable.c rb-groonga.c rb-grn-array.c rb-grn-procedure.c rb-grn-table-cursor-key-support.c rb-grn-query.c rb-grn-context.c rb-grn-utils.c rb-grn-operation.c rb-grn-expression-builder.c rb-grn-object.c rb-grn-view-accessor.c rb-grn-encoding-support.c rb-grn-expression.c rb-grn-column.c rb-grn-table-key-support.c
|
91
|
-
OBJS = rb-grn-patricia-trie.o rb-grn-hash.o rb-grn-hash-cursor.o rb-grn-logger.o rb-grn-index-column.o rb-grn-snippet.o rb-grn-view-record.o rb-grn-view-cursor.o rb-grn-exception.o rb-grn-accessor.o rb-grn-table-cursor.o rb-grn-database.o rb-grn-patricia-trie-cursor.o rb-grn-fix-size-column.o rb-grn-variable-size-column.o rb-grn-array-cursor.o rb-grn-type.o rb-grn-view.o rb-grn-record.o rb-grn-table.o rb-grn-encoding.o rb-grn-variable.o rb-groonga.o rb-grn-array.o rb-grn-procedure.o rb-grn-table-cursor-key-support.o rb-grn-query.o rb-grn-context.o rb-grn-utils.o rb-grn-operation.o rb-grn-expression-builder.o rb-grn-object.o rb-grn-view-accessor.o rb-grn-encoding-support.o rb-grn-expression.o rb-grn-column.o rb-grn-table-key-support.o
|
92
|
-
TARGET = groonga
|
93
|
-
DLLIB = $(TARGET).so
|
94
|
-
EXTSTATIC =
|
95
|
-
STATIC_LIB =
|
96
|
-
|
97
|
-
BINDIR = $(bindir)
|
98
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
99
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
100
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
101
|
-
|
102
|
-
TARGET_SO = $(DLLIB)
|
103
|
-
CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
|
104
|
-
CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
|
105
|
-
|
106
|
-
all: $(DLLIB)
|
107
|
-
static: $(STATIC_LIB)
|
108
|
-
|
109
|
-
clean:
|
110
|
-
@-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
|
111
|
-
|
112
|
-
distclean: clean
|
113
|
-
@-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
114
|
-
@-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
115
|
-
|
116
|
-
realclean: distclean
|
117
|
-
install: install-so install-rb
|
118
|
-
|
119
|
-
install-so: $(RUBYARCHDIR)
|
120
|
-
install-so: $(RUBYARCHDIR)/$(DLLIB)
|
121
|
-
$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
|
122
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
123
|
-
install-rb: pre-install-rb install-rb-default
|
124
|
-
install-rb-default: pre-install-rb-default
|
125
|
-
pre-install-rb: Makefile
|
126
|
-
pre-install-rb-default: Makefile
|
127
|
-
pre-install-rb: $(RUBYLIBDIR)
|
128
|
-
install-rb: $(RUBYLIBDIR)/groonga.rb
|
129
|
-
$(RUBYLIBDIR)/groonga.rb: $(srcdir)/../../lib/groonga.rb $(RUBYLIBDIR)
|
130
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga.rb $(@D)
|
131
|
-
pre-install-rb: $(RUBYLIBDIR)/groonga
|
132
|
-
install-rb: $(RUBYLIBDIR)/groonga/record.rb
|
133
|
-
$(RUBYLIBDIR)/groonga/record.rb: $(srcdir)/../../lib/groonga/record.rb $(RUBYLIBDIR)/groonga
|
134
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/record.rb $(@D)
|
135
|
-
install-rb: $(RUBYLIBDIR)/groonga/view-record.rb
|
136
|
-
$(RUBYLIBDIR)/groonga/view-record.rb: $(srcdir)/../../lib/groonga/view-record.rb $(RUBYLIBDIR)/groonga
|
137
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/view-record.rb $(@D)
|
138
|
-
install-rb: $(RUBYLIBDIR)/groonga/expression-builder.rb
|
139
|
-
$(RUBYLIBDIR)/groonga/expression-builder.rb: $(srcdir)/../../lib/groonga/expression-builder.rb $(RUBYLIBDIR)/groonga
|
140
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/expression-builder.rb $(@D)
|
141
|
-
install-rb: $(RUBYLIBDIR)/groonga/patricia-trie.rb
|
142
|
-
$(RUBYLIBDIR)/groonga/patricia-trie.rb: $(srcdir)/../../lib/groonga/patricia-trie.rb $(RUBYLIBDIR)/groonga
|
143
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/patricia-trie.rb $(@D)
|
144
|
-
install-rb: $(RUBYLIBDIR)/groonga/schema.rb
|
145
|
-
$(RUBYLIBDIR)/groonga/schema.rb: $(srcdir)/../../lib/groonga/schema.rb $(RUBYLIBDIR)/groonga
|
146
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/schema.rb $(@D)
|
147
|
-
install-rb: $(RUBYLIBDIR)/groonga/context.rb
|
148
|
-
$(RUBYLIBDIR)/groonga/context.rb: $(srcdir)/../../lib/groonga/context.rb $(RUBYLIBDIR)/groonga
|
149
|
-
$(INSTALL_DATA) $(srcdir)/../../lib/groonga/context.rb $(@D)
|
150
|
-
$(RUBYARCHDIR):
|
151
|
-
$(MAKEDIRS) $@
|
152
|
-
$(RUBYLIBDIR):
|
153
|
-
$(MAKEDIRS) $@
|
154
|
-
$(RUBYLIBDIR)/groonga:
|
155
|
-
$(MAKEDIRS) $@
|
156
|
-
|
157
|
-
site-install: site-install-so site-install-rb
|
158
|
-
site-install-so: install-so
|
159
|
-
site-install-rb: install-rb
|
160
|
-
|
161
|
-
.SUFFIXES: .c .m .cc .cxx .cpp .C .o
|
162
|
-
|
163
|
-
.cc.o:
|
164
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
165
|
-
|
166
|
-
.cxx.o:
|
167
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
168
|
-
|
169
|
-
.cpp.o:
|
170
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
171
|
-
|
172
|
-
.C.o:
|
173
|
-
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
|
174
|
-
|
175
|
-
.c.o:
|
176
|
-
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
177
|
-
|
178
|
-
$(DLLIB): $(OBJS) Makefile
|
179
|
-
@-$(RM) $@
|
180
|
-
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
$(OBJS): ruby.h defines.h
|
data/ext/groonga/rb-grn-query.c
DELETED
@@ -1,260 +0,0 @@
|
|
1
|
-
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
2
|
-
/*
|
3
|
-
Copyright (C) 2009 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
|
-
|
19
|
-
#include "rb-grn.h"
|
20
|
-
|
21
|
-
/*
|
22
|
-
* Document-class: Groonga::Query
|
23
|
-
*
|
24
|
-
* インデックスを用いた検索用のクエリのためのオブジェクト。
|
25
|
-
* Groonga::IndexColumn#searchに渡すことができる。(このクラ
|
26
|
-
* スは非推奨で、代わりにGroonga::Expressionを使用すること)
|
27
|
-
*
|
28
|
-
*/
|
29
|
-
|
30
|
-
#define SELF(object) (rb_rb_grn_query_from_ruby_object(object))
|
31
|
-
|
32
|
-
typedef struct _RbGrnQuery RbGrnQuery;
|
33
|
-
struct _RbGrnQuery
|
34
|
-
{
|
35
|
-
grn_ctx *context;
|
36
|
-
grn_query *query;
|
37
|
-
grn_bool owner;
|
38
|
-
};
|
39
|
-
|
40
|
-
VALUE rb_cGrnQuery;
|
41
|
-
|
42
|
-
static RbGrnQuery *
|
43
|
-
rb_rb_grn_query_from_ruby_object (VALUE object)
|
44
|
-
{
|
45
|
-
RbGrnQuery *rb_grn_query;
|
46
|
-
|
47
|
-
if (!RVAL2CBOOL(rb_obj_is_kind_of(object, rb_cGrnQuery))) {
|
48
|
-
rb_raise(rb_eTypeError, "not a groonga query");
|
49
|
-
}
|
50
|
-
|
51
|
-
Data_Get_Struct(object, RbGrnQuery, rb_grn_query);
|
52
|
-
if (!rb_grn_query)
|
53
|
-
rb_raise(rb_eGrnError, "groonga query is NULL");
|
54
|
-
|
55
|
-
return rb_grn_query;
|
56
|
-
}
|
57
|
-
|
58
|
-
grn_query *
|
59
|
-
rb_grn_query_from_ruby_object (VALUE object)
|
60
|
-
{
|
61
|
-
if (NIL_P(object))
|
62
|
-
return NULL;
|
63
|
-
|
64
|
-
return SELF(object)->query;
|
65
|
-
}
|
66
|
-
|
67
|
-
static void
|
68
|
-
rb_rb_grn_query_free (void *object)
|
69
|
-
{
|
70
|
-
RbGrnQuery *rb_grn_query = object;
|
71
|
-
|
72
|
-
if (rb_grn_query->owner && rb_grn_query->context && rb_grn_query->query)
|
73
|
-
grn_query_close(rb_grn_query->context, rb_grn_query->query);
|
74
|
-
|
75
|
-
xfree(object);
|
76
|
-
}
|
77
|
-
|
78
|
-
VALUE
|
79
|
-
rb_grn_query_to_ruby_object (grn_ctx *context, grn_query *query)
|
80
|
-
{
|
81
|
-
RbGrnQuery *rb_grn_query;
|
82
|
-
|
83
|
-
if (!query)
|
84
|
-
return Qnil;
|
85
|
-
|
86
|
-
rb_grn_query = ALLOC(RbGrnQuery);
|
87
|
-
rb_grn_query->context = context;
|
88
|
-
rb_grn_query->query = query;
|
89
|
-
rb_grn_query->owner = GRN_FALSE;
|
90
|
-
|
91
|
-
return Data_Wrap_Struct(rb_cGrnQuery, NULL,
|
92
|
-
rb_rb_grn_query_free, rb_grn_query);
|
93
|
-
}
|
94
|
-
|
95
|
-
static VALUE
|
96
|
-
rb_grn_query_alloc (VALUE klass)
|
97
|
-
{
|
98
|
-
return Data_Wrap_Struct(klass, NULL, rb_rb_grn_query_free, NULL);
|
99
|
-
}
|
100
|
-
|
101
|
-
grn_operator
|
102
|
-
rb_grn_operator_from_ruby_object (VALUE rb_operator)
|
103
|
-
{
|
104
|
-
grn_operator operator = GRN_OP_OR;
|
105
|
-
|
106
|
-
if (NIL_P(rb_operator) ||
|
107
|
-
rb_grn_equal_option(rb_operator, "or") ||
|
108
|
-
rb_grn_equal_option(rb_operator, "||")) {
|
109
|
-
operator = GRN_OP_OR;
|
110
|
-
} else if (rb_grn_equal_option(rb_operator, "and") ||
|
111
|
-
rb_grn_equal_option(rb_operator, "+") ||
|
112
|
-
rb_grn_equal_option(rb_operator, "&&")) {
|
113
|
-
operator = GRN_OP_AND;
|
114
|
-
} else if (rb_grn_equal_option(rb_operator, "but") ||
|
115
|
-
rb_grn_equal_option(rb_operator, "not") ||
|
116
|
-
rb_grn_equal_option(rb_operator, "-")) {
|
117
|
-
operator = GRN_OP_BUT;
|
118
|
-
} else if (rb_grn_equal_option(rb_operator, "adjust") ||
|
119
|
-
rb_grn_equal_option(rb_operator, ">")) {
|
120
|
-
operator = GRN_OP_ADJUST;
|
121
|
-
} else {
|
122
|
-
rb_raise(rb_eArgError,
|
123
|
-
"operator should be one of "
|
124
|
-
"[:or, :||, :and, :+, :&&, :but, :not, :-, :adjust, :>]: <%s>",
|
125
|
-
rb_grn_inspect(rb_operator));
|
126
|
-
}
|
127
|
-
|
128
|
-
return operator;
|
129
|
-
}
|
130
|
-
|
131
|
-
/*
|
132
|
-
* call-seq:
|
133
|
-
* query.new(string, options={})
|
134
|
-
*
|
135
|
-
* _string_ をパースした上で、クエリを作成する。作成されたオ
|
136
|
-
* ブジェクトはGroonga::IndexColumn#searchに渡すことで使用す
|
137
|
-
* ることができる。
|
138
|
-
*
|
139
|
-
* _options_ に指定可能な値は以下の通り。
|
140
|
-
* @param options [::Hash] The name and value
|
141
|
-
* pairs. Omitted names are initialized as the default value.
|
142
|
-
* @option options :context (Groonga::Context.default) The context
|
143
|
-
* クエリが利用するGroonga::Context。
|
144
|
-
*
|
145
|
-
* @option options :default_operator The default_operator
|
146
|
-
* 演算子の既定値(演算子を省略した場合にどの演算を行うか)
|
147
|
-
* を指定する。
|
148
|
-
*
|
149
|
-
* [Groonga::Operator::OR]
|
150
|
-
* [Groonga::Operator::AND]
|
151
|
-
* [Groonga::Operator::BUT]
|
152
|
-
* [Groonga::Operator::ADJUST]
|
153
|
-
* (FIXME: 挙動の違いを検証する必要性あり?
|
154
|
-
* Groonga::Expressionとの関連性は?)
|
155
|
-
*
|
156
|
-
* @option options :max_expressions
|
157
|
-
* 検索クエリに指定する式の最大値を指定する。
|
158
|
-
*/
|
159
|
-
static VALUE
|
160
|
-
rb_grn_query_initialize (int argc, VALUE *argv, VALUE self)
|
161
|
-
{
|
162
|
-
RbGrnQuery *rb_grn_query;
|
163
|
-
grn_ctx *context = NULL;
|
164
|
-
grn_query *query;
|
165
|
-
char *query_string;
|
166
|
-
unsigned int query_string_length;
|
167
|
-
grn_operator default_operator;
|
168
|
-
int max_expressions = RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS;
|
169
|
-
VALUE rb_query_string, options, rb_context, rb_default_operator;
|
170
|
-
VALUE rb_max_expressions;
|
171
|
-
|
172
|
-
rb_scan_args(argc, argv, "11", &rb_query_string, &options);
|
173
|
-
|
174
|
-
query_string = StringValuePtr(rb_query_string);
|
175
|
-
query_string_length = RSTRING_LEN(rb_query_string);
|
176
|
-
|
177
|
-
rb_grn_scan_options(options,
|
178
|
-
"context", &rb_context,
|
179
|
-
"default_operator", &rb_default_operator,
|
180
|
-
"max_expressions", &rb_max_expressions,
|
181
|
-
NULL);
|
182
|
-
|
183
|
-
context = rb_grn_context_ensure(&rb_context);
|
184
|
-
|
185
|
-
default_operator = RVAL2GRNOPERATOR(rb_default_operator);
|
186
|
-
|
187
|
-
if (!NIL_P(rb_max_expressions))
|
188
|
-
max_expressions = NUM2INT(rb_max_expressions);
|
189
|
-
|
190
|
-
query = grn_query_open(context, query_string, query_string_length,
|
191
|
-
default_operator, max_expressions);
|
192
|
-
rb_grn_context_check(context, rb_ary_new4(argc, argv));
|
193
|
-
|
194
|
-
rb_grn_query = ALLOC(RbGrnQuery);
|
195
|
-
DATA_PTR(self) = rb_grn_query;
|
196
|
-
rb_grn_query->context = context;
|
197
|
-
rb_grn_query->query = query;
|
198
|
-
rb_grn_query->owner = GRN_TRUE;
|
199
|
-
|
200
|
-
rb_iv_set(self, "@context", rb_context);
|
201
|
-
|
202
|
-
return Qnil;
|
203
|
-
}
|
204
|
-
|
205
|
-
/*
|
206
|
-
* call-seq:
|
207
|
-
* query.close
|
208
|
-
*
|
209
|
-
* _query_ が使用しているリソースを開放する。これ以降 _query_ を
|
210
|
-
* 使うことはできない。
|
211
|
-
*/
|
212
|
-
static VALUE
|
213
|
-
rb_grn_query_close (VALUE self)
|
214
|
-
{
|
215
|
-
RbGrnQuery *rb_grn_query;
|
216
|
-
|
217
|
-
rb_grn_query = SELF(self);
|
218
|
-
if (rb_grn_query->context && rb_grn_query->query) {
|
219
|
-
grn_rc rc;
|
220
|
-
|
221
|
-
rc = grn_query_close(rb_grn_query->context, rb_grn_query->query);
|
222
|
-
rb_grn_query->context = NULL;
|
223
|
-
rb_grn_query->query = NULL;
|
224
|
-
rb_grn_rc_check(rc, self);
|
225
|
-
}
|
226
|
-
return Qnil;
|
227
|
-
}
|
228
|
-
|
229
|
-
/*
|
230
|
-
* call-seq:
|
231
|
-
* query.closed? -> true/false
|
232
|
-
*
|
233
|
-
* _query_ が開放済みの場合は +true+ を返し、そうでない場合は
|
234
|
-
* +false+ を返す。
|
235
|
-
*/
|
236
|
-
static VALUE
|
237
|
-
rb_grn_query_closed_p (VALUE self)
|
238
|
-
{
|
239
|
-
RbGrnQuery *rb_grn_query;
|
240
|
-
|
241
|
-
rb_grn_query = SELF(self);
|
242
|
-
if (rb_grn_query->context && rb_grn_query->query)
|
243
|
-
return Qfalse;
|
244
|
-
else
|
245
|
-
return Qtrue;
|
246
|
-
}
|
247
|
-
|
248
|
-
void
|
249
|
-
rb_grn_init_query (VALUE mGrn)
|
250
|
-
{
|
251
|
-
rb_cGrnQuery = rb_define_class_under(mGrn, "Query", rb_cObject);
|
252
|
-
rb_define_alloc_func(rb_cGrnQuery, rb_grn_query_alloc);
|
253
|
-
|
254
|
-
rb_define_method(rb_cGrnQuery, "initialize",
|
255
|
-
rb_grn_query_initialize, -1);
|
256
|
-
rb_define_method(rb_cGrnQuery, "close",
|
257
|
-
rb_grn_query_close, 0);
|
258
|
-
rb_define_method(rb_cGrnQuery, "closed?",
|
259
|
-
rb_grn_query_closed_p, 0);
|
260
|
-
}
|
data/test/test-query.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
2
|
-
#
|
3
|
-
# This library is free software; you can redistribute it and/or
|
4
|
-
# modify it under the terms of the GNU Lesser General Public
|
5
|
-
# License version 2.1 as published by the Free Software Foundation.
|
6
|
-
#
|
7
|
-
# This library is distributed in the hope that it will be useful,
|
8
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
9
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
10
|
-
# Lesser General Public License for more details.
|
11
|
-
#
|
12
|
-
# You should have received a copy of the GNU Lesser General Public
|
13
|
-
# License along with this library; if not, write to the Free Software
|
14
|
-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
|
-
|
16
|
-
class QueryTest < Test::Unit::TestCase
|
17
|
-
include GroongaTestUtils
|
18
|
-
|
19
|
-
def test_new
|
20
|
-
Groonga::Query.new("groonga text")
|
21
|
-
end
|
22
|
-
end
|