rroonga 2.0.8-x86-mingw32 → 2.1.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +2 -2
- data/bin/groonga-index-dump +47 -0
- data/doc/text/news.textile +733 -0
- data/doc/text/tutorial.textile +535 -0
- data/example/bookmark.rb +1 -1
- data/ext/groonga/rb-grn-database.c +21 -24
- data/ext/groonga/rb-grn-double-array-trie.c +50 -58
- data/ext/groonga/rb-grn-exception.c +18 -1
- data/ext/groonga/rb-grn-hash.c +18 -3
- data/ext/groonga/rb-grn-index-column.c +50 -2
- data/ext/groonga/rb-grn-normalizer.c +83 -0
- data/ext/groonga/rb-grn-object.c +18 -14
- data/ext/groonga/rb-grn-patricia-trie.c +17 -2
- data/ext/groonga/rb-grn-query-logger.c +263 -0
- data/ext/groonga/rb-grn-snippet.c +6 -0
- data/ext/groonga/rb-grn-table-key-support.c +204 -13
- data/ext/groonga/rb-grn-table.c +124 -46
- data/ext/groonga/rb-grn.h +14 -3
- data/ext/groonga/rb-groonga.c +2 -0
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga.rb +2 -1
- data/lib/groonga/database.rb +7 -0
- data/lib/groonga/dumper.rb +21 -2
- data/lib/groonga/index-column.rb +170 -0
- data/lib/groonga/query-logger.rb +129 -0
- data/lib/groonga/record.rb +32 -8
- data/lib/groonga/schema.rb +231 -288
- data/rroonga-build.rb +2 -2
- data/rroonga.gemspec +11 -7
- data/test/groonga-test-utils.rb +18 -6
- data/test/test-hash.rb +49 -20
- data/test/test-index-cursor.rb +4 -4
- data/{Gemfile → test/test-normalizer.rb} +9 -5
- data/test/test-pagination.rb +1 -1
- data/test/test-patricia-trie.rb +8 -0
- data/test/test-schema.rb +16 -13
- data/test/test-snippet.rb +5 -0
- data/test/test-table.rb +24 -12
- data/test/test-view.rb +0 -1
- data/vendor/local/bin/groonga-benchmark.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/libmsgpack-3.dll +0 -0
- data/vendor/local/bin/libmsgpackc-2.dll +0 -0
- data/vendor/local/bin/mecab-config +2 -2
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +2 -2
- data/vendor/local/include/groonga/groonga.h +25 -14
- data/vendor/local/include/groonga/groonga/normalizer.h +55 -0
- data/vendor/local/include/groonga/groonga/tokenizer.h +33 -13
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/query_expanders/tsv.la +2 -2
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.la +2 -2
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +2 -2
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +2 -2
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +1 -1
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +1 -1
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +1 -1
- data/vendor/local/lib/pkgconfig/groonga.pc +3 -3
- 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/sbin/groonga-httpd-restart +9 -3
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +59 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +0 -12
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +3 -3
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/index.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/install.html +10 -11
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/install/mac_os_x.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/others.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/solaris.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/ubuntu.html +16 -53
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/en/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/news.html +146 -82
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/type.html +5 -5
- 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/server.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +8 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +265 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +59 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +0 -12
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +2 -2
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/community.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/index.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/install.html +10 -11
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +16 -51
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +16 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +126 -82
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/type.html +5 -5
- 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/server.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +259 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-data-with-three-relationship.log +23 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-data.log +16 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-schema-with-three-relationship.log +30 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-schema.log +20 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-select-with-three-relationship.log +86 -0
- data/vendor/local/share/doc/groonga/source/example/tutorial/match_columns-nested-index-select.log +41 -0
- data/vendor/local/share/doc/groonga/source/install/centos.txt +6 -6
- data/vendor/local/share/doc/groonga/source/install/debian.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/fedora.txt +4 -4
- data/vendor/local/share/doc/groonga/source/install/mac_os_x.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/others.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/solaris.txt +3 -3
- data/vendor/local/share/doc/groonga/source/install/ubuntu.txt +3 -42
- data/vendor/local/share/doc/groonga/source/install/windows.txt +16 -16
- data/vendor/local/share/doc/groonga/source/news.txt +59 -0
- data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +129 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +338 -93
- data/vendor/local/share/man/man1/groonga.1 +341 -92
- metadata +1258 -1242
- data/AUTHORS +0 -5
- data/Rakefile +0 -203
- data/bin/groonga-query-log-extract +0 -117
data/example/bookmark.rb
CHANGED
@@ -234,18 +234,16 @@ rb_grn_database_s_create (int argc, VALUE *argv, VALUE klass)
|
|
234
234
|
* る。
|
235
235
|
*
|
236
236
|
* @overload new(path, options=nil)
|
237
|
-
*
|
238
|
-
*
|
239
|
-
*
|
240
|
-
*
|
241
|
-
*
|
237
|
+
* @!macro [new] database.new.arguments
|
238
|
+
* @param options [::Hash] The name and value
|
239
|
+
* pairs. Omitted names are initialized as the default value.
|
240
|
+
* @option options :context (Groonga::Context.default)
|
241
|
+
* データベースを結びつけるコンテキスト。省略すると
|
242
|
+
* {Groonga::Context.default} を利用する。
|
243
|
+
* @!macro database.new.arguments
|
242
244
|
* @return [Groonga::Database]
|
243
245
|
* @overload new(path, options=nil)
|
244
|
-
*
|
245
|
-
* pairs. Omitted names are initialized as the default value.
|
246
|
-
* @option options :context (Groonga::Context.default)
|
247
|
-
* データベースを結びつけるコンテキスト。省略すると
|
248
|
-
* {Groonga::Context.default} を利用する。
|
246
|
+
* @!macro database.new.arguments
|
249
247
|
* @yield [database]
|
250
248
|
* @yieldparam [Groonga::Database] database 開いたデータベース
|
251
249
|
*/
|
@@ -290,13 +288,14 @@ rb_grn_database_initialize (int argc, VALUE *argv, VALUE self)
|
|
290
288
|
* @return [Groonga::Database]
|
291
289
|
* @param options [::Hash] The name and value
|
292
290
|
* pairs. Omitted names are initialized as the default value.
|
293
|
-
*
|
294
|
-
*
|
291
|
+
* @!macro [new] database.open.context
|
292
|
+
* @option options :context (Groonga::Context.default) The context
|
293
|
+
* データベースを結びつけるコンテキスト。
|
294
|
+
* @!macro database.open.context
|
295
295
|
* @overload open(path, options=nil)
|
296
296
|
* @param options [::Hash] The name and value
|
297
297
|
* pairs. Omitted names are initialized as the default value.
|
298
|
-
*
|
299
|
-
* データベースを結びつけるコンテキスト。
|
298
|
+
* @!macro database.open.context
|
300
299
|
* @yield [database]
|
301
300
|
* @yieldparam [Groonga::Database] database 開いたデータベース
|
302
301
|
*/
|
@@ -442,18 +441,16 @@ rb_grn_database_unlock (VALUE self)
|
|
442
441
|
* {Groonga::ResourceDeadlockAvoided} 例外が発生する。
|
443
442
|
*
|
444
443
|
* @overload lock(options={})
|
445
|
-
*
|
446
|
-
*
|
447
|
-
*
|
448
|
-
*
|
449
|
-
*
|
444
|
+
* @!macro [new] database.lock.arguments
|
445
|
+
* @param [::Hash] options 利用可能なオプションは以下の通り。
|
446
|
+
* @option options :timeout
|
447
|
+
* ロックを獲得できなかった場合は _:timeout_ 秒間ロックの獲
|
448
|
+
* 得を試みる。 _:timeout_ 秒以内にロックを獲得できなかった
|
449
|
+
* 場合は例外が発生する。
|
450
|
+
* @!macro database.lock.arguments
|
450
451
|
* @overload lock(options={})
|
451
452
|
* @yield ブロックを指定した場合はブロックを抜けたときにunlockする。
|
452
|
-
*
|
453
|
-
* @option options :timeout
|
454
|
-
* ロックを獲得できなかった場合は _:timeout_秒間ロックの獲
|
455
|
-
* 得を試みる。 _:timeout_秒以内にロックを獲得できなかった
|
456
|
-
* 場合は例外が発生する。
|
453
|
+
* @!macro database.lock.arguments
|
457
454
|
*/
|
458
455
|
static VALUE
|
459
456
|
rb_grn_database_lock (int argc, VALUE *argv, VALUE self)
|
@@ -112,8 +112,12 @@ VALUE rb_cGrnDoubleArrayTrie;
|
|
112
112
|
* 場合は自動的にパスが付加される。 +:context+ で指定した
|
113
113
|
* {Groonga::Context} に結びついているデータベースが一時デー
|
114
114
|
* タベースの場合は例外が発生する。
|
115
|
-
*
|
116
|
-
*
|
115
|
+
*
|
116
|
+
* @option options :key_normalize (false) Keys are normalized
|
117
|
+
* if this value is @true@.
|
118
|
+
*
|
119
|
+
* @deprecated Use @:normalizer => "NormalizerAuto"@ instead.
|
120
|
+
*
|
117
121
|
* @option options :key_with_sis
|
118
122
|
* +true+ を指定するとキーの文字列の全suffixが自動的に登
|
119
123
|
* 録される。
|
@@ -145,10 +149,17 @@ VALUE rb_cGrnDoubleArrayTrie;
|
|
145
149
|
* デフォルトでは何も設定されていないので、テーブルに
|
146
150
|
* {Groonga::IndexColumn} を定義する場合は
|
147
151
|
* @"TokenBigram"@ などを指定する必要がある。
|
152
|
+
*
|
148
153
|
* @option options :sub_records
|
149
154
|
* +true+ を指定すると {#group} でグループ化したときに、
|
150
155
|
* {Groonga::Record#n_sub_records} でグループに含まれるレコー
|
151
156
|
* ドの件数を取得できる。
|
157
|
+
*
|
158
|
+
* @option options [String, Groonga::Procedure, nil] :normalizer
|
159
|
+
* The normalizer that is used by {Groonga::IndexColumn}. You
|
160
|
+
* can specify this by normalizer name as String such as
|
161
|
+
* @"NormalizerAuto"@ or normalizer object.
|
162
|
+
*
|
152
163
|
* @!macro double-array-trie.create.options
|
153
164
|
* @overload create(options={})
|
154
165
|
* @yield [table]
|
@@ -167,6 +178,7 @@ rb_grn_double_array_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
167
178
|
VALUE rb_key_normalize, rb_key_with_sis, rb_key_type;
|
168
179
|
VALUE rb_value_type;
|
169
180
|
VALUE rb_default_tokenizer, rb_sub_records;
|
181
|
+
VALUE rb_normalizer;
|
170
182
|
|
171
183
|
rb_scan_args(argc, argv, "01", &options);
|
172
184
|
|
@@ -181,6 +193,7 @@ rb_grn_double_array_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
181
193
|
"value_type", &rb_value_type,
|
182
194
|
"default_tokenizer", &rb_default_tokenizer,
|
183
195
|
"sub_records", &rb_sub_records,
|
196
|
+
"normalizer", &rb_normalizer,
|
184
197
|
NULL);
|
185
198
|
|
186
199
|
context = rb_grn_context_ensure(&rb_context);
|
@@ -227,6 +240,10 @@ rb_grn_double_array_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
227
240
|
rb_funcall(rb_table, rb_intern("default_tokenizer="), 1,
|
228
241
|
rb_default_tokenizer);
|
229
242
|
|
243
|
+
if (!NIL_P(rb_normalizer))
|
244
|
+
rb_funcall(rb_table, rb_intern("normalizer="), 1,
|
245
|
+
rb_normalizer);
|
246
|
+
|
230
247
|
if (rb_block_given_p())
|
231
248
|
return rb_ensure(rb_yield, rb_table, rb_grn_object_close, rb_table);
|
232
249
|
else
|
@@ -427,64 +444,39 @@ rb_grn_double_array_trie_open_grn_prefix_cursor (int argc, VALUE *argv,
|
|
427
444
|
*
|
428
445
|
* @overload open_prefix_cursor(prefix, options={})
|
429
446
|
* @return [Groonga::DoubleArrayTrieCursor]
|
430
|
-
*
|
431
|
-
*
|
432
|
-
*
|
433
|
-
*
|
434
|
-
*
|
435
|
-
*
|
436
|
-
*
|
437
|
-
*
|
438
|
-
*
|
439
|
-
*
|
440
|
-
*
|
441
|
-
*
|
442
|
-
*
|
443
|
-
*
|
444
|
-
*
|
445
|
-
*
|
446
|
-
*
|
447
|
-
*
|
448
|
-
*
|
449
|
-
*
|
450
|
-
*
|
451
|
-
*
|
452
|
-
*
|
453
|
-
*
|
454
|
-
*
|
455
|
-
*
|
456
|
-
*
|
457
|
-
*
|
447
|
+
* @!macro [new] double_array_trie.open_prefix_cursor.arguments
|
448
|
+
* @param [String] prefix 前方一致させる値
|
449
|
+
* @param options [::Hash] The name and value
|
450
|
+
* pairs. Omitted names are initialized as the default value.
|
451
|
+
* @option options :key_bytes
|
452
|
+
* _prefix_ のサイズ(byte)
|
453
|
+
* @option options :key_bits
|
454
|
+
* _prefix_ のサイズ(bit)
|
455
|
+
* @option options :offset
|
456
|
+
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
457
|
+
* からレコードを取り出す。
|
458
|
+
* @option options :limit
|
459
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
460
|
+
* 省略された場合または-1が指定された場合は、全件が指定され
|
461
|
+
* たものとみなす。
|
462
|
+
* @option options :order
|
463
|
+
* +:asc+ または +:ascending+ を指定すると昇順にレコードを取
|
464
|
+
* り出す。
|
465
|
+
* +:desc+ または +:descending+ を指定すると降順にレコードを
|
466
|
+
* 取り出す。
|
467
|
+
* @option options :order_by (:id)
|
468
|
+
* +:id+ を指定するとID順にレコードを取り出す。(デフォルト)
|
469
|
+
* +:key+指定するとキー順にレコードを取り出す。
|
470
|
+
* @option options :greater_than
|
471
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
472
|
+
* 範囲に含まない。
|
473
|
+
* @option options :less_than
|
474
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
475
|
+
* 範囲に含まない。
|
476
|
+
* @!macro double_array_trie.open_prefix_cursor.arguments
|
458
477
|
* @overload open_prefix_cursor(prefix, options={})
|
459
478
|
* @yield [cursor]
|
460
|
-
*
|
461
|
-
* @param options [::Hash] The name and value
|
462
|
-
* pairs. Omitted names are initialized as the default value.
|
463
|
-
* @option options :key_bytes
|
464
|
-
* _prefix_ のサイズ(byte)
|
465
|
-
* @option options :key_bits
|
466
|
-
* _prefix_ のサイズ(bit)
|
467
|
-
* @option options :offset
|
468
|
-
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
469
|
-
* からレコードを取り出す。
|
470
|
-
* @option options :limit
|
471
|
-
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
472
|
-
* 省略された場合または-1が指定された場合は、全件が指定され
|
473
|
-
* たものとみなす。
|
474
|
-
* @option options :order
|
475
|
-
* +:asc+ または +:ascending+ を指定すると昇順にレコードを取
|
476
|
-
* り出す。
|
477
|
-
* +:desc+ または +:descending+ を指定すると降順にレコードを
|
478
|
-
* 取り出す。
|
479
|
-
* @option options :order_by (:id)
|
480
|
-
* +:id+ を指定するとID順にレコードを取り出す。(デフォルト)
|
481
|
-
* +:key+指定するとキー順にレコードを取り出す。
|
482
|
-
* @option options :greater_than
|
483
|
-
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
484
|
-
* 範囲に含まない。
|
485
|
-
* @option options :less_than
|
486
|
-
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
487
|
-
* 範囲に含まない。
|
479
|
+
* @!macro double_array_trie.open_prefix_cursor.arguments
|
488
480
|
*/
|
489
481
|
static VALUE
|
490
482
|
rb_grn_double_array_trie_open_prefix_cursor (int argc, VALUE *argv, VALUE self)
|
@@ -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
|
@@ -94,6 +94,7 @@ static VALUE eGrnTooLargeOffset;
|
|
94
94
|
static VALUE eGrnTooSmallLimit;
|
95
95
|
static VALUE eGrnCASError;
|
96
96
|
static VALUE eGrnUnsupportedCommandVersion;
|
97
|
+
static VALUE eGrnNormalizerError;
|
97
98
|
|
98
99
|
VALUE
|
99
100
|
rb_grn_rc_to_exception (grn_rc rc)
|
@@ -320,6 +321,9 @@ rb_grn_rc_to_exception (grn_rc rc)
|
|
320
321
|
case GRN_UNSUPPORTED_COMMAND_VERSION:
|
321
322
|
exception = eGrnUnsupportedCommandVersion;
|
322
323
|
break;
|
324
|
+
case GRN_NORMALIZER_ERROR:
|
325
|
+
exception = eGrnNormalizerError;
|
326
|
+
break;
|
323
327
|
}
|
324
328
|
|
325
329
|
if (NIL_P(exception))
|
@@ -553,6 +557,9 @@ rb_grn_rc_to_message (grn_rc rc)
|
|
553
557
|
case GRN_UNSUPPORTED_COMMAND_VERSION:
|
554
558
|
message = "unsupported command version";
|
555
559
|
break;
|
560
|
+
case GRN_NORMALIZER_ERROR:
|
561
|
+
message = "normalizer error";
|
562
|
+
break;
|
556
563
|
}
|
557
564
|
|
558
565
|
if (!message)
|
@@ -1192,4 +1199,14 @@ rb_grn_init_exception (VALUE mGrn)
|
|
1192
1199
|
*/
|
1193
1200
|
eGrnUnsupportedCommandVersion =
|
1194
1201
|
rb_define_class_under(mGrn, "UnsupportedCommandVersion", rb_eGrnError);
|
1202
|
+
|
1203
|
+
/*
|
1204
|
+
* Document-class: Groonga::NormalizerError
|
1205
|
+
*
|
1206
|
+
* It is used when a normalizer causes an error.
|
1207
|
+
*
|
1208
|
+
* @since 2.1.0
|
1209
|
+
*/
|
1210
|
+
eGrnNormalizerError =
|
1211
|
+
rb_define_class_under(mGrn, "NormalizerError", rb_eGrnError);
|
1195
1212
|
}
|
data/ext/groonga/rb-grn-hash.c
CHANGED
@@ -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
|
@@ -97,8 +97,12 @@ VALUE rb_cGrnHash;
|
|
97
97
|
* 場合は自動的にパスが付加される。 +:context+ で指定した
|
98
98
|
* {Groonga::Context} に結びついているデータベースが一時デー
|
99
99
|
* タベースの場合は例外が発生する。
|
100
|
-
*
|
101
|
-
*
|
100
|
+
*
|
101
|
+
* @option options :key_normalize (false) Keys are normalized
|
102
|
+
* if this value is @true@.
|
103
|
+
*
|
104
|
+
* @deprecated Use @:normalizer => "NormalizerAuto"@ instead.
|
105
|
+
*
|
102
106
|
* @option options :key_type
|
103
107
|
* キーの種類を示すオブジェクトを指定する。キーの種類には型
|
104
108
|
* 名("Int32"や"ShortText"など)または {Groonga::Type} または
|
@@ -131,6 +135,12 @@ VALUE rb_cGrnHash;
|
|
131
135
|
* +true+ を指定すると {#group} でグループ化したときに、
|
132
136
|
* {Groonga::Record#n_sub_records} でグループに含まれるレコー
|
133
137
|
* ドの件数を取得できる。
|
138
|
+
*
|
139
|
+
* @option options [String, Groonga::Procedure, nil] :normalizer
|
140
|
+
* The normalizer that is used by {Groonga::IndexColumn}. You
|
141
|
+
* can specify this by normalizer name as String such as
|
142
|
+
* @"NormalizerAuto"@ or normalizer object.
|
143
|
+
*
|
134
144
|
* @!macro hash.create.options
|
135
145
|
* @overload create(options={})
|
136
146
|
* @yield [table]
|
@@ -148,6 +158,7 @@ rb_grn_hash_s_create (int argc, VALUE *argv, VALUE klass)
|
|
148
158
|
VALUE options, rb_context, rb_name, rb_path, rb_persistent;
|
149
159
|
VALUE rb_key_normalize, rb_key_type, rb_value_type, rb_default_tokenizer;
|
150
160
|
VALUE rb_sub_records;
|
161
|
+
VALUE rb_normalizer;
|
151
162
|
|
152
163
|
rb_scan_args(argc, argv, "01", &options);
|
153
164
|
|
@@ -161,6 +172,7 @@ rb_grn_hash_s_create (int argc, VALUE *argv, VALUE klass)
|
|
161
172
|
"value_type", &rb_value_type,
|
162
173
|
"default_tokenizer", &rb_default_tokenizer,
|
163
174
|
"sub_records", &rb_sub_records,
|
175
|
+
"normalizer", &rb_normalizer,
|
164
176
|
NULL);
|
165
177
|
|
166
178
|
context = rb_grn_context_ensure(&rb_context);
|
@@ -203,6 +215,9 @@ rb_grn_hash_s_create (int argc, VALUE *argv, VALUE klass)
|
|
203
215
|
if (!NIL_P(rb_default_tokenizer))
|
204
216
|
rb_funcall(rb_table, rb_intern("default_tokenizer="), 1,
|
205
217
|
rb_default_tokenizer);
|
218
|
+
if (!NIL_P(rb_normalizer))
|
219
|
+
rb_funcall(rb_table, rb_intern("normalizer="), 1,
|
220
|
+
rb_normalizer);
|
206
221
|
|
207
222
|
if (rb_block_given_p())
|
208
223
|
return rb_ensure(rb_yield, rb_table, rb_grn_object_close, rb_table);
|
@@ -535,8 +535,27 @@ rb_grn_index_column_with_position_p (VALUE self)
|
|
535
535
|
return CBOOL2RVAL(column->header.flags & GRN_OBJ_WITH_POSITION);
|
536
536
|
}
|
537
537
|
|
538
|
+
/*
|
539
|
+
* Opens cursor to iterate posting in the index column.
|
540
|
+
*
|
541
|
+
* @example
|
542
|
+
* # TODO
|
543
|
+
*
|
544
|
+
* @overload open_cursor(table_cursor, options={})
|
545
|
+
* @param [TableCursor] The table cursor for table of the index column.
|
546
|
+
* @param [::Hash] options
|
547
|
+
* @option options [Boolean] :with_section (nil)
|
548
|
+
* Includes section info the posting. It is enabled by default if
|
549
|
+
* the index column is created with @:with_section@ flag.
|
550
|
+
* @option options [Boolean] :with_weight (nil)
|
551
|
+
* Includes weight info the posting. It is enabled by default if
|
552
|
+
* the index column is created with @:with_weight@ flag.
|
553
|
+
* @option options [Boolean] :with_position (nil)
|
554
|
+
* Includes position info the posting. It is enabled by default if
|
555
|
+
* the index column is created with @:with_position@ flag.
|
556
|
+
*/
|
538
557
|
static VALUE
|
539
|
-
rb_grn_index_column_open_cursor (VALUE
|
558
|
+
rb_grn_index_column_open_cursor (int argc, VALUE *argv, VALUE self)
|
540
559
|
{
|
541
560
|
grn_ctx *context;
|
542
561
|
grn_obj *column;
|
@@ -546,6 +565,9 @@ rb_grn_index_column_open_cursor (VALUE self, VALUE rb_table_cursor)
|
|
546
565
|
grn_id rid_max = GRN_ID_MAX;
|
547
566
|
int flags = 0;
|
548
567
|
grn_obj *index_cursor;
|
568
|
+
VALUE rb_table_cursor;
|
569
|
+
VALUE options;
|
570
|
+
VALUE rb_with_section, rb_with_weight, rb_with_position;
|
549
571
|
VALUE rb_table;
|
550
572
|
VALUE rb_lexicon;
|
551
573
|
VALUE rb_cursor;
|
@@ -555,10 +577,36 @@ rb_grn_index_column_open_cursor (VALUE self, VALUE rb_table_cursor)
|
|
555
577
|
NULL, NULL,
|
556
578
|
NULL, &range_object,
|
557
579
|
NULL, NULL);
|
580
|
+
|
581
|
+
rb_scan_args(argc, argv, "11", &rb_table_cursor, &options);
|
582
|
+
rb_grn_scan_options(options,
|
583
|
+
"with_section", &rb_with_section,
|
584
|
+
"with_weight", &rb_with_weight,
|
585
|
+
"with_position", &rb_with_position,
|
586
|
+
NULL);
|
587
|
+
|
558
588
|
table_cursor = RVAL2GRNTABLECURSOR(rb_table_cursor, NULL);
|
559
589
|
rb_table = GRNOBJECT2RVAL(Qnil, context, range_object, GRN_FALSE);
|
560
590
|
rb_lexicon = rb_iv_get(rb_table_cursor, "@table");
|
561
591
|
|
592
|
+
if (NIL_P(rb_with_section)) {
|
593
|
+
flags |= column->header.flags & GRN_OBJ_WITH_SECTION;
|
594
|
+
} else if (RVAL2CBOOL(rb_with_section)) {
|
595
|
+
flags |= GRN_OBJ_WITH_SECTION;
|
596
|
+
}
|
597
|
+
|
598
|
+
if (NIL_P(rb_with_weight)) {
|
599
|
+
flags |= column->header.flags & GRN_OBJ_WITH_WEIGHT;
|
600
|
+
} else if (RVAL2CBOOL(rb_with_weight)) {
|
601
|
+
flags |= GRN_OBJ_WITH_WEIGHT;
|
602
|
+
}
|
603
|
+
|
604
|
+
if (NIL_P(rb_with_position)) {
|
605
|
+
flags |= column->header.flags & GRN_OBJ_WITH_POSITION;
|
606
|
+
} else if (RVAL2CBOOL(rb_with_position)) {
|
607
|
+
flags |= GRN_OBJ_WITH_POSITION;
|
608
|
+
}
|
609
|
+
|
562
610
|
index_cursor = grn_index_cursor_open(context, table_cursor,
|
563
611
|
column, rid_min, rid_max, flags);
|
564
612
|
|
@@ -596,5 +644,5 @@ rb_grn_init_index_column (VALUE mGrn)
|
|
596
644
|
rb_define_method(rb_cGrnIndexColumn, "with_position?",
|
597
645
|
rb_grn_index_column_with_position_p, 0);
|
598
646
|
rb_define_method(rb_cGrnIndexColumn, "open_cursor",
|
599
|
-
rb_grn_index_column_open_cursor, 1);
|
647
|
+
rb_grn_index_column_open_cursor, -1);
|
600
648
|
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
/* -*- coding: utf-8; c-file-style: "ruby" -*- */
|
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
|
+
|
19
|
+
#include "rb-grn.h"
|
20
|
+
|
21
|
+
#define SELF(object, context) (RVAL2GRNNORMALIZER(object, context))
|
22
|
+
|
23
|
+
VALUE rb_cGrnNormalizer;
|
24
|
+
|
25
|
+
/*
|
26
|
+
* Document-class: Groonga::Normalizer < Groonga::Object
|
27
|
+
*
|
28
|
+
* It normalizes string.
|
29
|
+
*/
|
30
|
+
|
31
|
+
/*
|
32
|
+
* Normalizes the @string@.
|
33
|
+
*
|
34
|
+
* @example
|
35
|
+
* # Normalizes "ABC" with the default normalizer
|
36
|
+
* Groonga::Normalizer.normalize("AbC") # => "abc"
|
37
|
+
*
|
38
|
+
* @overload normalize(string)
|
39
|
+
* @return [String] The normalized string
|
40
|
+
* @param [String] string The original string
|
41
|
+
*/
|
42
|
+
static VALUE
|
43
|
+
rb_grn_normalizer_s_normalize (VALUE klass, VALUE rb_string)
|
44
|
+
{
|
45
|
+
VALUE rb_context = Qnil;
|
46
|
+
VALUE rb_encoded_string;
|
47
|
+
VALUE rb_normalized_string;
|
48
|
+
grn_ctx *context = NULL;
|
49
|
+
grn_obj *grn_string;
|
50
|
+
grn_obj *normalizer = GRN_NORMALIZER_AUTO;
|
51
|
+
/* TODO: make customizable */
|
52
|
+
int flags = GRN_STRING_REMOVE_BLANK;
|
53
|
+
const char *normalized_string;
|
54
|
+
unsigned int normalized_string_length;
|
55
|
+
|
56
|
+
context = rb_grn_context_ensure(&rb_context);
|
57
|
+
rb_encoded_string = rb_grn_context_rb_string_encode(context, rb_string);
|
58
|
+
grn_string = grn_string_open(context,
|
59
|
+
RSTRING_PTR(rb_encoded_string),
|
60
|
+
RSTRING_LEN(rb_encoded_string),
|
61
|
+
normalizer,
|
62
|
+
flags);
|
63
|
+
rb_grn_context_check(context, rb_string);
|
64
|
+
grn_string_get_normalized(context, grn_string,
|
65
|
+
&normalized_string, &normalized_string_length,
|
66
|
+
NULL);
|
67
|
+
rb_normalized_string =
|
68
|
+
rb_grn_context_rb_string_new(context,
|
69
|
+
normalized_string,
|
70
|
+
normalized_string_length);
|
71
|
+
grn_obj_close(context, grn_string);
|
72
|
+
|
73
|
+
return rb_normalized_string;
|
74
|
+
}
|
75
|
+
|
76
|
+
void
|
77
|
+
rb_grn_init_normalizer (VALUE mGrn)
|
78
|
+
{
|
79
|
+
rb_cGrnNormalizer = rb_define_class_under(mGrn, "Normalizer", rb_cObject);
|
80
|
+
|
81
|
+
rb_define_singleton_method(rb_cGrnNormalizer, "normalize",
|
82
|
+
rb_grn_normalizer_s_normalize, 1);
|
83
|
+
}
|