rroonga 4.0.0-x86-mingw32 → 4.0.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +6 -0
- data/doc/text/news.textile +26 -0
- data/ext/groonga/rb-grn-column.c +42 -2
- data/ext/groonga/rb-grn-index-column.c +57 -159
- data/ext/groonga/rb-grn-object.c +7 -0
- data/ext/groonga/rb-grn-table.c +19 -3
- data/ext/groonga/rb-grn-utils.c +4 -1
- data/ext/groonga/rb-grn-variable-size-column.c +405 -5
- data/ext/groonga/rb-grn.h +18 -1
- data/lib/1.9/groonga.so +0 -0
- data/lib/2.0/groonga.so +0 -0
- data/lib/2.1/groonga.so +0 -0
- data/lib/groonga/dumper.rb +46 -22
- data/lib/groonga/expression-builder.rb +2 -4
- data/lib/groonga/schema.rb +16 -234
- data/rroonga-build.rb +3 -3
- data/rroonga.gemspec +1 -1
- data/test/test-array.rb +6 -5
- data/test/test-column.rb +0 -14
- data/test/test-database.rb +6 -5
- data/test/test-double-array-trie.rb +6 -5
- data/test/test-expression.rb +2 -2
- data/test/test-hash.rb +6 -5
- data/test/test-index-column.rb +163 -33
- data/test/test-patricia-trie.rb +6 -5
- data/test/test-schema-dumper.rb +39 -7
- data/test/test-table-dumper.rb +46 -1
- data/test/test-table-select-weight.rb +12 -0
- data/test/test-variable-size-column.rb +87 -3
- 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.exe +0 -0
- data/vendor/local/include/groonga/groonga.h +6 -1
- 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/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/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/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/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +2 -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/install/centos.txt +3 -3
- 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 +3 -3
- 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 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +41 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/column.txt +25 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/columns/vector.txt +333 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/cache_limit.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_create.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_rename.txt +37 -17
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/delete.txt +4 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalize.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +99 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_create.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/truncate.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-httpd.txt +128 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-suggest-learner.txt +11 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +3 -2
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.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/repository.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +68 -67
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/fedora.html +8 -8
- 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 +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +247 -200
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/global_configurations.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/column.html +153 -0
- data/vendor/local/share/doc/groonga/en/html/reference/columns/vector.html +857 -0
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_rename.html +47 -26
- data/vendor/local/share/doc/groonga/en/html/reference/commands/define_selector.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/load.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_level.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_put.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/log_reopen.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +193 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +8 -9
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-server-http.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-create-dataset.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-httpd.html +165 -13
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.html +25 -8
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/reference/function.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +40 -40
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +50 -50
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +46 -46
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +62 -62
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +140 -140
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +24 -24
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/output.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/pseudo_column.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders/tsv.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/reference/query_expanders.html +18 -18
- data/vendor/local/share/doc/groonga/en/html/reference/tables.html +13 -13
- data/vendor/local/share/doc/groonga/en/html/reference/tokenizers.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/reference/tuning.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference.html +69 -68
- data/vendor/local/share/doc/groonga/en/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/server/gqtp.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 +9 -9
- data/vendor/local/share/doc/groonga/en/html/server/http/groonga.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/package.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/server.html +5 -5
- 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/spec.html +9 -9
- 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/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +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 +8 -8
- 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 +5 -5
- 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 +12 -12
- 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/en/html/tutorial.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 +3 -3
- 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 +3 -3
- 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 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +41 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/column.txt +25 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/columns/vector.txt +333 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/cache_limit.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_create.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_rename.txt +37 -17
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/delete.txt +4 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalize.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +99 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_create.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/truncate.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-httpd.txt +128 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-suggest-learner.txt +11 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +3 -2
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.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/repository.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +67 -66
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +8 -8
- 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 +8 -8
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news.html +262 -200
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/global_configurations.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +24 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/column.html +150 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/columns/vector.html +824 -0
- 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/command.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +6 -6
- 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 +6 -6
- 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/column_rename.html +45 -24
- 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 +6 -6
- 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/normalize.html +8 -7
- 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/ruby_eval.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +174 -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 +10 -10
- 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 +6 -6
- 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/tokenize.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +8 -8
- 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-suggest-httpd.html +167 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +23 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.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/function.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +48 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +44 -44
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +60 -60
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +138 -138
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +19 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +23 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +28 -28
- 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 +19 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.html +35 -35
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference.html +69 -68
- data/vendor/local/share/doc/groonga/ja/html/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.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/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server.html +5 -5
- 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/spec.html +9 -9
- 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/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +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 +8 -8
- 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 +5 -5
- 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 +12 -12
- 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/ja/html/tutorial.html +5 -5
- data/vendor/local/share/man/ja/man1/groonga.1 +526 -73
- data/vendor/local/share/man/man1/groonga.1 +552 -80
- metadata +148 -139
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44040674447017cd6190598ae1deea8c47a1f145
|
4
|
+
data.tar.gz: 770f85dbaa3165d2c8aca9ed876c77188cda4a7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65e0d98145e7214d97012f822d2d080a7129ee86029101385b757aa9fadcac3261fa4330c9ca47d93f80e3870707767bb62e100ecec17ef3bef8d0e0097a0c15
|
7
|
+
data.tar.gz: 9745ad660e0e19afab12090563991e37758766b101d941db0253ad4899826e667caf6c8b5519aed6d65e8b1b55de38e38e6c8b3b859161b96f98031dfb936321
|
data/.yardopts
ADDED
data/doc/text/news.textile
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
h1. NEWS
|
2
2
|
|
3
|
+
h2(#4-0-1). 4.0.1: 2014-04-04
|
4
|
+
|
5
|
+
h3. Improvements
|
6
|
+
|
7
|
+
* Supported Groonga 4.0.1. Groonga 4.0.0 or older are not supported.
|
8
|
+
* Supported no weight match column case.
|
9
|
+
<pre>
|
10
|
+
table.select do |record|
|
11
|
+
match_target = record.match_target do |target|
|
12
|
+
target.column
|
13
|
+
end
|
14
|
+
match_target =~ keyword
|
15
|
+
end
|
16
|
+
</pre>
|
17
|
+
* Supported weight vector.
|
18
|
+
* grndump: Changed to use @--normalizer@ instead of @KEY_NORMALIZE@.
|
19
|
+
Old Groonga can't restore dumped database.
|
20
|
+
* {Groonga::IndexClumn#search}: Added @mode@ option.
|
21
|
+
* {Groonga::IndexClumn#search}: Added @weight@ option.
|
22
|
+
* Accepted String as option key.
|
23
|
+
|
24
|
+
h3. Fixes
|
25
|
+
|
26
|
+
* Fixed a bug that index dump drops index options in Ruby syntax.
|
27
|
+
|
28
|
+
|
3
29
|
h2(#4-0-0). 4.0.0: 2014-02-09
|
4
30
|
|
5
31
|
h3. Improvements
|
data/ext/groonga/rb-grn-column.c
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/* vim: set sts=4 sw=4 ts=8 noet: */
|
3
3
|
/*
|
4
|
-
Copyright (C) 2009-
|
4
|
+
Copyright (C) 2009-2014 Kouhei Sutou <kou@clear-code.com>
|
5
5
|
|
6
6
|
This library is free software; you can redistribute it and/or
|
7
7
|
modify it under the terms of the GNU Lesser General Public
|
@@ -71,10 +71,29 @@ rb_grn_column_bind (RbGrnColumn *rb_column,
|
|
71
71
|
grn_ctx *context, grn_obj *column)
|
72
72
|
{
|
73
73
|
RbGrnObject *rb_grn_object;
|
74
|
+
int column_type;
|
75
|
+
unsigned char value_type;
|
74
76
|
|
75
77
|
rb_grn_object = RB_GRN_OBJECT(rb_column);
|
76
78
|
rb_grn_named_object_bind(RB_GRN_NAMED_OBJECT(rb_column), context, column);
|
77
|
-
|
79
|
+
|
80
|
+
column_type = (column->header.flags & GRN_OBJ_COLUMN_TYPE_MASK);
|
81
|
+
if (column_type == GRN_OBJ_COLUMN_VECTOR) {
|
82
|
+
switch (rb_grn_object->range->header.type) {
|
83
|
+
case GRN_TABLE_HASH_KEY:
|
84
|
+
case GRN_TABLE_PAT_KEY:
|
85
|
+
case GRN_TABLE_DAT_KEY:
|
86
|
+
case GRN_TABLE_NO_KEY:
|
87
|
+
value_type = GRN_UVECTOR;
|
88
|
+
break;
|
89
|
+
default:
|
90
|
+
value_type = GRN_VECTOR;
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
} else {
|
94
|
+
value_type = GRN_BULK;
|
95
|
+
}
|
96
|
+
rb_column->value = grn_obj_open(context, value_type, 0,
|
78
97
|
rb_grn_object->range_id);
|
79
98
|
}
|
80
99
|
|
@@ -674,6 +693,24 @@ rb_grn_column_scalar_p (VALUE self)
|
|
674
693
|
}
|
675
694
|
}
|
676
695
|
|
696
|
+
/*
|
697
|
+
* @overload with_weight?
|
698
|
+
* @return [Boolean] @true@ if the column is vector and created with
|
699
|
+
* @:with_weight => true@ flag, @false@ otherwise.
|
700
|
+
* @since 4.0.1
|
701
|
+
*/
|
702
|
+
static VALUE
|
703
|
+
rb_grn_column_with_weight_p(VALUE self)
|
704
|
+
{
|
705
|
+
grn_obj *column;
|
706
|
+
|
707
|
+
rb_grn_column_deconstruct(SELF(self), &column, NULL,
|
708
|
+
NULL, NULL,
|
709
|
+
NULL, NULL, NULL);
|
710
|
+
|
711
|
+
return CBOOL2RVAL(column->header.flags & GRN_OBJ_WITH_WEIGHT);
|
712
|
+
}
|
713
|
+
|
677
714
|
/*
|
678
715
|
* _operator_ を実行できる _column_ のインデックスを返す。
|
679
716
|
* @since 1.0.9
|
@@ -772,6 +809,9 @@ rb_grn_init_column (VALUE mGrn)
|
|
772
809
|
rb_define_method(rb_cGrnColumn, "vector?", rb_grn_column_vector_p, 0);
|
773
810
|
rb_define_method(rb_cGrnColumn, "scalar?", rb_grn_column_scalar_p, 0);
|
774
811
|
|
812
|
+
rb_define_method(rb_cGrnColumn, "with_weight?",
|
813
|
+
rb_grn_column_with_weight_p, 0);
|
814
|
+
|
775
815
|
rb_define_method(rb_cGrnColumn, "indexes", rb_grn_column_get_indexes, -1);
|
776
816
|
|
777
817
|
rb_define_method(rb_cGrnColumn, "rename", rb_grn_column_rename, 1);
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2
2
|
/*
|
3
|
-
Copyright (C) 2009-
|
3
|
+
Copyright (C) 2009-2014 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
|
@@ -44,6 +44,7 @@ rb_grn_index_column_finalizer (grn_ctx *context, grn_obj *object,
|
|
44
44
|
grn_obj_unlink(context, rb_grn_index_column->id_query);
|
45
45
|
grn_obj_unlink(context, rb_grn_index_column->string_query);
|
46
46
|
grn_obj_unlink(context, rb_grn_index_column->old_value);
|
47
|
+
grn_obj_unlink(context, rb_grn_index_column->set_value);
|
47
48
|
|
48
49
|
rb_grn_column_finalizer(context, object, RB_GRN_COLUMN(rb_grn_index_column));
|
49
50
|
}
|
@@ -59,6 +60,9 @@ rb_grn_index_column_bind (RbGrnIndexColumn *rb_grn_index_column,
|
|
59
60
|
|
60
61
|
rb_grn_index_column->old_value = grn_obj_open(context, GRN_BULK, 0,
|
61
62
|
rb_grn_object->range_id);
|
63
|
+
rb_grn_index_column->set_value =
|
64
|
+
grn_obj_open(context, GRN_VECTOR, 0,
|
65
|
+
rb_grn_object->range->header.domain);
|
62
66
|
|
63
67
|
rb_grn_index_column->id_query = grn_obj_open(context, GRN_BULK, 0,
|
64
68
|
rb_grn_object->domain_id);
|
@@ -75,6 +79,7 @@ rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_index_column,
|
|
75
79
|
grn_obj **domain,
|
76
80
|
grn_obj **value,
|
77
81
|
grn_obj **old_value,
|
82
|
+
grn_obj **set_value,
|
78
83
|
grn_id *range_id,
|
79
84
|
grn_obj **range,
|
80
85
|
grn_obj **id_query,
|
@@ -89,138 +94,14 @@ rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_index_column,
|
|
89
94
|
|
90
95
|
if (old_value)
|
91
96
|
*old_value = rb_grn_index_column->old_value;
|
97
|
+
if (set_value)
|
98
|
+
*set_value = rb_grn_index_column->set_value;
|
92
99
|
if (id_query)
|
93
100
|
*id_query = rb_grn_index_column->id_query;
|
94
101
|
if (string_query)
|
95
102
|
*string_query = rb_grn_index_column->string_query;
|
96
103
|
}
|
97
104
|
|
98
|
-
/*
|
99
|
-
* IDが _id_ であるレコードを高速に全文検索するため転置索引を作
|
100
|
-
* 成する。多くの場合、 {Groonga::Table#define_index_column} で
|
101
|
-
* +:source+ オプションを指定することにより、自動的に全文検索
|
102
|
-
* 用の索引は更新されるので、明示的にこのメソッドを使うこと
|
103
|
-
* は少ない。
|
104
|
-
*
|
105
|
-
* @example 記事の段落毎に索引を作成する。
|
106
|
-
* articles = Groonga::Array.create(:name => "<articles>")
|
107
|
-
* articles.define_column("title", "ShortText")
|
108
|
-
* articles.define_column("content", "Text")
|
109
|
-
*
|
110
|
-
* terms = Groonga::Hash.create(:name => "<terms>",
|
111
|
-
* :default_tokenizer => "TokenBigram")
|
112
|
-
* content_index = terms.define_index_column("content", articles,
|
113
|
-
* :with_section => true)
|
114
|
-
*
|
115
|
-
* content = <<-EOC
|
116
|
-
* groonga は組み込み型の全文検索エンジンライブラリです。
|
117
|
-
* DBMSやスクリプト言語処理系等に組み込むことによって、その
|
118
|
-
* 全文検索機能を強化することができます。また、リレーショナ
|
119
|
-
* ルモデルに基づくデータストア機能を内包しており、groonga
|
120
|
-
* 単体でも高速なデータストアサーバとして使用することができ
|
121
|
-
* ます。
|
122
|
-
*
|
123
|
-
* ■全文検索方式
|
124
|
-
* 転置索引型の全文検索エンジンです。転置索引は圧縮されてファ
|
125
|
-
* イルに格納され、検索時のディスク読み出し量を小さく、かつ
|
126
|
-
* 局所的に抑えるように設計されています。用途に応じて以下の
|
127
|
-
* 索引タイプを選択できます。
|
128
|
-
* EOC
|
129
|
-
*
|
130
|
-
* groonga = articles.add(:title => "groonga", :content => content)
|
131
|
-
*
|
132
|
-
* content.split(/\n{2,}/).each_with_index do |sentence, i|
|
133
|
-
* content_index[groonga] = {:value => sentence, :section => i + 1}
|
134
|
-
* end
|
135
|
-
*
|
136
|
-
* content_index.search("エンジン").collect do |record|
|
137
|
-
* p record.key["title"] # -> "groonga"
|
138
|
-
* end
|
139
|
-
*
|
140
|
-
* @overload []=(id, value)
|
141
|
-
* @param [String] value 新しい値
|
142
|
-
* @overload []=(id, options)
|
143
|
-
* _options_ を指定することにより、 _value_ を指定したときよりも索引の作
|
144
|
-
* 成を制御できる。
|
145
|
-
* @param [::Hash] options The name and value
|
146
|
-
* pairs. Omitted names are initialized as the default value
|
147
|
-
* @option options :section
|
148
|
-
* 段落番号を指定する。省略した場合は1を指定したとみなされ
|
149
|
-
* る。
|
150
|
-
* {Groonga::Table#define_index_column} で
|
151
|
-
* @{:with_section => true}@ を指定していなければい
|
152
|
-
* けない。
|
153
|
-
* @option options :old_value
|
154
|
-
* 以前の値を指定する。省略した場合は現在の値が用いられる。
|
155
|
-
* 通常は指定する必要はない。
|
156
|
-
* @option options :value
|
157
|
-
* 新しい値を指定する。 _value_ を指定した場合と _options_ で
|
158
|
-
* @{:value => value}@ を指定した場合は同じ動作とな
|
159
|
-
* る。
|
160
|
-
*
|
161
|
-
* @deprecated Since 3.0.2. Use {#add}, {#delete} or {#update} instead.
|
162
|
-
*/
|
163
|
-
static VALUE
|
164
|
-
rb_grn_index_column_array_set (VALUE self, VALUE rb_id, VALUE rb_value)
|
165
|
-
{
|
166
|
-
grn_ctx *context = NULL;
|
167
|
-
grn_obj *column, *range;
|
168
|
-
grn_rc rc;
|
169
|
-
grn_id id;
|
170
|
-
unsigned int section;
|
171
|
-
grn_obj *old_value, *new_value;
|
172
|
-
VALUE original_rb_value, rb_section, rb_old_value, rb_new_value;
|
173
|
-
|
174
|
-
original_rb_value = rb_value;
|
175
|
-
|
176
|
-
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
177
|
-
NULL, NULL,
|
178
|
-
&new_value, &old_value,
|
179
|
-
NULL, &range,
|
180
|
-
NULL, NULL);
|
181
|
-
|
182
|
-
id = RVAL2GRNID(rb_id, context, range, self);
|
183
|
-
|
184
|
-
if (!RVAL2CBOOL(rb_obj_is_kind_of(rb_value, rb_cHash))) {
|
185
|
-
VALUE hash_value;
|
186
|
-
hash_value = rb_hash_new();
|
187
|
-
rb_hash_aset(hash_value, RB_GRN_INTERN("value"), rb_value);
|
188
|
-
rb_value = hash_value;
|
189
|
-
}
|
190
|
-
|
191
|
-
rb_grn_scan_options(rb_value,
|
192
|
-
"section", &rb_section,
|
193
|
-
"old_value", &rb_old_value,
|
194
|
-
"value", &rb_new_value,
|
195
|
-
NULL);
|
196
|
-
|
197
|
-
if (NIL_P(rb_section))
|
198
|
-
section = 1;
|
199
|
-
else
|
200
|
-
section = NUM2UINT(rb_section);
|
201
|
-
|
202
|
-
if (NIL_P(rb_old_value)) {
|
203
|
-
old_value = NULL;
|
204
|
-
} else {
|
205
|
-
GRN_BULK_REWIND(old_value);
|
206
|
-
RVAL2GRNBULK(rb_old_value, context, old_value);
|
207
|
-
}
|
208
|
-
|
209
|
-
if (NIL_P(rb_new_value)) {
|
210
|
-
new_value = NULL;
|
211
|
-
} else {
|
212
|
-
GRN_BULK_REWIND(new_value);
|
213
|
-
RVAL2GRNBULK(rb_new_value, context, new_value);
|
214
|
-
}
|
215
|
-
|
216
|
-
rc = grn_column_index_update(context, column,
|
217
|
-
id, section, old_value, new_value);
|
218
|
-
rb_grn_context_check(context, self);
|
219
|
-
rb_grn_rc_check(rc, self);
|
220
|
-
|
221
|
-
return original_rb_value;
|
222
|
-
}
|
223
|
-
|
224
105
|
/*
|
225
106
|
* Adds a record that has @value@ content to inverted index for fast
|
226
107
|
* fulltext serach. Normally, this method is not used
|
@@ -304,7 +185,7 @@ rb_grn_index_column_add (int argc, VALUE *argv, VALUE self)
|
|
304
185
|
|
305
186
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
306
187
|
NULL, NULL,
|
307
|
-
&new_value, NULL,
|
188
|
+
&new_value, NULL, NULL,
|
308
189
|
NULL, &range,
|
309
190
|
NULL, NULL);
|
310
191
|
|
@@ -418,7 +299,7 @@ rb_grn_index_column_delete (int argc, VALUE *argv, VALUE self)
|
|
418
299
|
|
419
300
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
420
301
|
NULL, NULL,
|
421
|
-
NULL, &old_value,
|
302
|
+
NULL, &old_value, NULL,
|
422
303
|
NULL, &range,
|
423
304
|
NULL, NULL);
|
424
305
|
|
@@ -526,7 +407,7 @@ rb_grn_index_column_update (int argc, VALUE *argv, VALUE self)
|
|
526
407
|
|
527
408
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
528
409
|
NULL, NULL,
|
529
|
-
&new_value, &old_value,
|
410
|
+
&new_value, &old_value, NULL,
|
530
411
|
NULL, &range,
|
531
412
|
NULL, NULL);
|
532
413
|
|
@@ -583,7 +464,7 @@ rb_grn_index_column_get_sources (VALUE self)
|
|
583
464
|
|
584
465
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
585
466
|
NULL, NULL,
|
586
|
-
NULL, NULL, NULL, NULL,
|
467
|
+
NULL, NULL, NULL, NULL, NULL,
|
587
468
|
NULL, NULL);
|
588
469
|
|
589
470
|
GRN_OBJ_INIT(&sources, GRN_BULK, 0, GRN_ID_NIL);
|
@@ -702,7 +583,7 @@ rb_grn_index_column_set_sources (VALUE self, VALUE rb_sources)
|
|
702
583
|
|
703
584
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
704
585
|
NULL, NULL,
|
705
|
-
NULL, NULL,
|
586
|
+
NULL, NULL, NULL,
|
706
587
|
&range_id, NULL,
|
707
588
|
NULL, NULL);
|
708
589
|
|
@@ -785,15 +666,16 @@ rb_grn_index_column_search (int argc, VALUE *argv, VALUE self)
|
|
785
666
|
grn_obj *query = NULL, *id_query = NULL, *string_query = NULL;
|
786
667
|
grn_obj *result;
|
787
668
|
grn_operator operator;
|
669
|
+
grn_search_optarg options;
|
788
670
|
grn_rc rc;
|
789
|
-
VALUE rb_query,
|
671
|
+
VALUE rb_query, rb_options, rb_result, rb_operator, rb_mode, rb_weight;
|
790
672
|
|
791
673
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
792
674
|
NULL, NULL,
|
793
|
-
NULL, NULL, NULL, &range,
|
675
|
+
NULL, NULL, NULL, NULL, &range,
|
794
676
|
&id_query, &string_query);
|
795
677
|
|
796
|
-
rb_scan_args(argc, argv, "11", &rb_query, &
|
678
|
+
rb_scan_args(argc, argv, "11", &rb_query, &rb_options);
|
797
679
|
|
798
680
|
if (CBOOL2RVAL(rb_obj_is_kind_of(rb_query, rb_cInteger))) {
|
799
681
|
grn_id id;
|
@@ -807,9 +689,11 @@ rb_grn_index_column_search (int argc, VALUE *argv, VALUE self)
|
|
807
689
|
query = string_query;
|
808
690
|
}
|
809
691
|
|
810
|
-
rb_grn_scan_options(
|
692
|
+
rb_grn_scan_options(rb_options,
|
811
693
|
"result", &rb_result,
|
812
694
|
"operator", &rb_operator,
|
695
|
+
"mode", &rb_mode,
|
696
|
+
"weight", &rb_weight,
|
813
697
|
NULL);
|
814
698
|
|
815
699
|
if (NIL_P(rb_result)) {
|
@@ -824,7 +708,23 @@ rb_grn_index_column_search (int argc, VALUE *argv, VALUE self)
|
|
824
708
|
|
825
709
|
operator = RVAL2GRNOPERATOR(rb_operator);
|
826
710
|
|
827
|
-
|
711
|
+
if (NIL_P(rb_mode)) {
|
712
|
+
options.mode = GRN_OP_EXACT;
|
713
|
+
} else {
|
714
|
+
options.mode = RVAL2GRNOPERATOR(rb_mode);
|
715
|
+
}
|
716
|
+
options.similarity_threshold = 0;
|
717
|
+
options.max_interval = 0;
|
718
|
+
options.weight_vector = NULL;
|
719
|
+
if (NIL_P(rb_weight)) {
|
720
|
+
options.vector_size = 1;
|
721
|
+
} else {
|
722
|
+
options.vector_size = NUM2UINT(rb_weight);
|
723
|
+
}
|
724
|
+
options.proc = NULL;
|
725
|
+
options.max_size = 0;
|
726
|
+
|
727
|
+
rc = grn_obj_search(context, column, query, result, operator, &options);
|
828
728
|
rb_grn_rc_check(rc, self);
|
829
729
|
|
830
730
|
return rb_result;
|
@@ -842,7 +742,7 @@ rb_grn_index_column_with_section_p (VALUE self)
|
|
842
742
|
|
843
743
|
rb_grn_index_column_deconstruct(SELF(self), &column, NULL,
|
844
744
|
NULL, NULL,
|
845
|
-
NULL, NULL, NULL, NULL,
|
745
|
+
NULL, NULL, NULL, NULL, NULL,
|
846
746
|
NULL, NULL);
|
847
747
|
|
848
748
|
return CBOOL2RVAL(column->header.flags & GRN_OBJ_WITH_SECTION);
|
@@ -860,7 +760,7 @@ rb_grn_index_column_with_weight_p (VALUE self)
|
|
860
760
|
|
861
761
|
rb_grn_index_column_deconstruct(SELF(self), &column, NULL,
|
862
762
|
NULL, NULL,
|
863
|
-
NULL, NULL, NULL, NULL,
|
763
|
+
NULL, NULL, NULL, NULL, NULL,
|
864
764
|
NULL, NULL);
|
865
765
|
|
866
766
|
return CBOOL2RVAL(column->header.flags & GRN_OBJ_WITH_WEIGHT);
|
@@ -878,7 +778,7 @@ rb_grn_index_column_with_position_p (VALUE self)
|
|
878
778
|
|
879
779
|
rb_grn_index_column_deconstruct(SELF(self), &column, NULL,
|
880
780
|
NULL, NULL,
|
881
|
-
NULL, NULL, NULL, NULL,
|
781
|
+
NULL, NULL, NULL, NULL, NULL,
|
882
782
|
NULL, NULL);
|
883
783
|
|
884
784
|
return CBOOL2RVAL(column->header.flags & GRN_OBJ_WITH_POSITION);
|
@@ -906,24 +806,24 @@ rb_grn_index_column_with_position_p (VALUE self)
|
|
906
806
|
static VALUE
|
907
807
|
rb_grn_index_column_open_cursor (int argc, VALUE *argv, VALUE self)
|
908
808
|
{
|
909
|
-
grn_ctx
|
910
|
-
grn_obj
|
911
|
-
grn_obj
|
809
|
+
grn_ctx *context;
|
810
|
+
grn_obj *column;
|
811
|
+
grn_obj *range_object;
|
912
812
|
grn_table_cursor *table_cursor;
|
913
|
-
grn_id
|
914
|
-
grn_id
|
915
|
-
int
|
916
|
-
grn_obj
|
917
|
-
VALUE
|
918
|
-
VALUE
|
919
|
-
VALUE
|
920
|
-
VALUE
|
921
|
-
VALUE
|
922
|
-
VALUE
|
813
|
+
grn_id rid_min = GRN_ID_NIL;
|
814
|
+
grn_id rid_max = GRN_ID_MAX;
|
815
|
+
int flags = 0;
|
816
|
+
grn_obj *index_cursor;
|
817
|
+
VALUE rb_table_cursor;
|
818
|
+
VALUE options;
|
819
|
+
VALUE rb_with_section, rb_with_weight, rb_with_position;
|
820
|
+
VALUE rb_table;
|
821
|
+
VALUE rb_lexicon;
|
822
|
+
VALUE rb_cursor;
|
923
823
|
|
924
824
|
rb_grn_index_column_deconstruct(SELF(self), &column, &context,
|
925
825
|
NULL, NULL,
|
926
|
-
NULL, NULL,
|
826
|
+
NULL, NULL, NULL,
|
927
827
|
NULL, &range_object,
|
928
828
|
NULL, NULL);
|
929
829
|
|
@@ -935,8 +835,8 @@ rb_grn_index_column_open_cursor (int argc, VALUE *argv, VALUE self)
|
|
935
835
|
NULL);
|
936
836
|
|
937
837
|
table_cursor = RVAL2GRNTABLECURSOR(rb_table_cursor, NULL);
|
938
|
-
rb_table
|
939
|
-
rb_lexicon
|
838
|
+
rb_table = GRNOBJECT2RVAL(Qnil, context, range_object, GRN_FALSE);
|
839
|
+
rb_lexicon = rb_iv_get(rb_table_cursor, "@table");
|
940
840
|
|
941
841
|
if (NIL_P(rb_with_section)) {
|
942
842
|
flags |= column->header.flags & GRN_OBJ_WITH_SECTION;
|
@@ -973,9 +873,6 @@ rb_grn_init_index_column (VALUE mGrn)
|
|
973
873
|
rb_cGrnIndexColumn =
|
974
874
|
rb_define_class_under(mGrn, "IndexColumn", rb_cGrnColumn);
|
975
875
|
|
976
|
-
rb_define_method(rb_cGrnIndexColumn, "[]=",
|
977
|
-
rb_grn_index_column_array_set, 2);
|
978
|
-
|
979
876
|
rb_define_method(rb_cGrnIndexColumn, "add",
|
980
877
|
rb_grn_index_column_add, -1);
|
981
878
|
rb_define_method(rb_cGrnIndexColumn, "delete",
|
@@ -999,6 +896,7 @@ rb_grn_init_index_column (VALUE mGrn)
|
|
999
896
|
rb_grn_index_column_with_weight_p, 0);
|
1000
897
|
rb_define_method(rb_cGrnIndexColumn, "with_position?",
|
1001
898
|
rb_grn_index_column_with_position_p, 0);
|
899
|
+
|
1002
900
|
rb_define_method(rb_cGrnIndexColumn, "open_cursor",
|
1003
901
|
rb_grn_index_column_open_cursor, -1);
|
1004
902
|
}
|
data/ext/groonga/rb-grn-object.c
CHANGED
@@ -444,6 +444,13 @@ rb_grn_object_assign (VALUE klass, VALUE self, VALUE rb_context,
|
|
444
444
|
context, object);
|
445
445
|
rb_grn_index_column_bind(RB_GRN_INDEX_COLUMN(rb_grn_object),
|
446
446
|
context, object);
|
447
|
+
} else if (RVAL2CBOOL(rb_obj_is_kind_of(self, rb_cGrnVariableSizeColumn))) {
|
448
|
+
rb_grn_object = ALLOC(RbGrnVariableSizeColumn);
|
449
|
+
rb_grn_object_bind_common(klass, self, rb_context, rb_grn_object,
|
450
|
+
context, object);
|
451
|
+
rb_grn_variable_size_column_bind(RB_GRN_VARIABLE_SIZE_COLUMN(rb_grn_object),
|
452
|
+
context,
|
453
|
+
object);
|
447
454
|
} else if (RVAL2CBOOL(rb_obj_is_kind_of(self, rb_cGrnColumn))) {
|
448
455
|
rb_grn_object = ALLOC(RbGrnColumn);
|
449
456
|
rb_grn_object_bind_common(klass, self, rb_context, rb_grn_object,
|
data/ext/groonga/rb-grn-table.c
CHANGED
@@ -226,6 +226,11 @@ rb_grn_table_inspect (VALUE self)
|
|
226
226
|
*
|
227
227
|
* - +:scalar+ := スカラ値(単独の値)を格納する。
|
228
228
|
* - +:vector+ := 値の配列を格納する。
|
229
|
+
* @option options [Boolean] :with_weight (false)
|
230
|
+
* It specifies whether making the column weight vector column or not.
|
231
|
+
* Weight vector column can store weight for each element.
|
232
|
+
*
|
233
|
+
* You can't use this option for scalar column.
|
229
234
|
* @option options :compress
|
230
235
|
* 値の圧縮方法を指定する。省略した場合は、圧縮しない。
|
231
236
|
*
|
@@ -244,7 +249,7 @@ rb_grn_table_define_column (int argc, VALUE *argv, VALUE self)
|
|
244
249
|
unsigned name_size = 0;
|
245
250
|
grn_obj_flags flags = 0;
|
246
251
|
VALUE rb_name, rb_value_type;
|
247
|
-
VALUE options, rb_path, rb_persistent, rb_compress, rb_type;
|
252
|
+
VALUE options, rb_path, rb_persistent, rb_compress, rb_type, rb_with_weight;
|
248
253
|
VALUE columns;
|
249
254
|
VALUE rb_column;
|
250
255
|
|
@@ -262,6 +267,7 @@ rb_grn_table_define_column (int argc, VALUE *argv, VALUE self)
|
|
262
267
|
"path", &rb_path,
|
263
268
|
"persistent", &rb_persistent,
|
264
269
|
"type", &rb_type,
|
270
|
+
"with_weight", &rb_with_weight,
|
265
271
|
"compress", &rb_compress,
|
266
272
|
NULL);
|
267
273
|
|
@@ -294,6 +300,15 @@ rb_grn_table_define_column (int argc, VALUE *argv, VALUE self)
|
|
294
300
|
rb_grn_inspect(rb_type));
|
295
301
|
}
|
296
302
|
|
303
|
+
if (RVAL2CBOOL(rb_with_weight)) {
|
304
|
+
if (flags & GRN_OBJ_COLUMN_VECTOR) {
|
305
|
+
flags |= GRN_OBJ_WITH_WEIGHT;
|
306
|
+
} else {
|
307
|
+
rb_raise(rb_eArgError,
|
308
|
+
"can't use weight for scalar column");
|
309
|
+
}
|
310
|
+
}
|
311
|
+
|
297
312
|
if (NIL_P(rb_compress)) {
|
298
313
|
} else if (rb_grn_equal_option(rb_compress, "zlib")) {
|
299
314
|
flags |= GRN_OBJ_COMPRESS_ZLIB;
|
@@ -1268,7 +1283,8 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
|
|
1268
1283
|
grn_obj *table;
|
1269
1284
|
grn_table_sort_key *keys;
|
1270
1285
|
grn_table_group_result *results;
|
1271
|
-
int i, n_keys, n_results
|
1286
|
+
int i, n_keys, n_results;
|
1287
|
+
unsigned int max_n_sub_records = 0;
|
1272
1288
|
grn_rc rc;
|
1273
1289
|
VALUE rb_keys, rb_options, rb_max_n_sub_records;
|
1274
1290
|
VALUE *rb_group_keys;
|
@@ -1294,7 +1310,7 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
|
|
1294
1310
|
NULL);
|
1295
1311
|
|
1296
1312
|
if (!NIL_P(rb_max_n_sub_records))
|
1297
|
-
max_n_sub_records =
|
1313
|
+
max_n_sub_records = NUM2UINT(rb_max_n_sub_records);
|
1298
1314
|
|
1299
1315
|
keys = ALLOCA_N(grn_table_sort_key, n_keys);
|
1300
1316
|
for (i = 0; i < n_keys; i++) {
|
data/ext/groonga/rb-grn-utils.c
CHANGED
@@ -123,6 +123,10 @@ rb_grn_scan_options (VALUE options, ...)
|
|
123
123
|
rb_key = RB_GRN_INTERN(key);
|
124
124
|
rb_ary_push(available_keys, rb_key);
|
125
125
|
*value = rb_funcall(options, rb_intern("delete"), 1, rb_key);
|
126
|
+
if (NIL_P(*value)) {
|
127
|
+
rb_key = rb_str_new_cstr(key);
|
128
|
+
*value = rb_funcall(options, rb_intern("delete"), 1, rb_key);
|
129
|
+
}
|
126
130
|
|
127
131
|
key = va_arg(args, const char *);
|
128
132
|
}
|
@@ -652,7 +656,6 @@ rb_grn_vector_to_ruby_object (grn_ctx *context, grn_obj *vector)
|
|
652
656
|
grn_obj_reinit(context, &value, domain, 0);
|
653
657
|
grn_bulk_write(context, &value, _value, length);
|
654
658
|
rb_ary_push(array, GRNOBJ2RVAL(Qnil, context, &value, Qnil));
|
655
|
-
/* UINT2NUM(weight); */ /* TODO: How handle weight? */
|
656
659
|
}
|
657
660
|
GRN_OBJ_FIN(context, &value);
|
658
661
|
|