rroonga 3.0.7-x86-mingw32 → 3.0.8-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Rakefile +13 -3
- data/doc/text/news.textile +8 -0
- data/ext/groonga/extconf.rb +1 -3
- data/ext/groonga/rb-grn-table-key-support.c +0 -4
- data/ext/groonga/rb-grn.h +1 -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/rroonga-build.rb +3 -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-config +2 -2
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/etc/groonga/httpd/groonga-httpd.conf +10 -2
- data/vendor/local/include/groonga/groonga.h +30 -1048
- 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 +85 -49
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/cooperation.txt +77 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +17 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +5 -0
- 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 +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 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +8 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +136 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_cache.txt +114 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_column.txt +92 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_command_version.txt +37 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ctx.txt +70 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_db.txt +71 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_encoding.txt +49 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_expr.txt +83 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_geo.txt +55 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_hook.txt +67 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ii.txt +35 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_index_cursor.txt +44 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_info.txt +56 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_match_escalation.txt +39 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_obj.txt +246 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_proc.txt +56 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_search.txt +31 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_table.txt +219 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_table_cursor.txt +109 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_type.txt +31 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_user_data.txt +29 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/cache_limit.txt +63 -31
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/defrag.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/delete.txt +85 -34
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/ruby_eval.txt +77 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +5 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-httpd.txt +218 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/html_untag.txt +19 -15
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/query.txt +16 -19
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/sub_filter.txt +5 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/query_syntax.txt +12 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/server/package.txt +18 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +9 -0
- data/vendor/local/share/doc/groonga/en/html/_static/jquery.js +2 -4
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.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.html +60 -55
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +11 -10
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +219 -0
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +61 -61
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +118 -105
- 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 +37 -37
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +9 -9
- 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 +5 -5
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +638 -6
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +50 -24
- data/vendor/local/share/doc/groonga/en/html/install.html +6 -6
- 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 +11 -11
- 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/limitations.html +13 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +308 -152
- 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 +37 -18
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +30 -12
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +322 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +284 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +197 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +190 -23
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +254 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +219 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +173 -16
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +237 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +244 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +186 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +196 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +237 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +200 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +648 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +227 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +180 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +546 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +321 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +179 -0
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +177 -0
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +17 -16
- 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 +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +71 -44
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +6 -6
- 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/column_rename.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 +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +203 -48
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +6 -6
- 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/normalize.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 +10 -10
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +219 -0
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +94 -94
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +33 -33
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +31 -31
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +47 -47
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +39 -39
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +25 -25
- 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 +219 -12
- 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/html_untag.html +31 -28
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +22 -23
- 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/functions/sub_filter.html +9 -6
- 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 +17 -7
- 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/normalizers.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/tables.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/types.html +9 -9
- 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.html +5 -5
- 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/server/package.html +22 -8
- data/vendor/local/share/doc/groonga/en/html/spec.html +10 -10
- 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 +5 -5
- 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 +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/tutorial.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 +14 -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/ja/html/.buildinfo +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/cooperation.txt +77 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +17 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +5 -0
- 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 +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 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +8 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +136 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_cache.txt +114 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_column.txt +92 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_command_version.txt +37 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ctx.txt +70 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_db.txt +71 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_encoding.txt +49 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_expr.txt +83 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_geo.txt +55 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_hook.txt +67 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ii.txt +35 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_index_cursor.txt +44 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_info.txt +56 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_match_escalation.txt +39 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_obj.txt +246 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_proc.txt +56 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_search.txt +31 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_table.txt +219 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_table_cursor.txt +109 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_type.txt +31 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_user_data.txt +29 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/cache_limit.txt +63 -31
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/defrag.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/delete.txt +85 -34
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/ruby_eval.txt +77 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +5 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-httpd.txt +218 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/html_untag.txt +19 -15
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/query.txt +16 -19
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/sub_filter.txt +5 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/query_syntax.txt +12 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/server/package.txt +18 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +9 -0
- data/vendor/local/share/doc/groonga/ja/html/_static/jquery.js +2 -4
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +1 -1
- 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 +61 -56
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +12 -11
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +220 -0
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +62 -62
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +119 -106
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +10 -10
- 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 +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +642 -10
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/index.html +50 -25
- data/vendor/local/share/doc/groonga/ja/html/install.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/install/mac_os_x.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/others.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +15 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +336 -154
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +38 -19
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +31 -13
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +319 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +285 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +198 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +191 -24
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +255 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +220 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +172 -17
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +238 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +245 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +187 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +197 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +238 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +201 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +649 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +228 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +181 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +547 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +322 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +180 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +178 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +18 -17
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +64 -45
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/clearlock.html +6 -6
- 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 +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_remove.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/column_rename.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/define_selector.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/defrag.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +207 -49
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/quit.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/register.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +222 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +95 -95
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +48 -48
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +40 -40
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/add.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/get.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/set.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grntest.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +194 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +31 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +20 -23
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +10 -15
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +11 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/pseudo_column.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/types.html +10 -10
- 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.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +17 -10
- data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +6 -6
- 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 +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +16 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +6 -6
- data/vendor/local/share/groonga/examples/dictionary/edict/edict-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/edict/edict2grn.rb +0 -0
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/eijiro/eijiro2grn.rb +0 -0
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene-import.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/gene95/gene2grn.rb +0 -0
- data/vendor/local/share/groonga/examples/dictionary/init-db.sh +0 -0
- data/vendor/local/share/groonga/examples/dictionary/jmdict/jmdict.rb +0 -0
- data/vendor/local/share/groonga/html/admin/css/groonga-admin.css +4 -0
- data/vendor/local/share/groonga/html/admin/index.html +28 -26
- data/vendor/local/share/groonga/html/admin/js/groonga-admin.js +13 -5
- data/vendor/local/share/man/ja/man1/groonga.1 +3418 -350
- data/vendor/local/share/man/man1/groonga.1 +3485 -348
- metadata +116 -63
@@ -171,7 +171,7 @@ function GroongaAdmin() {
|
|
171
171
|
$('#tablelist-remove-table').click(function() {
|
172
172
|
that.removetable();
|
173
173
|
});
|
174
|
-
$('#tab-recordlist-
|
174
|
+
$('#tab-recordlist-form').submit(function() {
|
175
175
|
if ($('#table-tab-recordlist-full-checkbox').attr('checked')) {
|
176
176
|
// full
|
177
177
|
var d = {
|
@@ -192,6 +192,7 @@ function GroongaAdmin() {
|
|
192
192
|
$('#tab-recordlist-simplequerytype').val(),
|
193
193
|
1);
|
194
194
|
}
|
195
|
+
return false;
|
195
196
|
});
|
196
197
|
this._initializeSideMenu();
|
197
198
|
this.update_tablelist();
|
@@ -227,6 +228,11 @@ function GroongaAdmin() {
|
|
227
228
|
$('#tab-recordlist-incremental-label').show();
|
228
229
|
}
|
229
230
|
$('#tab-recordlist-incremental').change();
|
231
|
+
|
232
|
+
var selectedOption = $(this).find(':selected');
|
233
|
+
$('#tab-recordlist-simplequery').attr(
|
234
|
+
'placeholder', selectedOption.data('placeholder')
|
235
|
+
);
|
230
236
|
}).change();
|
231
237
|
|
232
238
|
$('#table-tab-recordlist-full-checkbox').change(function() {
|
@@ -773,7 +779,8 @@ jQuery.extend(GroongaAdmin.prototype, {
|
|
773
779
|
if (that.validateajax(d, hide_dialog) < 0) { return; }
|
774
780
|
var rc = d.shift();
|
775
781
|
if (rc[0] != 0) {
|
776
|
-
alert('error');
|
782
|
+
alert('error: ' + rc[3]);
|
783
|
+
that.hideloading();
|
777
784
|
return false;
|
778
785
|
}
|
779
786
|
var body = d.shift();
|
@@ -908,6 +915,7 @@ jQuery.extend(GroongaAdmin.prototype, {
|
|
908
915
|
return ret;
|
909
916
|
},
|
910
917
|
update_createrecord_loadcomplete: function(d_sel, d_col) {
|
918
|
+
var that = this;
|
911
919
|
var b = d_sel[1][0];
|
912
920
|
var columns = $('<tbody />');
|
913
921
|
var listofs = b[1].length - (d_col[1].length - 1);
|
@@ -950,8 +958,8 @@ jQuery.extend(GroongaAdmin.prototype, {
|
|
950
958
|
.click(function() {
|
951
959
|
var target = $(this).parent();
|
952
960
|
target
|
953
|
-
.append(
|
954
|
-
.append(
|
961
|
+
.append(that.add_record_inputbox($(this).parent().prev().children().text()))
|
962
|
+
.append(that.add_record_deletebutton())
|
955
963
|
.append("<br />");
|
956
964
|
$(this).appendTo(target);
|
957
965
|
})
|
@@ -1159,7 +1167,7 @@ jQuery.extend(GroongaAdmin.prototype, {
|
|
1159
1167
|
dataType: 'json',
|
1160
1168
|
success: function() {
|
1161
1169
|
if (--completecount == 0) {
|
1162
|
-
$('#tab-recordlist-
|
1170
|
+
$('#tab-recordlist-form').submit();
|
1163
1171
|
alert('レコードを削除しました。');
|
1164
1172
|
} else if (completecount < 0){
|
1165
1173
|
that.hideloading();
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH "GROONGA" "1" "2013 年
|
1
|
+
.TH "GROONGA" "1" "2013 年 09 月 27 日" "3.0.8" "groonga"
|
2
2
|
.SH NAME
|
3
3
|
groonga \- groongaのドキュメント
|
4
4
|
.
|
@@ -34,6 +34,13 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
34
34
|
.IP \(bu 2
|
35
35
|
\fBnews\fP
|
36
36
|
.UNINDENT
|
37
|
+
.sp
|
38
|
+
\fBノート:\fP
|
39
|
+
.INDENT 0.0
|
40
|
+
.INDENT 3.5
|
41
|
+
このドキュメントはソースアーカイブの形式で配布され、随時更新しています。最新のドキュメントをソース形式で参照したいなら、GitHubのリポジトリブラウザ経由で閲覧できます。(\fI\%https://github.com/groonga/groonga/tree/master/doc/source\fP)
|
42
|
+
.UNINDENT
|
43
|
+
.UNINDENT
|
37
44
|
.SH GROONGAの特徴
|
38
45
|
.SS groonga の概要
|
39
46
|
.sp
|
@@ -102,7 +109,7 @@ groonga は独自のカラムストアを持つ列指向のデータベースと
|
|
102
109
|
.sp
|
103
110
|
.nf
|
104
111
|
.ft C
|
105
|
-
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.
|
112
|
+
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.8\-x86.exe
|
106
113
|
.ft P
|
107
114
|
.fi
|
108
115
|
.UNINDENT
|
@@ -118,7 +125,7 @@ groonga は独自のカラムストアを持つ列指向のデータベースと
|
|
118
125
|
.sp
|
119
126
|
.nf
|
120
127
|
.ft C
|
121
|
-
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.
|
128
|
+
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.8\-x64.exe
|
122
129
|
.ft P
|
123
130
|
.fi
|
124
131
|
.UNINDENT
|
@@ -139,7 +146,7 @@ groonga は独自のカラムストアを持つ列指向のデータベースと
|
|
139
146
|
.sp
|
140
147
|
.nf
|
141
148
|
.ft C
|
142
|
-
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.
|
149
|
+
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.8\-x86.zip
|
143
150
|
.ft P
|
144
151
|
.fi
|
145
152
|
.UNINDENT
|
@@ -155,7 +162,7 @@ groonga は独自のカラムストアを持つ列指向のデータベースと
|
|
155
162
|
.sp
|
156
163
|
.nf
|
157
164
|
.ft C
|
158
|
-
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.
|
165
|
+
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/windows/groonga/groonga\-3.0.8\-x64.zip
|
159
166
|
.ft P
|
160
167
|
.fi
|
161
168
|
.UNINDENT
|
@@ -189,7 +196,7 @@ Microsoft Visual Studio 2010 Expressがインストールする \fBVisual Studio
|
|
189
196
|
.nf
|
190
197
|
.ft C
|
191
198
|
> cd c:\eUsers\e%USERNAME%\eDownloads
|
192
|
-
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/source/groonga/groonga\-3.0.
|
199
|
+
> "c:\e\eProgram Files\e\eInternet Explorer\e\eiexplore.exe" http://packages.groonga.org/source/groonga/groonga\-3.0.8.zip
|
193
200
|
.ft P
|
194
201
|
.fi
|
195
202
|
.UNINDENT
|
@@ -203,7 +210,7 @@ groongaのソースフォルダへと移動します:
|
|
203
210
|
.sp
|
204
211
|
.nf
|
205
212
|
.ft C
|
206
|
-
> cd c:\eUsers\e%USERNAME%\eDownloads\egroonga\-3.0.
|
213
|
+
> cd c:\eUsers\e%USERNAME%\eDownloads\egroonga\-3.0.8
|
207
214
|
.ft P
|
208
215
|
.fi
|
209
216
|
.UNINDENT
|
@@ -215,7 +222,7 @@ groongaのソースフォルダへと移動します:
|
|
215
222
|
.sp
|
216
223
|
.nf
|
217
224
|
.ft C
|
218
|
-
groonga\-3.0.
|
225
|
+
groonga\-3.0.8> cmake . \-G "Visual Studio 10 Win64" \-DCMAKE_INSTALL_PREFIX=C:\egroonga
|
219
226
|
.ft P
|
220
227
|
.fi
|
221
228
|
.UNINDENT
|
@@ -227,7 +234,7 @@ groonga\-3.0.5> cmake . \-G "Visual Studio 10 Win64" \-DCMAKE_INSTALL_PREFIX=C:\
|
|
227
234
|
.sp
|
228
235
|
.nf
|
229
236
|
.ft C
|
230
|
-
groonga\-3.0.
|
237
|
+
groonga\-3.0.8> cmake \-\-build . \-\-config Release
|
231
238
|
.ft P
|
232
239
|
.fi
|
233
240
|
.UNINDENT
|
@@ -239,7 +246,7 @@ groonga\-3.0.5> cmake \-\-build . \-\-config Release
|
|
239
246
|
.sp
|
240
247
|
.nf
|
241
248
|
.ft C
|
242
|
-
groonga\-3.0.
|
249
|
+
groonga\-3.0.8> cmake \-\-build . \-\-config Release \-\-target Install
|
243
250
|
.ft P
|
244
251
|
.fi
|
245
252
|
.UNINDENT
|
@@ -287,9 +294,9 @@ groonga\-3.0.5> cmake \-\-build . \-\-config Release \-\-target Install
|
|
287
294
|
.sp
|
288
295
|
.nf
|
289
296
|
.ft C
|
290
|
-
% curl \-O http://packages.groonga.org/source/groonga/groonga\-3.0.
|
291
|
-
% tar xvzf groonga\-3.0.
|
292
|
-
% cd groonga\-3.0.
|
297
|
+
% curl \-O http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
298
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
299
|
+
% cd groonga\-3.0.8
|
293
300
|
.ft P
|
294
301
|
.fi
|
295
302
|
.UNINDENT
|
@@ -666,9 +673,9 @@ groongaをビルドするために必要なパッケージをインストール
|
|
666
673
|
.sp
|
667
674
|
.nf
|
668
675
|
.ft C
|
669
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
670
|
-
% tar xvzf groonga\-3.0.
|
671
|
-
% cd groonga\-3.0.
|
676
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
677
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
678
|
+
% cd groonga\-3.0.8
|
672
679
|
.ft P
|
673
680
|
.fi
|
674
681
|
.UNINDENT
|
@@ -1117,9 +1124,9 @@ groongaをビルドするために必要なパッケージをインストール
|
|
1117
1124
|
.sp
|
1118
1125
|
.nf
|
1119
1126
|
.ft C
|
1120
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
1121
|
-
% tar xvzf groonga\-3.0.
|
1122
|
-
% cd groonga\-3.0.
|
1127
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
1128
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
1129
|
+
% cd groonga\-3.0.8
|
1123
1130
|
.ft P
|
1124
1131
|
.fi
|
1125
1132
|
.UNINDENT
|
@@ -1435,9 +1442,9 @@ groongaをビルドするために必要なパッケージをインストール
|
|
1435
1442
|
.sp
|
1436
1443
|
.nf
|
1437
1444
|
.ft C
|
1438
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
1439
|
-
% tar xvzf groonga\-3.0.
|
1440
|
-
% cd groonga\-3.0.
|
1445
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
1446
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
1447
|
+
% cd groonga\-3.0.8
|
1441
1448
|
.ft P
|
1442
1449
|
.fi
|
1443
1450
|
.UNINDENT
|
@@ -1509,7 +1516,7 @@ groonga\-server\-gqtp (GQTPサーバー)
|
|
1509
1516
|
詳細は \fB/server\fP を参照してください。
|
1510
1517
|
.UNINDENT
|
1511
1518
|
.UNINDENT
|
1512
|
-
.SS Fedora
|
1519
|
+
.SS Fedora 19
|
1513
1520
|
.sp
|
1514
1521
|
インストール:
|
1515
1522
|
.INDENT 0.0
|
@@ -1623,9 +1630,9 @@ groongaをビルドするために必要なパッケージをインストール
|
|
1623
1630
|
.sp
|
1624
1631
|
.nf
|
1625
1632
|
.ft C
|
1626
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
1627
|
-
% tar xvzf groonga\-3.0.
|
1628
|
-
% cd groonga\-3.0.
|
1633
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
1634
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
1635
|
+
% cd groonga\-3.0.8
|
1629
1636
|
.ft P
|
1630
1637
|
.fi
|
1631
1638
|
.UNINDENT
|
@@ -1689,9 +1696,9 @@ groongaをビルドするために必要なパッケージをインストール
|
|
1689
1696
|
.sp
|
1690
1697
|
.nf
|
1691
1698
|
.ft C
|
1692
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
1693
|
-
% gtar xvzf groonga\-3.0.
|
1694
|
-
% cd groonga\-3.0.
|
1699
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
1700
|
+
% gtar xvzf groonga\-3.0.8.tar.gz
|
1701
|
+
% cd groonga\-3.0.8
|
1695
1702
|
.ft P
|
1696
1703
|
.fi
|
1697
1704
|
.UNINDENT
|
@@ -1769,7 +1776,7 @@ CコンパイラーとC++コンパイラー ( \fBgcc\fP と \fBg++\fP がサ
|
|
1769
1776
|
.INDENT 3.5
|
1770
1777
|
.INDENT 0.0
|
1771
1778
|
.IP \(bu 2
|
1772
|
-
\fI\%pkg
|
1779
|
+
\fI\%pkg\-config\fP (ライブラリを検出するため)
|
1773
1780
|
.IP \(bu 2
|
1774
1781
|
\fI\%sudo\fP (ビルドしたgroongaをインストールするため)
|
1775
1782
|
.UNINDENT
|
@@ -1812,9 +1819,9 @@ groongaはGNUビルドシステムを使っています。以下は一番簡単
|
|
1812
1819
|
.sp
|
1813
1820
|
.nf
|
1814
1821
|
.ft C
|
1815
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.
|
1816
|
-
% tar xvzf groonga\-3.0.
|
1817
|
-
% cd groonga\-3.0.
|
1822
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.0.8.tar.gz
|
1823
|
+
% tar xvzf groonga\-3.0.8.tar.gz
|
1824
|
+
% cd groonga\-3.0.8
|
1818
1825
|
% ./configure
|
1819
1826
|
% make
|
1820
1827
|
% sudo make install
|
@@ -2067,10 +2074,10 @@ groongaに関する話題を扱うメーリングリストがあります。
|
|
2067
2074
|
.INDENT 0.0
|
2068
2075
|
.TP
|
2069
2076
|
.B For English speakers
|
2070
|
-
\fI\%groonga
|
2077
|
+
\fI\%groonga\-talk@lists.sourceforge.net\fP
|
2071
2078
|
.TP
|
2072
2079
|
.B For Japanese speakers
|
2073
|
-
\fI\%groonga
|
2080
|
+
\fI\%groonga\-dev@lists.sourceforge.jp\fP
|
2074
2081
|
.UNINDENT
|
2075
2082
|
.SS Twitter
|
2076
2083
|
.sp
|
@@ -2160,10 +2167,10 @@ status
|
|
2160
2167
|
# "max_command_version": 2,
|
2161
2168
|
# "n_queries": 0,
|
2162
2169
|
# "cache_hit_rate": 0.0,
|
2163
|
-
# "version": "3.0.
|
2164
|
-
# "alloc_count":
|
2170
|
+
# "version": "3.0.7",
|
2171
|
+
# "alloc_count": 154,
|
2165
2172
|
# "command_version": 1,
|
2166
|
-
# "starttime":
|
2173
|
+
# "starttime": 1377493494,
|
2167
2174
|
# "default_command_version": 1
|
2168
2175
|
# }
|
2169
2176
|
# ]
|
@@ -3314,10 +3321,10 @@ status
|
|
3314
3321
|
# "max_command_version": 2,
|
3315
3322
|
# "n_queries": 0,
|
3316
3323
|
# "cache_hit_rate": 0.0,
|
3317
|
-
# "version": "3.0.
|
3318
|
-
# "alloc_count":
|
3324
|
+
# "version": "3.0.7",
|
3325
|
+
# "alloc_count": 133,
|
3319
3326
|
# "command_version": 1,
|
3320
|
-
# "starttime":
|
3327
|
+
# "starttime": 1377493621,
|
3321
3328
|
# "default_command_version": 1
|
3322
3329
|
# }
|
3323
3330
|
# ]
|
@@ -3425,14 +3432,14 @@ status
|
|
3425
3432
|
# 0.000355720520019531
|
3426
3433
|
# ],
|
3427
3434
|
# {
|
3428
|
-
# "uptime":
|
3435
|
+
# "uptime": 1,
|
3429
3436
|
# "max_command_version": 2,
|
3430
3437
|
# "n_queries": 0,
|
3431
3438
|
# "cache_hit_rate": 0.0,
|
3432
|
-
# "version": "3.0.
|
3433
|
-
# "alloc_count":
|
3439
|
+
# "version": "3.0.7",
|
3440
|
+
# "alloc_count": 134,
|
3434
3441
|
# "command_version": 1,
|
3435
|
-
# "starttime":
|
3442
|
+
# "starttime": 1377493621,
|
3436
3443
|
# "default_command_version": 1
|
3437
3444
|
# }
|
3438
3445
|
# ]
|
@@ -5961,6 +5968,19 @@ select \-\-table Blog2 \-\-match_columns title \-\-query message
|
|
5961
5968
|
.fi
|
5962
5969
|
.UNINDENT
|
5963
5970
|
.UNINDENT
|
5971
|
+
.sp
|
5972
|
+
\fBノート:\fP
|
5973
|
+
.INDENT 0.0
|
5974
|
+
.INDENT 3.5
|
5975
|
+
"インデックスはどちらがよい方法なのか"と疑問に思うかも知れません。それは場合によります。
|
5976
|
+
.INDENT 0.0
|
5977
|
+
.IP \(bu 2
|
5978
|
+
カラムごとのインデックス \- マルチカラムインデックスよりも更新性能が良い傾向があります。一方、ディスク使用効率はあまり良くありません。
|
5979
|
+
.IP \(bu 2
|
5980
|
+
マルチカラムインデックス \- バッファを共有するためディスク使用効率が良いです。一方、更新性能があまり良くありません。
|
5981
|
+
.UNINDENT
|
5982
|
+
.UNINDENT
|
5983
|
+
.UNINDENT
|
5964
5984
|
.SS インデックス名を指定した全文検索
|
5965
5985
|
.sp
|
5966
5986
|
執筆中です。
|
@@ -8518,7 +8538,7 @@ groongaは位置情報データのうち座標データのみサポートして
|
|
8518
8538
|
以下の図はgroongaの位置情報検索機能を示しています。
|
8519
8539
|
.sp
|
8520
8540
|
以下の図はレコードのみがある図です。黒い点がレコードを表しています。以降の図ではレコードがどのように扱われるかを示します。
|
8521
|
-
[
|
8541
|
+
[画像: only records]
|
8522
8542
|
[画像]
|
8523
8543
|
.sp
|
8524
8544
|
執筆中。。。 ( \fI\%下書き\fP )
|
@@ -8534,10 +8554,23 @@ groongaは位置情報データのうち座標データのみサポートして
|
|
8534
8554
|
.IP \(bu 2
|
8535
8555
|
\fBgroonga\-server\-http\fP (簡易HTTPサーバー)
|
8536
8556
|
.IP \(bu 2
|
8537
|
-
\fBgroonga\-server\-gqtp\fP (
|
8557
|
+
\fBgroonga\-server\-gqtp\fP (\fB/spec/gqtp\fP サーバー)
|
8538
8558
|
.UNINDENT
|
8539
8559
|
.sp
|
8560
|
+
groongaがGQTPだけでなく、2つのHTTPサーバーパッケージをサポートしているのには理由があります。 \fB/spec/gqtp\fP \- Groonga Query Transfer Protocol はオーバーヘッドを低減し、パフォーマンスを向上させるように設計されていますが、HTTPプロトコルほどクライアントライブラリのサポートがありません。HTTPは枯れたプロトコルなので既存のツールを活用できたり、多くのクライアントライブラリが存在します。(詳細は \fI\%関連プロジェクト\fP を参照) \fBgroonga\-httpd\fP パッケージを使うと nginxの機能の恩恵を受けることができます。
|
8561
|
+
.sp
|
8562
|
+
最初は \fBgroonga\-server\-http\fP パッケージを使うことをおすすめします。それでもっと高機能なものを使いたくなったら、\fBgroonga\-httpd\fP パッケージを使ってください。プロトコルのオーバーヘッドがパフォーマンス上問題となったら \fBgroonga\-server\-gqtp\fP を検討してください。
|
8563
|
+
.INDENT 0.0
|
8564
|
+
.INDENT 3.5
|
8565
|
+
.sp
|
8566
|
+
\fBノート:\fP
|
8567
|
+
.INDENT 0.0
|
8568
|
+
.INDENT 3.5
|
8540
8569
|
\fBgroonga\-httpd\fP と \fBgroonga\-server\-http\fP パッケージは使用ポートが一緒なので衝突します。どちらのパッケージを使うのがいいのかは \fB/server/http/comparison\fP を参照してください。
|
8570
|
+
.UNINDENT
|
8571
|
+
.UNINDENT
|
8572
|
+
.UNINDENT
|
8573
|
+
.UNINDENT
|
8541
8574
|
.SS groonga\-httpd
|
8542
8575
|
.sp
|
8543
8576
|
\fBgroonga\-httpd\fP はnginxをベースにしたHTTPサーバーパッケージです。
|
@@ -8762,7 +8795,7 @@ groonga HTTPサーバーを終了(Debian/Ubuntu/CentOS):
|
|
8762
8795
|
.UNINDENT
|
8763
8796
|
.UNINDENT
|
8764
8797
|
.sp
|
8765
|
-
groonga
|
8798
|
+
groonga HTTPサーバーを終了(Fedora):
|
8766
8799
|
.INDENT 0.0
|
8767
8800
|
.INDENT 3.5
|
8768
8801
|
.sp
|
@@ -8800,7 +8833,7 @@ groonga HTTPサーバーを再起動(Fedora):
|
|
8800
8833
|
.UNINDENT
|
8801
8834
|
.SS groonga\-server\-gqtp
|
8802
8835
|
.sp
|
8803
|
-
\fBgroonga\-server\-gqtp\fP は
|
8836
|
+
\fBgroonga\-server\-gqtp\fP は \fB/spec/gqtp\fP サーバーパッケージです。
|
8804
8837
|
.TS
|
8805
8838
|
center;
|
8806
8839
|
|l|l|.
|
@@ -10157,14 +10190,14 @@ http {
|
|
10157
10190
|
0.000355720520019531
|
10158
10191
|
],
|
10159
10192
|
{
|
10160
|
-
"uptime":
|
10193
|
+
"uptime": 0,
|
10161
10194
|
"max_command_version": 2,
|
10162
10195
|
"n_queries": 0,
|
10163
10196
|
"cache_hit_rate": 0.0,
|
10164
|
-
"version": "3.0.
|
10165
|
-
"alloc_count":
|
10197
|
+
"version": "3.0.7",
|
10198
|
+
"alloc_count": 154,
|
10166
10199
|
"command_version": 1,
|
10167
|
-
"starttime":
|
10200
|
+
"starttime": 1377493431,
|
10168
10201
|
"default_command_version": 1
|
10169
10202
|
}
|
10170
10203
|
]
|
@@ -10260,6 +10293,9 @@ groonga_database /path/to/groonga/database;
|
|
10260
10293
|
.UNINDENT
|
10261
10294
|
.sp
|
10262
10295
|
groongaデータベースのパスを指定します。このディレクティブは必須です。
|
10296
|
+
.SS \fBgroonga_database_auto_create\fP
|
10297
|
+
.sp
|
10298
|
+
TODO
|
10263
10299
|
.SS \fBgroonga_base_path\fP
|
10264
10300
|
.sp
|
10265
10301
|
書式:
|
@@ -10314,6 +10350,139 @@ location /d/ {
|
|
10314
10350
|
.fi
|
10315
10351
|
.UNINDENT
|
10316
10352
|
.UNINDENT
|
10353
|
+
.SS \fBgroonga_log_path\fP
|
10354
|
+
.sp
|
10355
|
+
書式:
|
10356
|
+
.INDENT 0.0
|
10357
|
+
.INDENT 3.5
|
10358
|
+
.sp
|
10359
|
+
.nf
|
10360
|
+
.ft C
|
10361
|
+
groonga_log_path path | off;
|
10362
|
+
.ft P
|
10363
|
+
.fi
|
10364
|
+
.UNINDENT
|
10365
|
+
.UNINDENT
|
10366
|
+
.INDENT 0.0
|
10367
|
+
.TP
|
10368
|
+
.B Default
|
10369
|
+
\fB/var/log/groonga/httpd/groonga.log\fP
|
10370
|
+
.TP
|
10371
|
+
.B Context
|
10372
|
+
\fBhttp\fP, \fBserver\fP, \fBlocation\fP
|
10373
|
+
.UNINDENT
|
10374
|
+
.sp
|
10375
|
+
groongaのログ保存先を \fBhttp\fP 、\fBserver\fP もしくは \fBlocation\fP ブロックで指定します。デフォルトは \fB/var/log/groonga/httpd/groonga.log\fP です。ログを無効にするには \fBoff\fP を指定します。
|
10376
|
+
.sp
|
10377
|
+
例:
|
10378
|
+
.INDENT 0.0
|
10379
|
+
.INDENT 3.5
|
10380
|
+
.sp
|
10381
|
+
.nf
|
10382
|
+
.ft C
|
10383
|
+
location /d/ {
|
10384
|
+
groonga on;
|
10385
|
+
# You can disable log for groonga.
|
10386
|
+
groonga_log_path off;
|
10387
|
+
}
|
10388
|
+
.ft P
|
10389
|
+
.fi
|
10390
|
+
.UNINDENT
|
10391
|
+
.UNINDENT
|
10392
|
+
.SS \fBgroonga_log_level\fP
|
10393
|
+
.sp
|
10394
|
+
書式:
|
10395
|
+
.INDENT 0.0
|
10396
|
+
.INDENT 3.5
|
10397
|
+
.sp
|
10398
|
+
.nf
|
10399
|
+
.ft C
|
10400
|
+
groonga_log_level none | emergency | alert | ciritical | error | warning | notice | info | debug | dump;
|
10401
|
+
.ft P
|
10402
|
+
.fi
|
10403
|
+
.UNINDENT
|
10404
|
+
.UNINDENT
|
10405
|
+
.INDENT 0.0
|
10406
|
+
.TP
|
10407
|
+
.B Default
|
10408
|
+
\fBnotice\fP
|
10409
|
+
.TP
|
10410
|
+
.B Context
|
10411
|
+
\fBhttp\fP, \fBserver\fP, \fBlocation\fP
|
10412
|
+
.UNINDENT
|
10413
|
+
.sp
|
10414
|
+
groongaのログレベルを \fBhttp\fP 、 \fBserver\fP もしくは \fBlocation\fP ブロックで指定します。デフォルトは \fBnotice\fP です。 \fBnone\fP を指定することでログを無効にできます。
|
10415
|
+
.sp
|
10416
|
+
例:
|
10417
|
+
.INDENT 0.0
|
10418
|
+
.INDENT 3.5
|
10419
|
+
.sp
|
10420
|
+
.nf
|
10421
|
+
.ft C
|
10422
|
+
location /d/ {
|
10423
|
+
groonga on;
|
10424
|
+
# You can customize log level for groonga.
|
10425
|
+
groonga_log_level notice;
|
10426
|
+
}
|
10427
|
+
.ft P
|
10428
|
+
.fi
|
10429
|
+
.UNINDENT
|
10430
|
+
.UNINDENT
|
10431
|
+
.SS \fBgroonga_query_log_path\fP
|
10432
|
+
.sp
|
10433
|
+
書式:
|
10434
|
+
.INDENT 0.0
|
10435
|
+
.INDENT 3.5
|
10436
|
+
.sp
|
10437
|
+
.nf
|
10438
|
+
.ft C
|
10439
|
+
groonga_query_log_path path | off;
|
10440
|
+
.ft P
|
10441
|
+
.fi
|
10442
|
+
.UNINDENT
|
10443
|
+
.UNINDENT
|
10444
|
+
.INDENT 0.0
|
10445
|
+
.TP
|
10446
|
+
.B Default
|
10447
|
+
\fB/var/log/groonga/httpd/groonga\-query.log\fP
|
10448
|
+
.TP
|
10449
|
+
.B Context
|
10450
|
+
\fBhttp\fP, \fBserver\fP, \fBlocation\fP
|
10451
|
+
.UNINDENT
|
10452
|
+
.sp
|
10453
|
+
groongaのクエリーログの保存先を \fBhttp\fP 、\fBserver\fP もしくは \fBlocation\fP ブロックで指定します。デフォルトは \fB/var/log/groonga/httpd/groonga\-query.log\fP です。ログを無効にするには \fBoff\fP を指定します。
|
10454
|
+
.sp
|
10455
|
+
例:
|
10456
|
+
.INDENT 0.0
|
10457
|
+
.INDENT 3.5
|
10458
|
+
.sp
|
10459
|
+
.nf
|
10460
|
+
.ft C
|
10461
|
+
location /d/ {
|
10462
|
+
groonga on;
|
10463
|
+
# You can disable query log for groonga.
|
10464
|
+
groonga_query_log_path off;
|
10465
|
+
}
|
10466
|
+
.ft P
|
10467
|
+
.fi
|
10468
|
+
.UNINDENT
|
10469
|
+
.UNINDENT
|
10470
|
+
.sp
|
10471
|
+
クエリーログは以下のようなケースで有用です:
|
10472
|
+
.INDENT 0.0
|
10473
|
+
.INDENT 3.5
|
10474
|
+
.INDENT 0.0
|
10475
|
+
.IP \(bu 2
|
10476
|
+
スロークエリーを見つける。
|
10477
|
+
.IP \(bu 2
|
10478
|
+
デバッグ。
|
10479
|
+
.UNINDENT
|
10480
|
+
.UNINDENT
|
10481
|
+
.UNINDENT
|
10482
|
+
.sp
|
10483
|
+
\fI\%groonga\-query\-log パッケージ\fP でクエリーログを解析できます。このパッケージは有用なツールを提供しています。
|
10484
|
+
.sp
|
10485
|
+
例えば、クエリーログを解析するツールがあります。これを使えば、スロークエリーを見つけることができます。クエリーログ内のすべてのクエリーを再生するツールもあります。これを使えば、新しいgroongaをプロダクション環境にデプロイする前に網羅的にテストすることができます。
|
10317
10486
|
.SS 性能関連のディレクティブ
|
10318
10487
|
.sp
|
10319
10488
|
以下のディレクティブはgronoga\-httpdの性能に関連しているディレクティブです。
|
@@ -10324,6 +10493,161 @@ location /d/ {
|
|
10324
10493
|
このディレクティブはgroonga\-httpdのディレクティブではなく、nginxのディレクティブです。詳細は、 \fI\%http://wiki.nginx.org/CoreModule#worker_processes\fP を参照してください。
|
10325
10494
|
.sp
|
10326
10495
|
デフォルトで、このディレクティブには1が設定されています。
|
10496
|
+
.SS \fBproxy_cache\fP
|
10497
|
+
.sp
|
10498
|
+
まとめると、groonga組み込みのクエリーキャッシュ機能の代わりにnginxのリバースプロ機とキャッシュの仕組みを使うこともできます。
|
10499
|
+
.SS クエリーキャッシュ
|
10500
|
+
.sp
|
10501
|
+
groongaは \fB/reference/commands/select\fP コマンド用にクエリーキャッシュ機能を提供しています。この機能は多くのケースで性能向上を実現します。
|
10502
|
+
.sp
|
10503
|
+
クエリーキャッシュ機能は \fB/reference/commands/cache_limit\fP コマンドを使っていないあるいはワーカー数が1だけの場合はgroonga\-httpd上でもきちんと動作します。通常、 \fB/reference/commands/cache_limit\fP コマンドは使わないので、多くの場合は問題がありません。
|
10504
|
+
.sp
|
10505
|
+
2ワーカー以上で:doc:\fI/reference/commands/cache_limit\fP コマンドを使ったときの問題点を説明します。
|
10506
|
+
.sp
|
10507
|
+
groongaのクエリーキャッシュは同じプロセス内で有効です。これは、同じキャッシュを複数のワーカー間で共有できないということです。キャッシュサイズを変更しないならこれは大きな問題ではありません。もし、 :doc:
|
10508
|
+
.nf
|
10509
|
+
\(ga
|
10510
|
+
.fi
|
10511
|
+
/reference/commands/cache_limit\(gaコマンドでキャッシュサイズを変更したいなら問題になります。
|
10512
|
+
.sp
|
10513
|
+
すべてのワーカーのキャッシュサイズを変更する汎用的な方法がないのです。
|
10514
|
+
.sp
|
10515
|
+
例えば、3ワーカーいるとします:
|
10516
|
+
.INDENT 0.0
|
10517
|
+
.INDENT 3.5
|
10518
|
+
.sp
|
10519
|
+
.nf
|
10520
|
+
.ft C
|
10521
|
+
+\-\- worker 1
|
10522
|
+
client \-\- groonga\-httpd (master) \-\-+\-\- worker 2
|
10523
|
+
+\-\- worker 3
|
10524
|
+
.ft P
|
10525
|
+
.fi
|
10526
|
+
.UNINDENT
|
10527
|
+
.UNINDENT
|
10528
|
+
.sp
|
10529
|
+
クライアントが \fB/reference/commands/cache_limit\fP コマンドをリクエストし、worker 1が受け取りました:
|
10530
|
+
.INDENT 0.0
|
10531
|
+
.INDENT 3.5
|
10532
|
+
.sp
|
10533
|
+
.nf
|
10534
|
+
.ft C
|
10535
|
+
+\-> worker 1 (changed!)
|
10536
|
+
client \-> groonga\-httpd (master) \-\-+\-\- worker 2
|
10537
|
+
+\-\- worker 3
|
10538
|
+
.ft P
|
10539
|
+
.fi
|
10540
|
+
.UNINDENT
|
10541
|
+
.UNINDENT
|
10542
|
+
.sp
|
10543
|
+
クライアントがもう一度 \fB/reference/commands/cache_limit\fP コマンドをリクエストし、またworker 1が受け取りました:
|
10544
|
+
.INDENT 0.0
|
10545
|
+
.INDENT 3.5
|
10546
|
+
.sp
|
10547
|
+
.nf
|
10548
|
+
.ft C
|
10549
|
+
+\-> worker 1 (changed again!!!)
|
10550
|
+
client \-> groonga\-httpd (master) \-\-+\-\- worker 2
|
10551
|
+
+\-\- worker 3
|
10552
|
+
.ft P
|
10553
|
+
.fi
|
10554
|
+
.UNINDENT
|
10555
|
+
.UNINDENT
|
10556
|
+
.sp
|
10557
|
+
この場合、worker 2とworker 3は1つもリクエストを受けとっていません。そのため、これらのワーカーのキャッシュサイズは変更されていません。
|
10558
|
+
.sp
|
10559
|
+
クライアントはワーカーを選ぶことができないので、 \fB/reference/commands/cache_limit\fP コマンドですべてのワーカのキャッシュサイズを変更することができないのです。
|
10560
|
+
.SS リバースプロキシとキャッシュ
|
10561
|
+
.sp
|
10562
|
+
nginxのリバースプロキシ機能とキャッシュ機能を使ってクエリーキャッシュを実現できます:
|
10563
|
+
.INDENT 0.0
|
10564
|
+
.INDENT 3.5
|
10565
|
+
.sp
|
10566
|
+
.nf
|
10567
|
+
.ft C
|
10568
|
+
+\-\- worker 1
|
10569
|
+
client \-\- groonga\-httpd (master) \-\- reverse proxy + cache \-\-+\-\- worker 2
|
10570
|
+
+\-\- worker 3
|
10571
|
+
.ft P
|
10572
|
+
.fi
|
10573
|
+
.UNINDENT
|
10574
|
+
.UNINDENT
|
10575
|
+
.sp
|
10576
|
+
この方法ではすべてのワーカーで同じキャッシュの設定をりようできますが、HTTPで動的にキャッシュの設定を変更することはできません。
|
10577
|
+
.sp
|
10578
|
+
以下はサンプルの設定です:
|
10579
|
+
.INDENT 0.0
|
10580
|
+
.INDENT 3.5
|
10581
|
+
.sp
|
10582
|
+
.nf
|
10583
|
+
.ft C
|
10584
|
+
\&...
|
10585
|
+
http {
|
10586
|
+
proxy_cache_path /var/cache/groonga\-httpd levels=1:2 keys_zone=groonga:10m;
|
10587
|
+
proxy_cache_valid 10m;
|
10588
|
+
...
|
10589
|
+
# Reverse proxy and cache
|
10590
|
+
server {
|
10591
|
+
listen 10041;
|
10592
|
+
...
|
10593
|
+
# Only select command
|
10594
|
+
location /d/select {
|
10595
|
+
# Pass through groonga with cache
|
10596
|
+
proxy_cache groonga;
|
10597
|
+
proxy_pass http://localhost:20041;
|
10598
|
+
}
|
10599
|
+
|
10600
|
+
location / {
|
10601
|
+
# Pass through groonga
|
10602
|
+
proxy_pass http://localhost:20041;
|
10603
|
+
}
|
10604
|
+
}
|
10605
|
+
|
10606
|
+
# groonga
|
10607
|
+
server {
|
10608
|
+
location 20041;
|
10609
|
+
location /d/ {
|
10610
|
+
groonga on;
|
10611
|
+
groonga_database /var/lib/groonga/db/db;
|
10612
|
+
}
|
10613
|
+
}
|
10614
|
+
...
|
10615
|
+
}
|
10616
|
+
.ft P
|
10617
|
+
.fi
|
10618
|
+
.UNINDENT
|
10619
|
+
.UNINDENT
|
10620
|
+
.sp
|
10621
|
+
パラメーターの詳細は以下のnginxのドキュメントを見てください:
|
10622
|
+
.INDENT 0.0
|
10623
|
+
.INDENT 3.5
|
10624
|
+
.INDENT 0.0
|
10625
|
+
.IP \(bu 2
|
10626
|
+
\fI\%http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path\fP
|
10627
|
+
.IP \(bu 2
|
10628
|
+
\fI\%http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid\fP
|
10629
|
+
.IP \(bu 2
|
10630
|
+
\fI\%http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache\fP
|
10631
|
+
.IP \(bu 2
|
10632
|
+
\fI\%http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass\fP
|
10633
|
+
.UNINDENT
|
10634
|
+
.UNINDENT
|
10635
|
+
.UNINDENT
|
10636
|
+
.sp
|
10637
|
+
groongaに新しいデータをロードしたときは自分でnginxが作ったキャッシュファイルを削除しなければいけないことに注意してください。前述のサンプル設定では、以下のコマンドでキャッシュを消せます:
|
10638
|
+
.INDENT 0.0
|
10639
|
+
.INDENT 3.5
|
10640
|
+
.sp
|
10641
|
+
.nf
|
10642
|
+
.ft C
|
10643
|
+
% groonga DB_PATH < load.grn
|
10644
|
+
% rm \-rf /var/cache/groonga\-httpd/*
|
10645
|
+
.ft P
|
10646
|
+
.fi
|
10647
|
+
.UNINDENT
|
10648
|
+
.UNINDENT
|
10649
|
+
.sp
|
10650
|
+
groongaのクエリーキャッシュ機能を使うと、手動でキャッシュを失効する必要はありません。自動で失効します。
|
10327
10651
|
.SS 利用可能なnginxモジュール
|
10328
10652
|
.sp
|
10329
10653
|
全てのHTTPの標準モジュールが利用可能です。PCRE(Perl Compatible Regular Expressions)がない場合はHttpRewriteModuleは無効になります。標準モジュールの一覧は、 \fI\%http://wiki.nginx.org/Modules\fP を参照してください。
|
@@ -11160,67 +11484,102 @@ TODO
|
|
11160
11484
|
.IP \(bu 2
|
11161
11485
|
\fB/spec/gqtp\fP: GQTPプロトコルもステータスとしてリターンコードを使っていますが、ステータスは2バイトの符号なし整数です。そのため、GQTPプロトコルでは、負の値のリターンコードは正の値のステータスになります。GQTPプロトコルのステータスの値を2バイトの符号付き整数として扱うとステータスをリターンコードに変換できます。
|
11162
11486
|
.UNINDENT
|
11163
|
-
.SS
|
11164
|
-
.SS
|
11487
|
+
.SS \fBcache_limit\fP
|
11488
|
+
.SS 概要
|
11165
11489
|
.sp
|
11166
|
-
|
11167
|
-
.
|
11490
|
+
\fBcache_limit\fP は最大クエリーキャッシュエントリー数を取得・設定します。クエリーキャッシュを使っているのは \fBselect\fP コマンドだけです。
|
11491
|
+
.sp
|
11492
|
+
最大クエリーキャッシュエントリー数が100の場合は、最新の100 \fBselect\fP コマンドの結果だけキャッシュします。キャッシュを失効するアルゴリズムはLRU(Least Recently Used)です。
|
11493
|
+
.SS 構文
|
11494
|
+
.sp
|
11495
|
+
\fBcache_limit\fP には省略可能な引数が1つあります:
|
11168
11496
|
.INDENT 0.0
|
11169
11497
|
.INDENT 3.5
|
11170
11498
|
.sp
|
11171
11499
|
.nf
|
11172
11500
|
.ft C
|
11173
|
-
cache_limit max
|
11501
|
+
cache_limit [max=null]
|
11174
11502
|
.ft P
|
11175
11503
|
.fi
|
11176
11504
|
.UNINDENT
|
11177
11505
|
.UNINDENT
|
11178
|
-
.SS
|
11179
|
-
.sp
|
11180
|
-
groonga組込コマンドの一つであるcache_limitについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
11506
|
+
.SS 使い方
|
11181
11507
|
.sp
|
11182
|
-
|
11183
|
-
.SS 引数
|
11508
|
+
引数なしで \fBcache_limit\fP を実行すると現在の最大キャッシュエントリー数を取得できます。
|
11184
11509
|
.sp
|
11185
|
-
|
11186
|
-
.INDENT 0.0
|
11187
|
-
.INDENT 3.5
|
11188
|
-
クエリキャッシュの最大件数を整数で指定します。
|
11189
|
-
maxが指定されなかった場合には、クエリキャッシュの最大件数は変更せず、
|
11190
|
-
現在の設定値のみが返されます。
|
11191
|
-
.UNINDENT
|
11192
|
-
.UNINDENT
|
11193
|
-
.SS 返値
|
11194
|
-
.SS json
|
11510
|
+
実行例:
|
11195
11511
|
.INDENT 0.0
|
11196
11512
|
.INDENT 3.5
|
11197
11513
|
.sp
|
11198
11514
|
.nf
|
11199
11515
|
.ft C
|
11200
|
-
|
11516
|
+
cache_limit
|
11517
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 100]
|
11201
11518
|
.ft P
|
11202
11519
|
.fi
|
11203
11520
|
.UNINDENT
|
11204
11521
|
.UNINDENT
|
11205
11522
|
.sp
|
11206
|
-
\
|
11523
|
+
\fBmax\fP 引数つきで \fBcache_limit\fP を実行すると最大キャッシュエントリー数を設定できます。
|
11524
|
+
.sp
|
11525
|
+
次の例は最大キャッシュエントリー数を \fB10\fP に設定する例です。
|
11526
|
+
.sp
|
11527
|
+
実行例:
|
11207
11528
|
.INDENT 0.0
|
11208
11529
|
.INDENT 3.5
|
11209
|
-
|
11530
|
+
.sp
|
11531
|
+
.nf
|
11532
|
+
.ft C
|
11533
|
+
cache_limit 10
|
11534
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 100]
|
11535
|
+
cache_limit
|
11536
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 10]
|
11537
|
+
.ft P
|
11538
|
+
.fi
|
11210
11539
|
.UNINDENT
|
11211
11540
|
.UNINDENT
|
11212
|
-
.
|
11541
|
+
.sp
|
11542
|
+
\fBmax\fP 引数を使うと、指定したあたいに設定される前の最大キャッシュエントリー数が戻り値になります。
|
11543
|
+
.SS 引数
|
11544
|
+
.sp
|
11545
|
+
このセクションではすべての引数について説明します。
|
11546
|
+
.SS \fBmax\fP
|
11547
|
+
.sp
|
11548
|
+
数値で最大クエリーキャッシュエントリー数を指定します。
|
11549
|
+
.sp
|
11550
|
+
\fBmax\fP 引数が指定されていない場合は、現在の最大クエリーキャッシュエントリー数は変わりません。 \fBcache_limit\fP は単に現在の最大クエリーキャッシュエントリー数を返します。
|
11551
|
+
.SS 戻り値
|
11552
|
+
.sp
|
11553
|
+
\fBcache_limit\fP は現在の最大クエリーキャッシュエントリー数を返します:
|
11213
11554
|
.INDENT 0.0
|
11214
11555
|
.INDENT 3.5
|
11215
11556
|
.sp
|
11216
11557
|
.nf
|
11217
11558
|
.ft C
|
11218
|
-
|
11219
|
-
[100]
|
11559
|
+
[[HEADER, n_entries]]
|
11220
11560
|
.ft P
|
11221
11561
|
.fi
|
11222
11562
|
.UNINDENT
|
11223
11563
|
.UNINDENT
|
11564
|
+
.sp
|
11565
|
+
\fBHEADER\fP
|
11566
|
+
.INDENT 0.0
|
11567
|
+
.INDENT 3.5
|
11568
|
+
\fBHEADER\fP については \fB/reference/command/output_format\fP を参照してください。
|
11569
|
+
.UNINDENT
|
11570
|
+
.UNINDENT
|
11571
|
+
.sp
|
11572
|
+
\fBn_entries\fP
|
11573
|
+
.INDENT 0.0
|
11574
|
+
.INDENT 3.5
|
11575
|
+
\fBn_entries\fP は現在の最大クエリーキャッシュエントリー数です。これは数値です。
|
11576
|
+
.UNINDENT
|
11577
|
+
.UNINDENT
|
11578
|
+
.SS 参考
|
11579
|
+
.INDENT 0.0
|
11580
|
+
.IP \(bu 2
|
11581
|
+
\fBselect\fP
|
11582
|
+
.UNINDENT
|
11224
11583
|
.SS check
|
11225
11584
|
.SS 名前
|
11226
11585
|
.sp
|
@@ -12238,7 +12597,7 @@ define_selector entry_selector Entry
|
|
12238
12597
|
.SS defrag
|
12239
12598
|
.SS 名前
|
12240
12599
|
.sp
|
12241
|
-
|
12600
|
+
\fBdefrag\fP コマンドは指定されたオブジェクトのフラグメンテーションを解消します。
|
12242
12601
|
.SS 書式
|
12243
12602
|
.INDENT 0.0
|
12244
12603
|
.INDENT 3.5
|
@@ -12309,11 +12668,16 @@ defrag Entry.body
|
|
12309
12668
|
.fi
|
12310
12669
|
.UNINDENT
|
12311
12670
|
.UNINDENT
|
12312
|
-
.SS
|
12313
|
-
.SS
|
12671
|
+
.SS \fBdelete\fP
|
12672
|
+
.SS 概要
|
12314
12673
|
.sp
|
12315
|
-
|
12316
|
-
.SS
|
12674
|
+
\fBdelete\fP コマンドは指定したテーブルのレコードを削除します。
|
12675
|
+
.SS カスケード削除
|
12676
|
+
.sp
|
12677
|
+
複数のテーブルが関連付けられていることがあります。例えば、あるテーブルのキーが他のテーブルのレコードで参照されているような場合です。そのような場合にそのテーブルのキーを削除するなら、他のテーブルのレコードも削除されます。
|
12678
|
+
.sp
|
12679
|
+
他のテーブルのカラムの型がCOLUMN_VECTORなら、ベクターで参照しているキーだけが削除されます。
|
12680
|
+
.SS 構文
|
12317
12681
|
.INDENT 0.0
|
12318
12682
|
.INDENT 3.5
|
12319
12683
|
.sp
|
@@ -12324,77 +12688,240 @@ delete table [key [id [filter]]]
|
|
12324
12688
|
.fi
|
12325
12689
|
.UNINDENT
|
12326
12690
|
.UNINDENT
|
12327
|
-
.SS
|
12691
|
+
.SS 使い方
|
12692
|
+
.sp
|
12693
|
+
使い方を示すために使うスキーマ定義とサンプルデータは以下の通りです。
|
12694
|
+
.sp
|
12695
|
+
"2"をキーとしてもつEntryテーブルからレコードを削除します。
|
12696
|
+
.sp
|
12697
|
+
実行例:
|
12698
|
+
.INDENT 0.0
|
12699
|
+
.INDENT 3.5
|
12700
|
+
.sp
|
12701
|
+
.nf
|
12702
|
+
.ft C
|
12703
|
+
delete Entry 2
|
12704
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12705
|
+
select Entry
|
12706
|
+
# [
|
12707
|
+
# [
|
12708
|
+
# 0,
|
12709
|
+
# 1337566253.89858,
|
12710
|
+
# 0.000355720520019531
|
12711
|
+
# ],
|
12712
|
+
# [
|
12713
|
+
# [
|
12714
|
+
# [
|
12715
|
+
# 1
|
12716
|
+
# ],
|
12717
|
+
# [
|
12718
|
+
# [
|
12719
|
+
# "_id",
|
12720
|
+
# "UInt32"
|
12721
|
+
# ],
|
12722
|
+
# [
|
12723
|
+
# "_key",
|
12724
|
+
# "UInt32"
|
12725
|
+
# ],
|
12726
|
+
# [
|
12727
|
+
# "status",
|
12728
|
+
# "ShortText"
|
12729
|
+
# ]
|
12730
|
+
# ],
|
12731
|
+
# [
|
12732
|
+
# 1,
|
12733
|
+
# 1,
|
12734
|
+
# "OK"
|
12735
|
+
# ]
|
12736
|
+
# ]
|
12737
|
+
# ]
|
12738
|
+
# ]
|
12739
|
+
.ft P
|
12740
|
+
.fi
|
12741
|
+
.UNINDENT
|
12742
|
+
.UNINDENT
|
12743
|
+
.sp
|
12744
|
+
以下はカスケード削除の例です。
|
12745
|
+
.sp
|
12746
|
+
UsersテーブルのcountryカラムはCountryテーブルと関連しています。
|
12747
|
+
.sp
|
12748
|
+
"カスケード削除"は指定されたキーやそのキーを参照しているレコードを削除します。
|
12328
12749
|
.sp
|
12329
|
-
|
12750
|
+
実行例:
|
12751
|
+
.INDENT 0.0
|
12752
|
+
.INDENT 3.5
|
12330
12753
|
.sp
|
12331
|
-
|
12754
|
+
.nf
|
12755
|
+
.ft C
|
12756
|
+
table_create Country TABLE_HASH_KEY ShortText
|
12757
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12758
|
+
table_create Users TABLE_HASH_KEY UInt32
|
12759
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12760
|
+
column_create Users name COLUMN_SCALAR ShortText
|
12761
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12762
|
+
column_create Users country COLUMN_SCALAR Country
|
12763
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12764
|
+
load \-\-table Users
|
12765
|
+
[
|
12766
|
+
{"_key": 1, "name": "John", country: "United States"}
|
12767
|
+
{"_key": 2, "name": "Mike", country: "United States"}
|
12768
|
+
{"_key": 3, "name": "Takashi", country: "Japan"}
|
12769
|
+
{"_key": 4, "name": "Hanako", country: "Japan"}
|
12770
|
+
]
|
12771
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 4]
|
12772
|
+
load \-\-table Country
|
12773
|
+
[
|
12774
|
+
{"_key": "United States"}
|
12775
|
+
{"_key": "Japan"}
|
12776
|
+
]
|
12777
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 2]
|
12778
|
+
delete Country "United States"
|
12779
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
12780
|
+
select Country
|
12781
|
+
# [
|
12782
|
+
# [
|
12783
|
+
# 0,
|
12784
|
+
# 1337566253.89858,
|
12785
|
+
# 0.000355720520019531
|
12786
|
+
# ],
|
12787
|
+
# [
|
12788
|
+
# [
|
12789
|
+
# [
|
12790
|
+
# 1
|
12791
|
+
# ],
|
12792
|
+
# [
|
12793
|
+
# [
|
12794
|
+
# "_id",
|
12795
|
+
# "UInt32"
|
12796
|
+
# ],
|
12797
|
+
# [
|
12798
|
+
# "_key",
|
12799
|
+
# "ShortText"
|
12800
|
+
# ]
|
12801
|
+
# ],
|
12802
|
+
# [
|
12803
|
+
# 2,
|
12804
|
+
# "Japan"
|
12805
|
+
# ]
|
12806
|
+
# ]
|
12807
|
+
# ]
|
12808
|
+
# ]
|
12809
|
+
select Users
|
12810
|
+
# [
|
12811
|
+
# [
|
12812
|
+
# 0,
|
12813
|
+
# 1337566253.89858,
|
12814
|
+
# 0.000355720520019531
|
12815
|
+
# ],
|
12816
|
+
# [
|
12817
|
+
# [
|
12818
|
+
# [
|
12819
|
+
# 4
|
12820
|
+
# ],
|
12821
|
+
# [
|
12822
|
+
# [
|
12823
|
+
# "_id",
|
12824
|
+
# "UInt32"
|
12825
|
+
# ],
|
12826
|
+
# [
|
12827
|
+
# "_key",
|
12828
|
+
# "UInt32"
|
12829
|
+
# ],
|
12830
|
+
# [
|
12831
|
+
# "country",
|
12832
|
+
# "Country"
|
12833
|
+
# ],
|
12834
|
+
# [
|
12835
|
+
# "name",
|
12836
|
+
# "ShortText"
|
12837
|
+
# ]
|
12838
|
+
# ],
|
12839
|
+
# [
|
12840
|
+
# 1,
|
12841
|
+
# 1,
|
12842
|
+
# "",
|
12843
|
+
# "John"
|
12844
|
+
# ],
|
12845
|
+
# [
|
12846
|
+
# 2,
|
12847
|
+
# 2,
|
12848
|
+
# "",
|
12849
|
+
# "Mike"
|
12850
|
+
# ],
|
12851
|
+
# [
|
12852
|
+
# 3,
|
12853
|
+
# 3,
|
12854
|
+
# "Japan",
|
12855
|
+
# "Takashi"
|
12856
|
+
# ],
|
12857
|
+
# [
|
12858
|
+
# 4,
|
12859
|
+
# 4,
|
12860
|
+
# "Japan",
|
12861
|
+
# "Hanako"
|
12862
|
+
# ]
|
12863
|
+
# ]
|
12864
|
+
# ]
|
12865
|
+
# ]
|
12866
|
+
.ft P
|
12867
|
+
.fi
|
12868
|
+
.UNINDENT
|
12869
|
+
.UNINDENT
|
12332
12870
|
.SS 引数
|
12333
12871
|
.sp
|
12334
12872
|
\fBtable\fP
|
12335
12873
|
.INDENT 0.0
|
12336
12874
|
.INDENT 3.5
|
12337
|
-
|
12875
|
+
レコードを削除するテーブルの名前を指定します。
|
12338
12876
|
.UNINDENT
|
12339
12877
|
.UNINDENT
|
12340
12878
|
.sp
|
12341
12879
|
\fBkey\fP
|
12342
12880
|
.INDENT 0.0
|
12343
12881
|
.INDENT 3.5
|
12344
|
-
|
12882
|
+
削除するレコードのキーを指定します。TABLE_NO_KEYを対象となるテーブルに使用しているなら、指定したキーは無視されます。(そのような場合には 引数 \fBid\fP を使います。)
|
12345
12883
|
.UNINDENT
|
12346
12884
|
.UNINDENT
|
12347
12885
|
.sp
|
12348
12886
|
\fBid\fP
|
12349
12887
|
.INDENT 0.0
|
12350
12888
|
.INDENT 3.5
|
12351
|
-
|
12889
|
+
削除するレコードのIDを指定します。 引数 \fBid\fP を指定する場合、引数 \fBkey\fP を指定してはいけません。
|
12352
12890
|
.UNINDENT
|
12353
12891
|
.UNINDENT
|
12354
12892
|
.sp
|
12355
12893
|
\fBfilter\fP
|
12356
12894
|
.INDENT 0.0
|
12357
12895
|
.INDENT 3.5
|
12358
|
-
|
12896
|
+
レコードを特定するためのgrn_exprの式を指定します。引数 \fBfilter\fP を指定するなら、引数 \fBkey\fP や \fBid\fP を指定してはいけません。
|
12359
12897
|
.UNINDENT
|
12360
12898
|
.UNINDENT
|
12361
|
-
.
|
12362
|
-
返値
|
12363
|
-
\-\-\-
|
12364
|
-
.SS json形式
|
12899
|
+
.SS 戻り値
|
12365
12900
|
.INDENT 0.0
|
12366
12901
|
.INDENT 3.5
|
12367
12902
|
.sp
|
12368
12903
|
.nf
|
12369
12904
|
.ft C
|
12370
|
-
[
|
12905
|
+
[HEADER, SUCCEEDED_OR_NOT]
|
12371
12906
|
.ft P
|
12372
12907
|
.fi
|
12373
12908
|
.UNINDENT
|
12374
12909
|
.UNINDENT
|
12375
12910
|
.sp
|
12376
|
-
\
|
12911
|
+
\fBHEADER\fP
|
12377
12912
|
.INDENT 0.0
|
12378
12913
|
.INDENT 3.5
|
12379
|
-
|
12914
|
+
HEADERのフォーマットは [0, UNIX_TIME_WHEN_COMMAND_IS_STARTED, ELAPSED_TIME] です。HEADERについては \fB/reference/command/output_format\fP を参照してください。
|
12380
12915
|
.UNINDENT
|
12381
12916
|
.UNINDENT
|
12382
|
-
.SS 例
|
12383
12917
|
.sp
|
12384
|
-
|
12918
|
+
\fBSUCCEEDED_OR_NOT\fP
|
12385
12919
|
.INDENT 0.0
|
12386
12920
|
.INDENT 3.5
|
12387
|
-
|
12388
|
-
.nf
|
12389
|
-
.ft C
|
12390
|
-
delete Entry abandon
|
12391
|
-
|
12392
|
-
[true]
|
12393
|
-
.ft P
|
12394
|
-
.fi
|
12921
|
+
コマンドの実行が成功するとtrueを返します。失敗するとエラーとしてfalseを返します。
|
12395
12922
|
.UNINDENT
|
12396
12923
|
.UNINDENT
|
12397
|
-
.SS
|
12924
|
+
.SS 参考
|
12398
12925
|
.sp
|
12399
12926
|
\fBload\fP
|
12400
12927
|
.SS dump
|
@@ -13045,48 +13572,28 @@ register query_expanders/tsv
|
|
13045
13572
|
\fBregister\fP が失敗すると、エラーの詳細は \fBHEADER\fP に含まれます。
|
13046
13573
|
.sp
|
13047
13574
|
\fBHEADER\fP については \fB/reference/command/output_format\fP を参照してください。
|
13048
|
-
.SS \
|
13575
|
+
.SS \fBruby_eval\fP
|
13049
13576
|
.SS 概要
|
13050
13577
|
.sp
|
13051
|
-
\
|
13052
|
-
.sp
|
13053
|
-
\fBselect\fP は最も重要なgroongaのコマンドです。groongaの力を最大限に活かすためには \fBselect\fP を理解する必要があります。
|
13578
|
+
\fBruby_eval\fP command evaluates ruby script and returns the result.
|
13054
13579
|
.SS 構文
|
13055
13580
|
.sp
|
13056
|
-
\
|
13581
|
+
\fBruby_eval\fP には必須な引数が1つあります:
|
13057
13582
|
.INDENT 0.0
|
13058
13583
|
.INDENT 3.5
|
13059
13584
|
.sp
|
13060
13585
|
.nf
|
13061
13586
|
.ft C
|
13062
|
-
|
13063
|
-
[match_columns=null]
|
13064
|
-
[query=null]
|
13065
|
-
[filter=null]
|
13066
|
-
[scorer=null]
|
13067
|
-
[sortby=null]
|
13068
|
-
[output_columns="_id, _key, *"]
|
13069
|
-
[offset=0]
|
13070
|
-
[limit=10]
|
13071
|
-
[drilldown=null]
|
13072
|
-
[drilldown_sortby=null]
|
13073
|
-
[drilldown_output_columns=null]
|
13074
|
-
[drilldown_offset=0]
|
13075
|
-
[drilldown_limit=10]
|
13076
|
-
[cache=yes]
|
13077
|
-
[match_escalation_threshold=0]
|
13078
|
-
[query_expansion=null]
|
13079
|
-
[query_flags=ALLOW_PRAGMA|ALLOW_COLUMN|ALLOW_UPDATE|ALLOW_LEADING_NOT|NONE]
|
13080
|
-
[query_expander=null]
|
13587
|
+
ruby_eval ruby_script
|
13081
13588
|
.ft P
|
13082
13589
|
.fi
|
13083
13590
|
.UNINDENT
|
13084
13591
|
.UNINDENT
|
13085
13592
|
.SS 使い方
|
13086
13593
|
.sp
|
13087
|
-
|
13594
|
+
You can execute any scripts which mruby supports by calling \fBruby_eval\fP.
|
13088
13595
|
.sp
|
13089
|
-
|
13596
|
+
プラグインで \fB1 + 2\fP を計算するだけの例です。
|
13090
13597
|
.sp
|
13091
13598
|
実行例:
|
13092
13599
|
.INDENT 0.0
|
@@ -13094,26 +13601,144 @@ select table
|
|
13094
13601
|
.sp
|
13095
13602
|
.nf
|
13096
13603
|
.ft C
|
13097
|
-
|
13098
|
-
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13099
|
-
column_create Entries content COLUMN_SCALAR Text
|
13604
|
+
register ruby/eval
|
13100
13605
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13101
|
-
|
13102
|
-
# [[0, 1337566253.89858, 0.000355720520019531],
|
13103
|
-
|
13104
|
-
|
13105
|
-
|
13106
|
-
|
13107
|
-
|
13108
|
-
|
13109
|
-
|
13110
|
-
|
13111
|
-
|
13112
|
-
|
13113
|
-
|
13114
|
-
|
13115
|
-
|
13116
|
-
|
13606
|
+
ruby_eval "1 + 2"
|
13607
|
+
# [[0, 1337566253.89858, 0.000355720520019531], {"value": 3}]
|
13608
|
+
.ft P
|
13609
|
+
.fi
|
13610
|
+
.UNINDENT
|
13611
|
+
.UNINDENT
|
13612
|
+
.sp
|
13613
|
+
\fBruby_eval\fP コマンドを使うには事前に \fBruby/eval\fP プラグインを登録します。
|
13614
|
+
.sp
|
13615
|
+
\fBruby_eval\fP コマンドは実験的なプラグインです。このコマンドは将来的に変更されるかも知れません。
|
13616
|
+
.SS 引数
|
13617
|
+
.sp
|
13618
|
+
このセクションではすべての引数について説明します。
|
13619
|
+
.SS \fBruby_script\fP
|
13620
|
+
.sp
|
13621
|
+
評価したいrubyスクリプトの文字列を指定します。
|
13622
|
+
.SS 戻り値
|
13623
|
+
.sp
|
13624
|
+
\fBruby_eval\fP returns the evaluated result which key is "value" as json format:
|
13625
|
+
.INDENT 0.0
|
13626
|
+
.INDENT 3.5
|
13627
|
+
.sp
|
13628
|
+
.nf
|
13629
|
+
.ft C
|
13630
|
+
[[HEADER, EVALUATED]]
|
13631
|
+
.ft P
|
13632
|
+
.fi
|
13633
|
+
.UNINDENT
|
13634
|
+
.UNINDENT
|
13635
|
+
.sp
|
13636
|
+
\fBHEADER\fP
|
13637
|
+
.INDENT 0.0
|
13638
|
+
.INDENT 3.5
|
13639
|
+
\fBHEADER\fP については \fB/reference/command/output_format\fP を参照してください。
|
13640
|
+
.UNINDENT
|
13641
|
+
.UNINDENT
|
13642
|
+
.sp
|
13643
|
+
\fBEVALUATED\fP
|
13644
|
+
.INDENT 0.0
|
13645
|
+
.INDENT 3.5
|
13646
|
+
\fBEVALUATED\fP consists of pair of key and value in forms of {key:value}.
|
13647
|
+
.TS
|
13648
|
+
center;
|
13649
|
+
|l|l|.
|
13650
|
+
_
|
13651
|
+
T{
|
13652
|
+
名前
|
13653
|
+
T} T{
|
13654
|
+
説明
|
13655
|
+
T}
|
13656
|
+
_
|
13657
|
+
T{
|
13658
|
+
\fBkey\fP
|
13659
|
+
T} T{
|
13660
|
+
reserved word \(aqvalue\(aq.
|
13661
|
+
T}
|
13662
|
+
_
|
13663
|
+
T{
|
13664
|
+
\fBvalue\fP
|
13665
|
+
T} T{
|
13666
|
+
the value of evaluated script. It must be a number.
|
13667
|
+
T}
|
13668
|
+
_
|
13669
|
+
.TE
|
13670
|
+
.UNINDENT
|
13671
|
+
.UNINDENT
|
13672
|
+
.SS 参考
|
13673
|
+
.SS \fBselect\fP
|
13674
|
+
.SS 概要
|
13675
|
+
.sp
|
13676
|
+
\fBselect\fP はテーブルから指定された条件にマッチするレコードを検索し、見つかったレコードを出力します。
|
13677
|
+
.sp
|
13678
|
+
\fBselect\fP は最も重要なgroongaのコマンドです。groongaの力を最大限に活かすためには \fBselect\fP を理解する必要があります。
|
13679
|
+
.SS 構文
|
13680
|
+
.sp
|
13681
|
+
\fBselect\fP には多くの引数があります。必須の引数は \fBtable\fP だけで、残りは省略できます。:
|
13682
|
+
.INDENT 0.0
|
13683
|
+
.INDENT 3.5
|
13684
|
+
.sp
|
13685
|
+
.nf
|
13686
|
+
.ft C
|
13687
|
+
select table
|
13688
|
+
[match_columns=null]
|
13689
|
+
[query=null]
|
13690
|
+
[filter=null]
|
13691
|
+
[scorer=null]
|
13692
|
+
[sortby=null]
|
13693
|
+
[output_columns="_id, _key, *"]
|
13694
|
+
[offset=0]
|
13695
|
+
[limit=10]
|
13696
|
+
[drilldown=null]
|
13697
|
+
[drilldown_sortby=null]
|
13698
|
+
[drilldown_output_columns=null]
|
13699
|
+
[drilldown_offset=0]
|
13700
|
+
[drilldown_limit=10]
|
13701
|
+
[cache=yes]
|
13702
|
+
[match_escalation_threshold=0]
|
13703
|
+
[query_expansion=null]
|
13704
|
+
[query_flags=ALLOW_PRAGMA|ALLOW_COLUMN|ALLOW_UPDATE|ALLOW_LEADING_NOT|NONE]
|
13705
|
+
[query_expander=null]
|
13706
|
+
.ft P
|
13707
|
+
.fi
|
13708
|
+
.UNINDENT
|
13709
|
+
.UNINDENT
|
13710
|
+
.SS 使い方
|
13711
|
+
.sp
|
13712
|
+
例を使いながら \fBselect\fP の使い方を学びましょう。このセクションではよく使われる使い方を紹介します。
|
13713
|
+
.sp
|
13714
|
+
使い方を示すために使うスキーマ定義とサンプルデータは以下の通りです。
|
13715
|
+
.sp
|
13716
|
+
実行例:
|
13717
|
+
.INDENT 0.0
|
13718
|
+
.INDENT 3.5
|
13719
|
+
.sp
|
13720
|
+
.nf
|
13721
|
+
.ft C
|
13722
|
+
table_create Entries TABLE_HASH_KEY ShortText
|
13723
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13724
|
+
column_create Entries content COLUMN_SCALAR Text
|
13725
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13726
|
+
column_create Entries n_likes COLUMN_SCALAR UInt32
|
13727
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13728
|
+
table_create Terms TABLE_PAT_KEY|KEY_NORMALIZE ShortText \-\-default_tokenizer TokenBigram
|
13729
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13730
|
+
column_create Terms entries_key_index COLUMN_INDEX|WITH_POSITION Entries _key
|
13731
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13732
|
+
column_create Terms entries_content_index COLUMN_INDEX|WITH_POSITION Entries content
|
13733
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
13734
|
+
load \-\-table Entries
|
13735
|
+
[
|
13736
|
+
{"_key": "The first post!",
|
13737
|
+
"content": "Welcome! This is my first post!",
|
13738
|
+
"n_likes": 5},
|
13739
|
+
{"_key": "Groonga",
|
13740
|
+
"content": "I started to use groonga. It\(aqs very fast!",
|
13741
|
+
"n_likes": 10},
|
13117
13742
|
{"_key": "Mroonga",
|
13118
13743
|
"content": "I also started to use mroonga. It\(aqs also very fast! Really fast!",
|
13119
13744
|
"n_likes": 15},
|
@@ -15329,16 +15954,16 @@ drilldown条件が実行される前の検索結果が以下のように出力
|
|
15329
15954
|
.sp
|
15330
15955
|
.nf
|
15331
15956
|
.ft C
|
15332
|
-
[[
|
15957
|
+
[[ヒット数], [[カラム名1,カラム型1],..], 検索結果1,..]
|
15333
15958
|
.ft P
|
15334
15959
|
.fi
|
15335
15960
|
.UNINDENT
|
15336
15961
|
.UNINDENT
|
15337
15962
|
.sp
|
15338
|
-
\fB
|
15963
|
+
\fBヒット数\fP
|
15339
15964
|
.INDENT 0.0
|
15340
15965
|
.INDENT 3.5
|
15341
|
-
|
15966
|
+
検索条件にヒットしたレコードの数が出力されます。 \fB\-\-limit\fP オプションで出力件数を制限した場合は出力するレコード数と一致しません。 \fBヒット数\fP は \fB\-\-limit\fP オプションに関係なく常にヒットしたレコードの数になります。
|
15342
15967
|
.UNINDENT
|
15343
15968
|
.UNINDENT
|
15344
15969
|
.sp
|
@@ -15529,14 +16154,14 @@ status
|
|
15529
16154
|
# 0.000355720520019531
|
15530
16155
|
# ],
|
15531
16156
|
# {
|
15532
|
-
# "uptime":
|
16157
|
+
# "uptime": 50,
|
15533
16158
|
# "max_command_version": 2,
|
15534
16159
|
# "n_queries": 39,
|
15535
16160
|
# "cache_hit_rate": 0.0,
|
15536
|
-
# "version": "3.0.
|
15537
|
-
# "alloc_count":
|
16161
|
+
# "version": "3.0.7",
|
16162
|
+
# "alloc_count": 300,
|
15538
16163
|
# "command_version": 1,
|
15539
|
-
# "starttime":
|
16164
|
+
# "starttime": 1377493297,
|
15540
16165
|
# "default_command_version": 1
|
15541
16166
|
# }
|
15542
16167
|
# ]
|
@@ -16844,7 +17469,7 @@ tokenize TokenTrigram "Fulltext Search"
|
|
16844
17469
|
.UNINDENT
|
16845
17470
|
.UNINDENT
|
16846
17471
|
.sp
|
16847
|
-
他のトークナイザーを使いたい場合は、 \fBregister\fP コマンドでトークナイザープラグインを登録する必要があります。例えば、 \fI\%groonga
|
17472
|
+
他のトークナイザーを使いたい場合は、 \fBregister\fP コマンドでトークナイザープラグインを登録する必要があります。例えば、 \fI\%groonga\-normalizer\-mysql\fP を登録することでMySQL互換の正規化方法を使うことができます。
|
16848
17473
|
.SS \fBstring\fP
|
16849
17474
|
.sp
|
16850
17475
|
トークナイズしたい文字列を指定します。 \fBstring\fP の中に文字列を含める場合は、シングルクォート( \fB\(aq\fP )またはダブルクォート( \fB"\fP )で \fBstring\fP をクォートする必要があります。
|
@@ -17594,7 +18219,7 @@ groongaのデータベースでは、テーブルの主キーや、カラムの
|
|
17594
18219
|
.INDENT 3.5
|
17595
18220
|
IEEE 754形式の倍精度浮動小数点数であり、実数を表します。(デフォルト値: 0.0)
|
17596
18221
|
.sp
|
17597
|
-
IEEE 754形式の詳細については、 \fI\%IEEE 754
|
18222
|
+
IEEE 754形式の詳細については、 \fI\%IEEE 754 \- Wikipedia\fP や \fI\%IEEE 754: Standard for Binary Floating\-Point\fP を参照してください。
|
17598
18223
|
.UNINDENT
|
17599
18224
|
.UNINDENT
|
17600
18225
|
.sp
|
@@ -17636,7 +18261,7 @@ IEEE 754形式の詳細については、 \fI\%IEEE 754 - Wikipedia\fP や \fI\%
|
|
17636
18261
|
度分秒形式でx度y分z秒となる経度・緯度は、(((x * 60) + y) * 60 + z) * 1000という計算式でミリ秒単位へと変換されます。
|
17637
18262
|
\fB/reference/commands/load\fP コマンドで値を格納するときは、"ミリ秒単位の経度xミリ秒単位の緯度" もしくは "経度の小数表記x緯度の小数表記" という文字列表現を使って指定します。経度と緯度の区切りとしては、\(aqx\(aq のほかに \(aq,\(aq を使うことができます。
|
17638
18263
|
.sp
|
17639
|
-
測地系の詳細については、 \fI\%測地系
|
18264
|
+
測地系の詳細については、 \fI\%測地系 \- Wikipedia\fP を参照してください。
|
17640
18265
|
.UNINDENT
|
17641
18266
|
.UNINDENT
|
17642
18267
|
.sp
|
@@ -18475,7 +19100,7 @@ load \-\-table Entries
|
|
18475
19100
|
.INDENT 3.5
|
18476
19101
|
.INDENT 0.0
|
18477
19102
|
.IP \(bu 2
|
18478
|
-
\fB[space]\fP ( \fB[
|
19103
|
+
\fB[space]\fP ( \fB[backslash][space]\fP とエスケープする。)( \fB[space]\fP をASCIIで言えば0x20の空白文字に置き換えて、 \fB[backslash]\fP を \fB\e\e\fP に置き換えてください。)
|
18479
19104
|
.IP \(bu 2
|
18480
19105
|
\fB"\fP ( \fB\e"\fP とエスケープする。)
|
18481
19106
|
.IP \(bu 2
|
@@ -18491,6 +19116,13 @@ load \-\-table Entries
|
|
18491
19116
|
.UNINDENT
|
18492
19117
|
.sp
|
18493
19118
|
エスケープする代わりにクォートすることもできます。クォート構文は \fB"..."\fP または \fB\(aq...\(aq\fP です。 \fB"..."\fP クォート構文中では \fB"\fP を \fB\e"\fP にエスケープする必要があります。 \fB\(aq...\(aq\fP クォート構文中では \fB\(aq\fP を \fB\e\(aq\fP にエスケープする必要があります。例えば、 \fBAlice\(aqs brother (Bob)\fP は \fB"Alice\(aqs brother (Bob)"\fP あるいは \fB\(aqAlice\e\(aqs brother (Bob)\(aq\fP とクォートします。
|
19119
|
+
.sp
|
19120
|
+
\fBノート:\fP
|
19121
|
+
.INDENT 0.0
|
19122
|
+
.INDENT 3.5
|
19123
|
+
注意しなければならない大事な点があります。\(aq\(aq\e\(aq\(aq (バックスラッシュ)はコマンドラインシェルが解釈します。それゆえ例えば \(aq\(aq(\(aq\(aq それ自体を検索したいならシェルでは二重にエスケープ (\(aq\(aq\e\e(\(aq\(aq) しなければなりません。コマンドラインシェルは \(aq\(aq\e\e(\(aq\(aq を \(aq\(aq\e(\(aq\(aq と解釈してからgroongaに渡します。groongaは \(aq\(aq\e(\(aq\(aq を \(aq\(aq(\(aq\(aq とみなし、\(aq\(aq(\(aq\(aq 自体をデータベースから検索します。もし意図した検索がgroongaで行えないなら、特別な文字を正しくエスケープしているか確認します。
|
19124
|
+
.UNINDENT
|
19125
|
+
.UNINDENT
|
18494
19126
|
.SS 条件式
|
18495
19127
|
.sp
|
18496
19128
|
以下は利用可能な条件式の一覧です。
|
@@ -23060,20 +23692,25 @@ TokyoGeoPoint(日本測地系座標)かWGS84GeoPoint(世界測地系座標)の
|
|
23060
23692
|
.sp
|
23061
23693
|
\fBhtml_untag\fP はHTMLタグをHTMLから除去したテキストを出力します。
|
23062
23694
|
.sp
|
23063
|
-
\fBhtml_untag\fP は \
|
23695
|
+
\fBhtml_untag\fP は \fIoutput_columns\fP で説明している \fB\-\-output_columns\fP で使います。
|
23064
23696
|
.SS 構文
|
23065
23697
|
.sp
|
23066
|
-
\fBhtml_untag\fP は引数を一つだけとります。 それは \
|
23698
|
+
\fBhtml_untag\fP は引数を一つだけとります。 それは \fBhtml\fP です。
|
23067
23699
|
.INDENT 0.0
|
23068
23700
|
.INDENT 3.5
|
23069
23701
|
.sp
|
23070
23702
|
.nf
|
23071
23703
|
.ft C
|
23072
|
-
html_untag(
|
23704
|
+
html_untag(html)
|
23073
23705
|
.ft P
|
23074
23706
|
.fi
|
23075
23707
|
.UNINDENT
|
23076
23708
|
.UNINDENT
|
23709
|
+
.SS 必要条件
|
23710
|
+
.sp
|
23711
|
+
\fBhtml_untag\fP を使うにはgroonga 3.0.5以降が必要です。
|
23712
|
+
.sp
|
23713
|
+
\fBhtml_untag\fP を使うには \fB/reference/command/command_version\fP 2以降を使う必要があります。
|
23077
23714
|
.SS 使い方
|
23078
23715
|
.sp
|
23079
23716
|
使い方を示すために使うスキーマ定義とサンプルデータは以下の通りです。
|
@@ -23086,14 +23723,10 @@ html_untag(column)
|
|
23086
23723
|
.sp
|
23087
23724
|
.nf
|
23088
23725
|
.ft C
|
23089
|
-
table_create WebClips
|
23090
|
-
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
23091
|
-
column_create WebClips url COLUMN_SCALAR ShortText
|
23726
|
+
table_create WebClips TABLE_HASH_KEY ShortText
|
23092
23727
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
23093
23728
|
column_create WebClips content COLUMN_SCALAR ShortText
|
23094
23729
|
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
23095
|
-
column_create WebClips tag COLUMN_VECTOR ShortText
|
23096
|
-
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
23097
23730
|
.ft P
|
23098
23731
|
.fi
|
23099
23732
|
.UNINDENT
|
@@ -23109,8 +23742,8 @@ column_create WebClips tag COLUMN_VECTOR ShortText
|
|
23109
23742
|
.ft C
|
23110
23743
|
load \-\-table WebClips
|
23111
23744
|
[
|
23112
|
-
{"_key":
|
23113
|
-
{"_key":
|
23745
|
+
{"_key": "http://groonga.org", "content": "groonga is <span class=\(aqemphasize\(aq>fast</span>"},
|
23746
|
+
{"_key": "http://mroonga.org", "content": "mroonga is <span class=\e"emphasize\e">fast</span>"},
|
23114
23747
|
]
|
23115
23748
|
# [[0, 1337566253.89858, 0.000355720520019531], 2]
|
23116
23749
|
.ft P
|
@@ -23126,7 +23759,7 @@ load \-\-table WebClips
|
|
23126
23759
|
.sp
|
23127
23760
|
.nf
|
23128
23761
|
.ft C
|
23129
|
-
select WebClips \-\-output_columns "
|
23762
|
+
select WebClips \-\-output_columns "html_untag(content)" \-\-command_version 2
|
23130
23763
|
# [
|
23131
23764
|
# [
|
23132
23765
|
# 0,
|
@@ -23161,13 +23794,13 @@ select WebClips \-\-output_columns "_key, html_untag(content)" \-\-command_versi
|
|
23161
23794
|
上記クエリを実行すると、"class" 属性つきの "span" タグが除去されているのがわかります。\fBhtml_untag\fP 関数を使うのには \fB\-\-command_vesion 2\fP を指定しなければならないことに注意してください。
|
23162
23795
|
.SS 引数
|
23163
23796
|
.sp
|
23164
|
-
必須引数が一つあり、それは \
|
23165
|
-
.SS \
|
23797
|
+
必須引数が一つあり、それは \fBhtml\fP です。
|
23798
|
+
.SS \fBhtml\fP
|
23166
23799
|
.sp
|
23167
|
-
|
23800
|
+
タグを取り除きたいHTMLを指定します。
|
23168
23801
|
.SS 戻り値
|
23169
23802
|
.sp
|
23170
|
-
\fBhtml_untag\fP
|
23803
|
+
\fBhtml_untag\fP はHTMLテキストからHTMLタグを除去したタグなしのテキストを返します。
|
23171
23804
|
.SS now
|
23172
23805
|
.SS 名前
|
23173
23806
|
.sp
|
@@ -23206,16 +23839,17 @@ now()
|
|
23206
23839
|
.SS query
|
23207
23840
|
.SS 概要
|
23208
23841
|
.sp
|
23209
|
-
\fBquery\fP
|
23210
|
-
.
|
23211
|
-
\fBquery\fP
|
23842
|
+
\fBquery\fP provides \fB\-\-match_columns\fP and \fB\-\-query\fP parameters of
|
23843
|
+
\fB/reference/commands/select\fP feature as function. You can specify
|
23844
|
+
multiple \fBquery\fP functions in \fB\-\-filter\fP parameter in
|
23845
|
+
\fB/reference/commands/select\fP.
|
23212
23846
|
.sp
|
23213
23847
|
そのような柔軟性があるので、 複数の \fBquery\fP 関数を組合せることで全文検索の振舞いを制御することができます。
|
23214
23848
|
.sp
|
23215
23849
|
\fBquery\fP は \fB/reference/commands/select\fP コマンドの \fB\-\-filter\fP 内でのみ指定できます。
|
23216
23850
|
.SS 構文
|
23217
23851
|
.sp
|
23218
|
-
\fBquery\fP は2つの引数が必要です。 \
|
23852
|
+
\fBquery\fP は2つの引数が必要です。 \fBmatch_columns\fP と \fBquery_string\fP です。
|
23219
23853
|
.sp
|
23220
23854
|
引数の \fBquery_expander\fP や \fBsubstitution_table\fP は省略可能です。
|
23221
23855
|
.INDENT 0.0
|
@@ -23223,9 +23857,9 @@ now()
|
|
23223
23857
|
.sp
|
23224
23858
|
.nf
|
23225
23859
|
.ft C
|
23226
|
-
query(
|
23227
|
-
query(
|
23228
|
-
query(
|
23860
|
+
query(match_columns, query_string)
|
23861
|
+
query(match_columns, query_string, query_expander)
|
23862
|
+
query(match_columns, query_string, substitution_table)
|
23229
23863
|
.ft P
|
23230
23864
|
.fi
|
23231
23865
|
.UNINDENT
|
@@ -23475,19 +24109,13 @@ select Users \-\-output_columns name,memo,_score \-\-filter \(aqquery("memo * 10
|
|
23475
24109
|
.SS 引数
|
23476
24110
|
.SS 必須引数
|
23477
24111
|
.sp
|
23478
|
-
必須引数は二つあります。 \
|
23479
|
-
.SS \
|
23480
|
-
.sp
|
23481
|
-
It specifies the default target column for fulltext search by
|
23482
|
-
\fBquery_string\fP parameter value. It is the same role as
|
23483
|
-
\fBmatch_column\fP parameter in \fBselect\fP.
|
24112
|
+
必須引数は二つあります。 \fBmatch_columns\fP と \fBquery_string\fP です。
|
24113
|
+
.SS \fBmatch_columns\fP
|
23484
24114
|
.sp
|
23485
|
-
\
|
24115
|
+
\fBquery_string\fP パラメーターの値で全文検索するときのデフォルトの検索対象カラムを指定します。このパラメーターは \fBselect\fP の \fIselect\-match\-columns\fP パラメーターと同じ役割です。
|
23486
24116
|
.SS \fBquery_string\fP
|
23487
24117
|
.sp
|
23488
|
-
|
23489
|
-
\fB/reference/grn_expr/query_syntax\fP. It is the same role as
|
23490
|
-
\fBquery\fP parameter in \fBselect\fP.
|
24118
|
+
\fB/reference/grn_expr/query_syntax\fP で検索条件を指定します。このパラメーターは \fBselect\fP コマンドの \fBquery\fP パラメーターと同じ役割です。
|
23491
24119
|
.sp
|
23492
24120
|
\fBselect\fP コマンドの \fBquery\fP については \fIselect\-match\-columns\fP を参照してください。
|
23493
24121
|
.SS 省略可能引数
|
@@ -23936,13 +24564,11 @@ sub_filterは以下の条件が満たされていることを要求します。
|
|
23936
24564
|
必須引数は二つあります。 \fBscope\fP と \fBfilter_string\fP です。
|
23937
24565
|
.SS \fBscope\fP
|
23938
24566
|
.sp
|
23939
|
-
|
23940
|
-
|
23941
|
-
|
23942
|
-
\fBselect \-\-table TYPE_OF_THE_COLUMN \-\-filter FILTER_STRING\fP.
|
24567
|
+
\fBselect\fP コマンドの \fBtable\fP パラメーターで指定したテーブルが持つカラムを指定します。このカラムには制限があります。制限については後述します。 \fBfilter_string\fP はこのカラムの文脈で評価されます。これは、 \fBfilter_string\fP は \fBselect \-\-table カラムの型 \-\-filter フィルター文字列\fP というように評価されるということです。
|
24568
|
+
.sp
|
24569
|
+
指定したカラムの型はテーブルでなければいけません。言いかえると、カラムの型は参照型でなければいけないということです。
|
23943
24570
|
.sp
|
23944
|
-
|
23945
|
-
type must be reference type.
|
24571
|
+
\fBカラム1.カラム2.カラム3...カラムN\fP という構文でカラムを数珠つなぎにできます。例えば、 \fBuser.group.name\fP とできます。
|
23946
24572
|
.sp
|
23947
24573
|
\fBselect\fP コマンドの \fBtable\fP 引数については \fIselect\-table\fP を参照してください。
|
23948
24574
|
.SS \fBfilter_string\fP
|
@@ -23950,9 +24576,7 @@ type must be reference type.
|
|
23950
24576
|
\fB/reference/grn_expr/script_syntax\fP の検索条件を指定します。これは \fBscope\fP のコンテキストで評価されます。
|
23951
24577
|
.SS 戻り値
|
23952
24578
|
.sp
|
23953
|
-
\fBsub_filter\fP
|
23954
|
-
more records are matched, it returns \fBtrue\fP. Otherwise, it returns
|
23955
|
-
\fBfalse\fP.
|
24579
|
+
\fBsub_filter\fP は1つでもレコードがマッチしたかどうかを返します。もし、1つ以上のレコードがマッチしたら \fBtrue\fP を返します。1つもマッチしなかったら \fBfalse\fP を返します。
|
23956
24580
|
.SS 参考
|
23957
24581
|
.INDENT 0.0
|
23958
24582
|
.IP \(bu 2
|
@@ -24383,204 +25007,2545 @@ Second with two digits.
|
|
24383
25007
|
Microsecond with six digits.
|
24384
25008
|
.UNINDENT
|
24385
25009
|
.sp
|
24386
|
-
実行例:
|
24387
|
-
.INDENT 7.0
|
24388
|
-
.INDENT 3.5
|
25010
|
+
実行例:
|
25011
|
+
.INDENT 7.0
|
25012
|
+
.INDENT 3.5
|
25013
|
+
.sp
|
25014
|
+
.nf
|
25015
|
+
.ft C
|
25016
|
+
2011\-07\-05 06:25:18.345734
|
25017
|
+
.ft P
|
25018
|
+
.fi
|
25019
|
+
.UNINDENT
|
25020
|
+
.UNINDENT
|
25021
|
+
.TP
|
25022
|
+
.B ID
|
25023
|
+
ID of a thread. Groonga process creates threads to process
|
25024
|
+
requests concurrently. Each thread outputs some logs for a
|
25025
|
+
request. This ID can be used to extract a log sequence by
|
25026
|
+
a thread.
|
25027
|
+
.sp
|
25028
|
+
実行例:
|
25029
|
+
.INDENT 7.0
|
25030
|
+
.INDENT 3.5
|
25031
|
+
.sp
|
25032
|
+
.nf
|
25033
|
+
.ft C
|
25034
|
+
45ea3034
|
25035
|
+
.ft P
|
25036
|
+
.fi
|
25037
|
+
.UNINDENT
|
25038
|
+
.UNINDENT
|
25039
|
+
.UNINDENT
|
25040
|
+
.INDENT 0.0
|
25041
|
+
.TP
|
25042
|
+
.B >
|
25043
|
+
A character that indicates query is started.
|
25044
|
+
.UNINDENT
|
25045
|
+
.INDENT 0.0
|
25046
|
+
.TP
|
25047
|
+
.B :
|
25048
|
+
A character that indicates query is processing.
|
25049
|
+
.UNINDENT
|
25050
|
+
.INDENT 0.0
|
25051
|
+
.TP
|
25052
|
+
.B <
|
25053
|
+
A character that indicates query is finished.
|
25054
|
+
.TP
|
25055
|
+
.B MESSAGE
|
25056
|
+
Details about the log with free format.
|
25057
|
+
.sp
|
25058
|
+
実行例:
|
25059
|
+
.INDENT 7.0
|
25060
|
+
.INDENT 3.5
|
25061
|
+
.sp
|
25062
|
+
.nf
|
25063
|
+
.ft C
|
25064
|
+
query log opened.
|
25065
|
+
.ft P
|
25066
|
+
.fi
|
25067
|
+
.UNINDENT
|
25068
|
+
.UNINDENT
|
25069
|
+
.TP
|
25070
|
+
.B QUERY
|
25071
|
+
A query to be processed.
|
25072
|
+
.sp
|
25073
|
+
実行例:
|
25074
|
+
.INDENT 7.0
|
25075
|
+
.INDENT 3.5
|
25076
|
+
.sp
|
25077
|
+
.nf
|
25078
|
+
.ft C
|
25079
|
+
select users \-\-match_columns hobby \-\-query music
|
25080
|
+
.ft P
|
25081
|
+
.fi
|
25082
|
+
.UNINDENT
|
25083
|
+
.UNINDENT
|
25084
|
+
.TP
|
25085
|
+
.B ELAPSED_TIME
|
25086
|
+
Elapsed time in nanoseconds since query is started.
|
25087
|
+
.sp
|
25088
|
+
実行例:
|
25089
|
+
.INDENT 7.0
|
25090
|
+
.INDENT 3.5
|
25091
|
+
.sp
|
25092
|
+
.nf
|
25093
|
+
.ft C
|
25094
|
+
000000000075770
|
25095
|
+
(It means 75,770 nanoseconds.)
|
25096
|
+
.ft P
|
25097
|
+
.fi
|
25098
|
+
.UNINDENT
|
25099
|
+
.UNINDENT
|
25100
|
+
.TP
|
25101
|
+
.B PROGRESS
|
25102
|
+
A processed work at the time.
|
25103
|
+
.sp
|
25104
|
+
実行例:
|
25105
|
+
.INDENT 7.0
|
25106
|
+
.INDENT 3.5
|
25107
|
+
.sp
|
25108
|
+
.nf
|
25109
|
+
.ft C
|
25110
|
+
select(313401)
|
25111
|
+
(It means that \(aqselect\(aq is processed and 313,401 records are remained.)
|
25112
|
+
.ft P
|
25113
|
+
.fi
|
25114
|
+
.UNINDENT
|
25115
|
+
.UNINDENT
|
25116
|
+
.TP
|
25117
|
+
.B RETURN_CODE
|
25118
|
+
A return code for the query.
|
25119
|
+
.sp
|
25120
|
+
実行例:
|
25121
|
+
.INDENT 7.0
|
25122
|
+
.INDENT 3.5
|
25123
|
+
.sp
|
25124
|
+
.nf
|
25125
|
+
.ft C
|
25126
|
+
rc=0
|
25127
|
+
(It means return code is 0. 0 means GRN_SUCCESS.)
|
25128
|
+
.ft P
|
25129
|
+
.fi
|
25130
|
+
.UNINDENT
|
25131
|
+
.UNINDENT
|
25132
|
+
.UNINDENT
|
25133
|
+
.sp
|
25134
|
+
実行例:
|
25135
|
+
.INDENT 0.0
|
25136
|
+
.INDENT 3.5
|
25137
|
+
.sp
|
25138
|
+
.nf
|
25139
|
+
.ft C
|
25140
|
+
2011\-07\-05 06:25:19.458756|45ea3034|>select Properties \-\-limit 0
|
25141
|
+
2011\-07\-05 06:25:19.458829|45ea3034|:000000000072779 select(19)
|
25142
|
+
2011\-07\-05 06:25:19.458856|45ea3034|:000000000099998 output(0)
|
25143
|
+
2011\-07\-05 06:25:19.458875|45ea3034|<000000000119062 rc=0
|
25144
|
+
2011\-07\-05 06:25:19.458986|45ea3034|>quit
|
25145
|
+
.ft P
|
25146
|
+
.fi
|
25147
|
+
.UNINDENT
|
25148
|
+
.UNINDENT
|
25149
|
+
.SS API
|
25150
|
+
.sp
|
25151
|
+
groongaを全文検索ライブラリとして使うことができます。この節ではgroongaが提供しているAPIを示します。
|
25152
|
+
.SS \fBgrn_cache\fP
|
25153
|
+
.SS 概要
|
25154
|
+
.sp
|
25155
|
+
\fBノート:\fP
|
25156
|
+
.INDENT 0.0
|
25157
|
+
.INDENT 3.5
|
25158
|
+
This API is experimental.
|
25159
|
+
.UNINDENT
|
25160
|
+
.UNINDENT
|
25161
|
+
.sp
|
25162
|
+
\fBgrn_cache\fP is a data store that keeps responses of
|
25163
|
+
\fB/reference/commands/select\fP command. It is not general use cache
|
25164
|
+
object. It is only for \fB/reference/commands/select\fP command.
|
25165
|
+
.sp
|
25166
|
+
You can just change the current cache object by
|
25167
|
+
\fBgrn_cache_current_set()\fP. \fB/reference/commands/select\fP
|
25168
|
+
command response cache is done internally.
|
25169
|
+
.sp
|
25170
|
+
\fB/reference/commands/select\fP command uses one global cache
|
25171
|
+
object. If you open multiple databases, the one cache is shared. It is
|
25172
|
+
an important problem.
|
25173
|
+
.sp
|
25174
|
+
If you open multiple databases and use
|
25175
|
+
\fB/reference/commands/select\fP command, you need to use
|
25176
|
+
\fBgrn_cache\fP object. It is \fB/reference/executables/groonga\-httpd\fP
|
25177
|
+
case. If you open only one database or don\(aqt use
|
25178
|
+
\fB/reference/commands/select\fP command, you don\(aqt need to use
|
25179
|
+
\fBgrn_cache\fP object. It is \fI\%rroonga\fP case.
|
25180
|
+
.SS 実行例:
|
25181
|
+
.sp
|
25182
|
+
以下はキャシュを変更する例です。
|
25183
|
+
.INDENT 0.0
|
25184
|
+
.INDENT 3.5
|
25185
|
+
.sp
|
25186
|
+
.nf
|
25187
|
+
.ft C
|
25188
|
+
grn_cache *cache;
|
25189
|
+
grn_cache *cache_previous;
|
25190
|
+
cache = grn_cache_open(ctx);
|
25191
|
+
cache_previous = grn_cache_current_get(ctx);
|
25192
|
+
grn_cache_current_set(ctx, cache);
|
25193
|
+
/* grn_ctx_send(ctx, ...); */
|
25194
|
+
grn_cache_current_set(ctx, cache_previous);
|
25195
|
+
.ft P
|
25196
|
+
.fi
|
25197
|
+
.UNINDENT
|
25198
|
+
.UNINDENT
|
25199
|
+
.SS リファレンス
|
25200
|
+
.INDENT 0.0
|
25201
|
+
.TP
|
25202
|
+
.B grn_cache
|
25203
|
+
It is an opaque cache object. You can create a \fBgrn_cache\fP by
|
25204
|
+
\fBgrn_cache_open()\fP and free the created object by
|
25205
|
+
\fBgrn_cache_close()\fP.
|
25206
|
+
.UNINDENT
|
25207
|
+
.INDENT 0.0
|
25208
|
+
.TP
|
25209
|
+
.B grn_cache *grn_cache_open(grn_ctx\fI\ *ctx\fP)
|
25210
|
+
新規にキャッシュオブジェクトを作成します。
|
25211
|
+
.sp
|
25212
|
+
If memory allocation for the new cache object is failed, \fBNULL\fP
|
25213
|
+
is returned. Error information is stored into the \fBctx\fP.
|
25214
|
+
.INDENT 7.0
|
25215
|
+
.TP
|
25216
|
+
.B パラメタ
|
25217
|
+
.INDENT 7.0
|
25218
|
+
.IP \(bu 2
|
25219
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25220
|
+
.UNINDENT
|
25221
|
+
.TP
|
25222
|
+
.B 戻り値
|
25223
|
+
A newly allocated cache object on success, \fBNULL\fP
|
25224
|
+
otherwise. The returned cache object must be freed by
|
25225
|
+
\fBgrn_cache_close()\fP.
|
25226
|
+
.UNINDENT
|
25227
|
+
.UNINDENT
|
25228
|
+
.INDENT 0.0
|
25229
|
+
.TP
|
25230
|
+
.B grn_rc grn_cache_close(grn_ctx\fI\ *ctx\fP, grn_cache\fI\ *cache\fP)
|
25231
|
+
Frees resourses of the \fBcache\fP.
|
25232
|
+
.INDENT 7.0
|
25233
|
+
.TP
|
25234
|
+
.B パラメタ
|
25235
|
+
.INDENT 7.0
|
25236
|
+
.IP \(bu 2
|
25237
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25238
|
+
.IP \(bu 2
|
25239
|
+
\fBcache\fP \-\- The cache object to be freed.
|
25240
|
+
.UNINDENT
|
25241
|
+
.TP
|
25242
|
+
.B 戻り値
|
25243
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25244
|
+
.UNINDENT
|
25245
|
+
.UNINDENT
|
25246
|
+
.INDENT 0.0
|
25247
|
+
.TP
|
25248
|
+
.B grn_rc grn_cache_current_set(grn_ctx\fI\ *ctx\fP, grn_cache\fI\ *cache\fP)
|
25249
|
+
\fB/reference/commands/select\fP コマンドで使われるキャッシュオブジェクトを設定します。
|
25250
|
+
.INDENT 7.0
|
25251
|
+
.TP
|
25252
|
+
.B パラメタ
|
25253
|
+
.INDENT 7.0
|
25254
|
+
.IP \(bu 2
|
25255
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25256
|
+
.IP \(bu 2
|
25257
|
+
\fBcache\fP \-\- \fB/reference/commands/select\fP コマンドで使われるキャッシュオブジェクト。
|
25258
|
+
.UNINDENT
|
25259
|
+
.TP
|
25260
|
+
.B 戻り値
|
25261
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25262
|
+
.UNINDENT
|
25263
|
+
.UNINDENT
|
25264
|
+
.INDENT 0.0
|
25265
|
+
.TP
|
25266
|
+
.B grn_cache *grn_cache_current_get(grn_ctx\fI\ *ctx\fP)
|
25267
|
+
\fB/reference/commands/select\fP コマンドで使われるキャッシュオブジェクトを取得します。
|
25268
|
+
.INDENT 7.0
|
25269
|
+
.TP
|
25270
|
+
.B パラメタ
|
25271
|
+
.INDENT 7.0
|
25272
|
+
.IP \(bu 2
|
25273
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25274
|
+
.UNINDENT
|
25275
|
+
.TP
|
25276
|
+
.B 戻り値
|
25277
|
+
\fB/reference/commands/select\fP コマンドで使われるキャッシュオブジェクト。 \fBNULL\fP のこともあります。
|
25278
|
+
.UNINDENT
|
25279
|
+
.UNINDENT
|
25280
|
+
.INDENT 0.0
|
25281
|
+
.TP
|
25282
|
+
.B grn_rc grn_cache_set_max_n_entries(grn_ctx\fI\ *ctx\fP, grn_cache\fI\ *cache\fP, unsigned int\fI\ n\fP)
|
25283
|
+
キャッシュオブジェクトのエントリの最大数を設定します。
|
25284
|
+
.INDENT 7.0
|
25285
|
+
.TP
|
25286
|
+
.B パラメタ
|
25287
|
+
.INDENT 7.0
|
25288
|
+
.IP \(bu 2
|
25289
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25290
|
+
.IP \(bu 2
|
25291
|
+
\fBcache\fP \-\- 変更するキャッシュオブジェクト。
|
25292
|
+
.IP \(bu 2
|
25293
|
+
\fBn\fP \-\- The new max number of entries of the cache object.
|
25294
|
+
.UNINDENT
|
25295
|
+
.TP
|
25296
|
+
.B 戻り値
|
25297
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25298
|
+
.UNINDENT
|
25299
|
+
.UNINDENT
|
25300
|
+
.INDENT 0.0
|
25301
|
+
.TP
|
25302
|
+
.B unsigned int grn_cache_get_max_n_entries(grn_ctx\fI\ *ctx\fP, grn_cache\fI\ *cache\fP)
|
25303
|
+
キャッシュオブジェクトのエントリの最大数を取得します。
|
25304
|
+
.INDENT 7.0
|
25305
|
+
.TP
|
25306
|
+
.B パラメタ
|
25307
|
+
.INDENT 7.0
|
25308
|
+
.IP \(bu 2
|
25309
|
+
\fBctx\fP \-\- その時点のコンテキスト。
|
25310
|
+
.IP \(bu 2
|
25311
|
+
\fBcache\fP \-\- The target cache object.
|
25312
|
+
.UNINDENT
|
25313
|
+
.TP
|
25314
|
+
.B 戻り値
|
25315
|
+
The max number of entries of the cache object.
|
25316
|
+
.UNINDENT
|
25317
|
+
.UNINDENT
|
25318
|
+
.SS \fBgrn_column\fP
|
25319
|
+
.SS 概要
|
25320
|
+
.sp
|
25321
|
+
TODO...
|
25322
|
+
.SS 実行例:
|
25323
|
+
.sp
|
25324
|
+
TODO...
|
25325
|
+
.SS リファレンス
|
25326
|
+
.INDENT 0.0
|
25327
|
+
.TP
|
25328
|
+
.B grn_obj *grn_column_create(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP, const char\fI\ *path\fP, grn_obj_flags\fI\ flags\fP, grn_obj\fI\ *type\fP)
|
25329
|
+
tableに新たなカラムを定義します。nameは省略できません。一つのtableに同一のnameのcolumnを複数定義することはできません。
|
25330
|
+
.INDENT 7.0
|
25331
|
+
.TP
|
25332
|
+
.B パラメタ
|
25333
|
+
.INDENT 7.0
|
25334
|
+
.IP \(bu 2
|
25335
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
25336
|
+
.IP \(bu 2
|
25337
|
+
\fBname\fP \-\- カラム名を指定します。
|
25338
|
+
.IP \(bu 2
|
25339
|
+
\fBname_size\fP \-\- nameパラメータのsize(byte)を指定します。
|
25340
|
+
.IP \(bu 2
|
25341
|
+
\fBpath\fP \-\- カラムを格納するファイルパスを指定します。
|
25342
|
+
flagsに \fBGRN_OBJ_PERSISTENT\fP が指定されている場合のみ有効です。
|
25343
|
+
NULLなら自動的にファイルパスが付与されます。
|
25344
|
+
.IP \(bu 2
|
25345
|
+
\fBflags\fP \-\-
|
25346
|
+
.sp
|
25347
|
+
\fBGRN_OBJ_PERSISTENT\fP を指定すると永続columnとなります。
|
25348
|
+
.sp
|
25349
|
+
\fBGRN_OBJ_COLUMN_INDEX\fP を指定すると転置インデックスとなります。
|
25350
|
+
.sp
|
25351
|
+
\fBGRN_OBJ_COLUMN_SCALAR\fP を指定するとスカラ値(単独の値)を格納します。
|
25352
|
+
.sp
|
25353
|
+
\fBGRN_OBJ_COLUMN_VECTOR\fP を指定すると値の配列を格納します。
|
25354
|
+
.sp
|
25355
|
+
\fBGRN_OBJ_COMPRESS_ZLIB\fP を指定すると値をzlib圧縮して格納します。
|
25356
|
+
.sp
|
25357
|
+
\fBGRN_OBJ_COMPRESS_LZO\fP を指定すると値をlzo圧縮して格納します。
|
25358
|
+
.sp
|
25359
|
+
\fBGRN_OBJ_COLUMN_INDEX\fP と共に \fBGRN_OBJ_WITH_SECTION\fP を指定すると、転置索引にsection(段落情報)を合わせて格納します。
|
25360
|
+
.sp
|
25361
|
+
\fBGRN_OBJ_COLUMN_INDEX\fP と共に \fBGRN_OBJ_WITH_WEIGHT\fP を指定すると、転置索引にweight情報を合わせて格納します。
|
25362
|
+
.sp
|
25363
|
+
\fBGRN_OBJ_COLUMN_INDEX\fP と共に \fBGRN_OBJ_WITH_POSITION\fP を指定すると、転置索引に出現位置情報を合わせて格納します。
|
25364
|
+
|
25365
|
+
.IP \(bu 2
|
25366
|
+
\fBtype\fP \-\- カラム値の型を指定します。定義済みのtypeあるいはtableを指定できます。
|
25367
|
+
.UNINDENT
|
25368
|
+
.UNINDENT
|
25369
|
+
.UNINDENT
|
25370
|
+
.INDENT 0.0
|
25371
|
+
.TP
|
25372
|
+
.B grn_rc grn_column_index_update(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *column\fP, grn_id\fI\ id\fP, unsigned int\fI\ section\fP, grn_obj\fI\ *oldvalue\fP, grn_obj\fI\ *newvalue\fP)
|
25373
|
+
oldvalue, newvalueの値から得られるキーに対応するcolumnの値の中の、id, sectionに対応するエントリを更新します。columnは \fBGRN_OBJ_COLUMN_INDEX\fP 型のカラムでなければなりません。
|
25374
|
+
.INDENT 7.0
|
25375
|
+
.TP
|
25376
|
+
.B パラメタ
|
25377
|
+
.INDENT 7.0
|
25378
|
+
.IP \(bu 2
|
25379
|
+
\fBcolumn\fP \-\- 対象columnを指定します。
|
25380
|
+
.IP \(bu 2
|
25381
|
+
\fBid\fP \-\- 対象レコードのIDを指定します。
|
25382
|
+
.IP \(bu 2
|
25383
|
+
\fBsection\fP \-\- 対象レコードのセクション番号を指定します。
|
25384
|
+
.IP \(bu 2
|
25385
|
+
\fBoldvalue\fP \-\- 更新前の値を指定します。
|
25386
|
+
.IP \(bu 2
|
25387
|
+
\fBnewvalue\fP \-\- 更新後の値を指定します。
|
25388
|
+
.UNINDENT
|
25389
|
+
.UNINDENT
|
25390
|
+
.UNINDENT
|
25391
|
+
.INDENT 0.0
|
25392
|
+
.TP
|
25393
|
+
.B grn_obj *grn_column_table(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *column\fP)
|
25394
|
+
columnが属するtableを返します。
|
25395
|
+
.INDENT 7.0
|
25396
|
+
.TP
|
25397
|
+
.B パラメタ
|
25398
|
+
.INDENT 7.0
|
25399
|
+
.IP \(bu 2
|
25400
|
+
\fBcolumn\fP \-\- 対象columnを指定します。
|
25401
|
+
.UNINDENT
|
25402
|
+
.UNINDENT
|
25403
|
+
.UNINDENT
|
25404
|
+
.INDENT 0.0
|
25405
|
+
.TP
|
25406
|
+
.B grn_rc grn_column_rename(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *column\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
25407
|
+
ctxが使用するdbにおいてcolumnに対応する名前をnameに更新します。columnは永続オブジェクトでなければいけません。
|
25408
|
+
.INDENT 7.0
|
25409
|
+
.TP
|
25410
|
+
.B パラメタ
|
25411
|
+
.INDENT 7.0
|
25412
|
+
.IP \(bu 2
|
25413
|
+
\fBcolumn\fP \-\- 対象columnを指定します。
|
25414
|
+
.IP \(bu 2
|
25415
|
+
\fBname\fP \-\- 新しい名前を指定します。
|
25416
|
+
.IP \(bu 2
|
25417
|
+
\fBname_size\fP \-\- nameパラメータのsize(byte)を指定します。
|
25418
|
+
.UNINDENT
|
25419
|
+
.UNINDENT
|
25420
|
+
.UNINDENT
|
25421
|
+
.INDENT 0.0
|
25422
|
+
.TP
|
25423
|
+
.B int grn_column_name(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, char\fI\ *namebuf\fP, int\fI\ buf_size\fP)
|
25424
|
+
カラムobjの名前の長さを返します。buf_sizeの長さが名前の長さ以上であった場合は、namebufに該当する名前をコピーします。
|
25425
|
+
.INDENT 7.0
|
25426
|
+
.TP
|
25427
|
+
.B パラメタ
|
25428
|
+
.INDENT 7.0
|
25429
|
+
.IP \(bu 2
|
25430
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
25431
|
+
.IP \(bu 2
|
25432
|
+
\fBnamebuf\fP \-\- 名前を格納するバッファ(呼出側で準備する)を指定します。
|
25433
|
+
.IP \(bu 2
|
25434
|
+
\fBbuf_size\fP \-\- namebufのサイズ(byte長)を指定します。
|
25435
|
+
.UNINDENT
|
25436
|
+
.UNINDENT
|
25437
|
+
.UNINDENT
|
25438
|
+
.INDENT 0.0
|
25439
|
+
.TP
|
25440
|
+
.B int grn_column_index(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *column\fP, grn_operator\fI\ op\fP, grn_obj\fI\ **indexbuf\fP, int\fI\ buf_size\fP, int\fI\ *section\fP)
|
25441
|
+
columnに張られているindexのうち、opの操作を実行可能なものの数を返します。またそれらのidを、buf_sizeに指定された個数を上限としてindexbufに返します。
|
25442
|
+
.INDENT 7.0
|
25443
|
+
.TP
|
25444
|
+
.B パラメタ
|
25445
|
+
.INDENT 7.0
|
25446
|
+
.IP \(bu 2
|
25447
|
+
\fBcolumn\fP \-\- 対象のcolumnを指定します。
|
25448
|
+
.IP \(bu 2
|
25449
|
+
\fBop\fP \-\- indexで実行したい操作を指定します。
|
25450
|
+
.IP \(bu 2
|
25451
|
+
\fBindexbuf\fP \-\- indexを格納するバッファ(呼出側で準備する)を指定します。
|
25452
|
+
.IP \(bu 2
|
25453
|
+
\fBbuf_size\fP \-\- indexbufのサイズ(byte長)を指定します。
|
25454
|
+
.IP \(bu 2
|
25455
|
+
\fBsection\fP \-\- section番号を格納するint長バッファ(呼出側で準備する)を指定します。
|
25456
|
+
.UNINDENT
|
25457
|
+
.UNINDENT
|
25458
|
+
.UNINDENT
|
25459
|
+
.SS \fBgrn_command_version\fP
|
25460
|
+
.SS 概要
|
25461
|
+
.sp
|
25462
|
+
TODO...
|
25463
|
+
.SS 実行例:
|
25464
|
+
.sp
|
25465
|
+
TODO...
|
25466
|
+
.SS リファレンス
|
25467
|
+
.INDENT 0.0
|
25468
|
+
.TP
|
25469
|
+
.B grn_command_version
|
25470
|
+
.UNINDENT
|
25471
|
+
.INDENT 0.0
|
25472
|
+
.TP
|
25473
|
+
.B GRN_COMMAND_VERSION_MIN
|
25474
|
+
.UNINDENT
|
25475
|
+
.INDENT 0.0
|
25476
|
+
.TP
|
25477
|
+
.B GRN_COMMAND_VERSION_STABLE
|
25478
|
+
.UNINDENT
|
25479
|
+
.INDENT 0.0
|
25480
|
+
.TP
|
25481
|
+
.B GRN_COMMAND_VERSION_MAX
|
25482
|
+
.UNINDENT
|
25483
|
+
.INDENT 0.0
|
25484
|
+
.TP
|
25485
|
+
.B grn_command_version grn_get_default_command_version(void)
|
25486
|
+
デフォルトのcommand_versionを返します。
|
25487
|
+
.UNINDENT
|
25488
|
+
.INDENT 0.0
|
25489
|
+
.TP
|
25490
|
+
.B grn_rc grn_set_default_command_version(grn_command_version\fI\ version\fP)
|
25491
|
+
デフォルトのcommand_versionを変更します。
|
25492
|
+
.INDENT 7.0
|
25493
|
+
.TP
|
25494
|
+
.B パラメタ
|
25495
|
+
.INDENT 7.0
|
25496
|
+
.IP \(bu 2
|
25497
|
+
\fBversion\fP \-\- 変更後のデフォルトのcommand_versionを指定します。
|
25498
|
+
.UNINDENT
|
25499
|
+
.UNINDENT
|
25500
|
+
.UNINDENT
|
25501
|
+
.SS \fBgrn_ctx\fP
|
25502
|
+
.SS 概要
|
25503
|
+
.sp
|
25504
|
+
\fBgrn_ctx\fP は最も重要なオブジェクトです。\fBgrn_ctx\fP はその時点の情報を保持します:
|
25505
|
+
.INDENT 0.0
|
25506
|
+
.IP \(bu 2
|
25507
|
+
最後に発生したエラー。
|
25508
|
+
.IP \(bu 2
|
25509
|
+
その時点のエンコーディング。
|
25510
|
+
.IP \(bu 2
|
25511
|
+
デフォルトの閾値。(例: \fImatch\-escalation\-threshold\fP)
|
25512
|
+
.IP \(bu 2
|
25513
|
+
デフォルトのコマンドバージョン。( \fB/reference/commands/command_version\fP )を参照のこと。
|
25514
|
+
.UNINDENT
|
25515
|
+
.sp
|
25516
|
+
\fBgrn_ctx\fP は基盤となる機能を提供します:
|
25517
|
+
.INDENT 0.0
|
25518
|
+
.IP \(bu 2
|
25519
|
+
メモリ管理機能
|
25520
|
+
.IP \(bu 2
|
25521
|
+
ロギング機能
|
25522
|
+
.UNINDENT
|
25523
|
+
.sp
|
25524
|
+
ほとんどのAPIは \fBgrn_ctx\fP を最初の引数にとります。
|
25525
|
+
.sp
|
25526
|
+
同じ \fBgrn_ctx\fP を二つ以上のスレッドからは扱えません。\fBgrn_ctx\fP はスレッドごとに作成する必要があります。一つのスレッドでは \fBgrn_ctx\fP を二つ以上扱えますが、通常はその必要はありません。
|
25527
|
+
.SS 実行例:
|
25528
|
+
.sp
|
25529
|
+
TODO...
|
25530
|
+
.SS リファレンス
|
25531
|
+
.INDENT 0.0
|
25532
|
+
.TP
|
25533
|
+
.B grn_ctx
|
25534
|
+
TODO...
|
25535
|
+
.UNINDENT
|
25536
|
+
.INDENT 0.0
|
25537
|
+
.TP
|
25538
|
+
.B grn_rc grn_ctx_init(grn_ctx\fI\ *ctx\fP, int\fI\ flags\fP)
|
25539
|
+
ctxを初期化します。
|
25540
|
+
.INDENT 7.0
|
25541
|
+
.TP
|
25542
|
+
.B パラメタ
|
25543
|
+
.INDENT 7.0
|
25544
|
+
.IP \(bu 2
|
25545
|
+
\fBctx\fP \-\- 初期化するctx構造体へのポインタを指定します。
|
25546
|
+
.IP \(bu 2
|
25547
|
+
\fBflags\fP \-\- 初期化する \fBctx\fP のオプションを指定します。
|
25548
|
+
.UNINDENT
|
25549
|
+
.TP
|
25550
|
+
.B 戻り値
|
25551
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25552
|
+
.UNINDENT
|
25553
|
+
.UNINDENT
|
25554
|
+
.INDENT 0.0
|
25555
|
+
.TP
|
25556
|
+
.B grn_rc grn_ctx_fin(grn_ctx\fI\ *ctx\fP)
|
25557
|
+
ctxの管理するメモリを解放し、使用を終了します。
|
25558
|
+
.sp
|
25559
|
+
If \fBctx\fP is initialized by \fBgrn_ctx_open()\fP not \fBgrn_ctx_init()\fP. You need also to call \fBgrn_ctx_close()\fP.
|
25560
|
+
.INDENT 7.0
|
25561
|
+
.TP
|
25562
|
+
.B パラメタ
|
25563
|
+
.INDENT 7.0
|
25564
|
+
.IP \(bu 2
|
25565
|
+
\fBctx\fP \-\- 解放するctx構造体へのポインタを指定します。
|
25566
|
+
.UNINDENT
|
25567
|
+
.TP
|
25568
|
+
.B 戻り値
|
25569
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25570
|
+
.UNINDENT
|
25571
|
+
.UNINDENT
|
25572
|
+
.INDENT 0.0
|
25573
|
+
.TP
|
25574
|
+
.B grn_ctx *grn_ctx_open(int\fI\ flags\fP)
|
25575
|
+
初期化された \fBgrn_ctx\fP オブジェクトを返します。
|
25576
|
+
.sp
|
25577
|
+
\fBgrn_ctx_init()\fP で初期化された \fBgrn_ctx\fP オブジェクトは構造体の実体をAPIの呼び元で確保するのに対して、 \fBgrn_ctx_open()\fP ではgroongaライブラリの内部で、実体を確保します。
|
25578
|
+
どちらで初期化された \fBgrn_ctx\fP も、 \fBgrn_ctx_fin()\fP で解放できます。
|
25579
|
+
\fBgrn_ctx_open()\fP で確保した \fBgrn_ctx\fP 構造体に関しては、\fBgrn_ctx_fin()\fP で解放した後に、その \fBgrn_ctx\fP で作成した \fBgrn_obj\fP を \fBgrn_obj_close()\fP によって解放しても問題ありません。
|
25580
|
+
.INDENT 7.0
|
25581
|
+
.TP
|
25582
|
+
.B パラメタ
|
25583
|
+
.INDENT 7.0
|
25584
|
+
.IP \(bu 2
|
25585
|
+
\fBflags\fP \-\- 初期化する \fBctx\fP のオプションを指定します。
|
25586
|
+
.UNINDENT
|
25587
|
+
.TP
|
25588
|
+
.B 戻り値
|
25589
|
+
初期化された \fBgrn_ctx\fP オブジェクトを返します。
|
25590
|
+
.UNINDENT
|
25591
|
+
.UNINDENT
|
25592
|
+
.INDENT 0.0
|
25593
|
+
.TP
|
25594
|
+
.B grn_rc grn_ctx_close(grn_ctx\fI\ *ctx\fP)
|
25595
|
+
It calls \fBgrn_ctx_fin()\fP and frees allocated memory for \fBctx\fP by \fBgrn_ctx_open()\fP.
|
25596
|
+
.INDENT 7.0
|
25597
|
+
.TP
|
25598
|
+
.B パラメタ
|
25599
|
+
.INDENT 7.0
|
25600
|
+
.IP \(bu 2
|
25601
|
+
\fBctx\fP \-\- no longer needed \fBgrn_ctx\fP.
|
25602
|
+
.UNINDENT
|
25603
|
+
.TP
|
25604
|
+
.B 戻り値
|
25605
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25606
|
+
.UNINDENT
|
25607
|
+
.UNINDENT
|
25608
|
+
.INDENT 0.0
|
25609
|
+
.TP
|
25610
|
+
.B grn_rc grn_ctx_set_finalizer(grn_ctx\fI\ *ctx\fP, grn_proc_func\fI\ *func\fP)
|
25611
|
+
ctxを破棄するときに呼ばれる関数を設定します。
|
25612
|
+
.INDENT 7.0
|
25613
|
+
.TP
|
25614
|
+
.B パラメタ
|
25615
|
+
.INDENT 7.0
|
25616
|
+
.IP \(bu 2
|
25617
|
+
\fBctx\fP \-\- 対象ctxを指定します。
|
25618
|
+
.IP \(bu 2
|
25619
|
+
\fBfunc\fP \-\- \fBctx\fP を破棄するときに呼ばれる関数を指定します。
|
25620
|
+
.UNINDENT
|
25621
|
+
.TP
|
25622
|
+
.B 戻り値
|
25623
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25624
|
+
.UNINDENT
|
25625
|
+
.UNINDENT
|
25626
|
+
.INDENT 0.0
|
25627
|
+
.TP
|
25628
|
+
.B grn_command_version grn_ctx_get_command_version(grn_ctx\fI\ *ctx\fP)
|
25629
|
+
command_versionを返します。
|
25630
|
+
.UNINDENT
|
25631
|
+
.INDENT 0.0
|
25632
|
+
.TP
|
25633
|
+
.B grn_rc grn_ctx_set_command_version(grn_ctx\fI\ *ctx\fP, grn_command_version\fI\ version\fP)
|
25634
|
+
command_versionを変更します。
|
25635
|
+
.INDENT 7.0
|
25636
|
+
.TP
|
25637
|
+
.B パラメタ
|
25638
|
+
.INDENT 7.0
|
25639
|
+
.IP \(bu 2
|
25640
|
+
\fBversion\fP \-\- 変更後のcommand_versionを指定します。
|
25641
|
+
.UNINDENT
|
25642
|
+
.UNINDENT
|
25643
|
+
.UNINDENT
|
25644
|
+
.INDENT 0.0
|
25645
|
+
.TP
|
25646
|
+
.B grn_rc grn_ctx_use(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *db\fP)
|
25647
|
+
ctxが操作対象とするdbを指定します。NULLを指定した場合は、dbを操作しない状態(init直後の状態)になります。
|
25648
|
+
.sp
|
25649
|
+
Don\(aqt use it with \fBgrn_ctx\fP that has \fBGRN_CTX_PER_DB\fP flag.
|
25650
|
+
.INDENT 7.0
|
25651
|
+
.TP
|
25652
|
+
.B パラメタ
|
25653
|
+
.INDENT 7.0
|
25654
|
+
.IP \(bu 2
|
25655
|
+
\fBdb\fP \-\- ctxが使用するdbを指定します。
|
25656
|
+
.UNINDENT
|
25657
|
+
.UNINDENT
|
25658
|
+
.UNINDENT
|
25659
|
+
.INDENT 0.0
|
25660
|
+
.TP
|
25661
|
+
.B grn_obj *grn_ctx_db(grn_ctx\fI\ *ctx\fP)
|
25662
|
+
ctxが現在操作対象としているdbを返します。dbを使用していない場合はNULLを返します。
|
25663
|
+
.UNINDENT
|
25664
|
+
.INDENT 0.0
|
25665
|
+
.TP
|
25666
|
+
.B grn_obj *grn_ctx_get(grn_ctx\fI\ *ctx\fP, const char\fI\ *name\fP, int\fI\ name_size\fP)
|
25667
|
+
ctxが使用するdbからnameに対応するオブジェクトを検索して返す。nameに一致するオブジェクトが存在しなければNULLを返す。
|
25668
|
+
.INDENT 7.0
|
25669
|
+
.TP
|
25670
|
+
.B パラメタ
|
25671
|
+
.INDENT 7.0
|
25672
|
+
.IP \(bu 2
|
25673
|
+
\fBname\fP \-\- 検索しようとするオブジェクトの名前。
|
25674
|
+
.IP \(bu 2
|
25675
|
+
\fBname_size\fP \-\- The number of bytes of name. If negative value is specified, name is assumed that NULL\-terminated string.
|
25676
|
+
.UNINDENT
|
25677
|
+
.UNINDENT
|
25678
|
+
.UNINDENT
|
25679
|
+
.INDENT 0.0
|
25680
|
+
.TP
|
25681
|
+
.B grn_obj *grn_ctx_at(grn_ctx\fI\ *ctx\fP, grn_id\fI\ id\fP)
|
25682
|
+
ctx、またはctxが使用するdbからidに対応するオブジェクトを検索して返す。idに一致するオブジェクトが存在しなければNULLを返す。
|
25683
|
+
.INDENT 7.0
|
25684
|
+
.TP
|
25685
|
+
.B パラメタ
|
25686
|
+
.INDENT 7.0
|
25687
|
+
.IP \(bu 2
|
25688
|
+
\fBid\fP \-\- 検索しようとするオブジェクトのidを指定します。
|
25689
|
+
.UNINDENT
|
25690
|
+
.UNINDENT
|
25691
|
+
.UNINDENT
|
25692
|
+
.SS \fBgrn_db\fP
|
25693
|
+
.SS 概要
|
25694
|
+
.sp
|
25695
|
+
TODO...
|
25696
|
+
.SS 実行例:
|
25697
|
+
.sp
|
25698
|
+
TODO...
|
25699
|
+
.SS リファレンス
|
25700
|
+
.sp
|
25701
|
+
TODO...
|
25702
|
+
.INDENT 0.0
|
25703
|
+
.TP
|
25704
|
+
.B grn_db
|
25705
|
+
TODO...
|
25706
|
+
.UNINDENT
|
25707
|
+
.INDENT 0.0
|
25708
|
+
.TP
|
25709
|
+
.B grn_db_create_optarg
|
25710
|
+
It is used for specifying options for \fBgrn_db_create()\fP.
|
25711
|
+
.UNINDENT
|
25712
|
+
.INDENT 0.0
|
25713
|
+
.TP
|
25714
|
+
.B char **grn_db_create_optarg.builtin_type_names
|
25715
|
+
組み込み型の名前となるnul終端文字列の配列を指定する。
|
25716
|
+
.UNINDENT
|
25717
|
+
.INDENT 0.0
|
25718
|
+
.TP
|
25719
|
+
.B int grn_db_create_optarg.n_builtin_type_names
|
25720
|
+
n_builtin_type_namesには、optarg.builtin_type_namesで指定する文字列の数を
|
25721
|
+
指定する。配列のoffsetはenum型grn_builtin_typeの値に対応する。
|
25722
|
+
.UNINDENT
|
25723
|
+
.INDENT 0.0
|
25724
|
+
.TP
|
25725
|
+
.B grn_obj *grn_db_create(grn_ctx\fI\ *ctx\fP, const char\fI\ *path\fP, grn_db_create_optarg\fI\ *optarg\fP)
|
25726
|
+
新たなdbを作成します。
|
25727
|
+
.INDENT 7.0
|
25728
|
+
.TP
|
25729
|
+
.B パラメタ
|
25730
|
+
.INDENT 7.0
|
25731
|
+
.IP \(bu 2
|
25732
|
+
\fBctx\fP \-\- 初期化済みの \fBgrn_ctx\fP を指定します。
|
25733
|
+
.IP \(bu 2
|
25734
|
+
\fBpath\fP \-\- 作成するdbを格納するファイルパスを指定します。NULLならtemporary dbとなります。NULL以外のパスを指定した場合はpersistent dbとなります。
|
25735
|
+
.IP \(bu 2
|
25736
|
+
\fBoptarg\fP \-\-
|
25737
|
+
.sp
|
25738
|
+
Currently, it is not used. It is just ignored.
|
25739
|
+
.sp
|
25740
|
+
作成するdbの組み込み型の名前を変更する時に指定します。
|
25741
|
+
.sp
|
25742
|
+
optarg.builtin_type_namesには、組み込み型の名前となるnull終端文字列の配列を指定します。optarg.n_builtin_type_namesには、optarg.builtin_type_namesで指定する文字列の数を指定します。配列のoffsetはenum型grn_builtin_typeの値に対応します。
|
25743
|
+
|
25744
|
+
.UNINDENT
|
25745
|
+
.UNINDENT
|
25746
|
+
.UNINDENT
|
25747
|
+
.INDENT 0.0
|
25748
|
+
.TP
|
25749
|
+
.B grn_obj *grn_db_open(grn_ctx\fI\ *ctx\fP, const char\fI\ *path\fP)
|
25750
|
+
既存のdbを開きます。
|
25751
|
+
.INDENT 7.0
|
25752
|
+
.TP
|
25753
|
+
.B パラメタ
|
25754
|
+
.INDENT 7.0
|
25755
|
+
.IP \(bu 2
|
25756
|
+
\fBpath\fP \-\- 開こうとするdbを格納するファイルパスを指定します。
|
25757
|
+
.UNINDENT
|
25758
|
+
.UNINDENT
|
25759
|
+
.UNINDENT
|
25760
|
+
.INDENT 0.0
|
25761
|
+
.TP
|
25762
|
+
.B void grn_db_touch(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *db\fP)
|
25763
|
+
dbの内容の最終更新時刻を現在時刻にします。
|
25764
|
+
.sp
|
25765
|
+
最終更新時刻はキャッシュが有効かどうかの判断などに利用されます。
|
25766
|
+
.INDENT 7.0
|
25767
|
+
.TP
|
25768
|
+
.B パラメタ
|
25769
|
+
.INDENT 7.0
|
25770
|
+
.IP \(bu 2
|
25771
|
+
\fBdb\fP \-\- 内容が変更されたdbを指定します。
|
25772
|
+
.UNINDENT
|
25773
|
+
.UNINDENT
|
25774
|
+
.UNINDENT
|
25775
|
+
.INDENT 0.0
|
25776
|
+
.TP
|
25777
|
+
.B grn_obj *grn_obj_db(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
25778
|
+
objの属するdbを返します。
|
25779
|
+
.INDENT 7.0
|
25780
|
+
.TP
|
25781
|
+
.B パラメタ
|
25782
|
+
.INDENT 7.0
|
25783
|
+
.IP \(bu 2
|
25784
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
25785
|
+
.UNINDENT
|
25786
|
+
.UNINDENT
|
25787
|
+
.UNINDENT
|
25788
|
+
.SS \fBgrn_encoding\fP
|
25789
|
+
.SS 概要
|
25790
|
+
.sp
|
25791
|
+
TODO...
|
25792
|
+
.SS 実行例:
|
25793
|
+
.sp
|
25794
|
+
TODO...
|
25795
|
+
.SS リファレンス
|
25796
|
+
.INDENT 0.0
|
25797
|
+
.TP
|
25798
|
+
.B grn_encoding
|
25799
|
+
TODO...
|
25800
|
+
.UNINDENT
|
25801
|
+
.INDENT 0.0
|
25802
|
+
.TP
|
25803
|
+
.B grn_encoding grn_get_default_encoding(void)
|
25804
|
+
デフォルトのencodingを返します。
|
25805
|
+
.UNINDENT
|
25806
|
+
.INDENT 0.0
|
25807
|
+
.TP
|
25808
|
+
.B grn_rc grn_set_default_encoding(grn_encoding\fI\ encoding\fP)
|
25809
|
+
デフォルトのencodingを変更します。
|
25810
|
+
.INDENT 7.0
|
25811
|
+
.TP
|
25812
|
+
.B パラメタ
|
25813
|
+
.INDENT 7.0
|
25814
|
+
.IP \(bu 2
|
25815
|
+
\fBencoding\fP \-\- 変更後のデフォルトのencodingを指定します。
|
25816
|
+
.UNINDENT
|
25817
|
+
.UNINDENT
|
25818
|
+
.UNINDENT
|
25819
|
+
.INDENT 0.0
|
25820
|
+
.TP
|
25821
|
+
.B const char *grn_encoding_to_string(grn_encoding\fI\ encoding\fP)
|
25822
|
+
Returns string representation for the encoding. For example, \(aqgrn_encoding_to_string(\fBGRN_ENC_UTF8\fP)\(aq returns \(aq"utf8"\(aq.
|
25823
|
+
.sp
|
25824
|
+
"unknown" is returned for invalid encoding.
|
25825
|
+
.INDENT 7.0
|
25826
|
+
.TP
|
25827
|
+
.B パラメタ
|
25828
|
+
.INDENT 7.0
|
25829
|
+
.IP \(bu 2
|
25830
|
+
\fBencoding\fP \-\- その時点のエンコーディング。
|
25831
|
+
.UNINDENT
|
25832
|
+
.UNINDENT
|
25833
|
+
.UNINDENT
|
25834
|
+
.INDENT 0.0
|
25835
|
+
.TP
|
25836
|
+
.B grn_encoding grn_encoding_parse(const char\fI\ *name\fP)
|
25837
|
+
Parses encoding name and returns grn_encoding. For example, \(aqgrn_encoding_parse("UTF8")\(aq returns \(aq\fBGRN_ENC_UTF8\fP\(aq.
|
25838
|
+
.sp
|
25839
|
+
\fBGRN_ENC_UTF8\fP is returned for invalid encoding name.
|
25840
|
+
.INDENT 7.0
|
25841
|
+
.TP
|
25842
|
+
.B パラメタ
|
25843
|
+
.INDENT 7.0
|
25844
|
+
.IP \(bu 2
|
25845
|
+
\fBname\fP \-\- その時点のエンコーディング。
|
25846
|
+
.UNINDENT
|
25847
|
+
.UNINDENT
|
25848
|
+
.UNINDENT
|
25849
|
+
.SS grn_expr
|
25850
|
+
.sp
|
25851
|
+
\fIgrn_expr\fP is an \fBgrn_obj\fP that represents an expression. Here
|
25852
|
+
is a list of what expression can do:
|
25853
|
+
.INDENT 0.0
|
25854
|
+
.INDENT 3.5
|
25855
|
+
.INDENT 0.0
|
25856
|
+
.IP \(bu 2
|
25857
|
+
Expression can apply some operations to a record by
|
25858
|
+
\fBgrn_expr_exec()\fP.
|
25859
|
+
.IP \(bu 2
|
25860
|
+
Expression can represents search condition. \fBgrn_table_select()\fP
|
25861
|
+
can select records that match against the search condition represented
|
25862
|
+
by expression.
|
25863
|
+
.UNINDENT
|
25864
|
+
.UNINDENT
|
25865
|
+
.UNINDENT
|
25866
|
+
.sp
|
25867
|
+
There are two string representations of expression:
|
25868
|
+
.INDENT 0.0
|
25869
|
+
.INDENT 3.5
|
25870
|
+
.INDENT 0.0
|
25871
|
+
.IP \(bu 2
|
25872
|
+
\fB/reference/grn_expr/query_syntax\fP
|
25873
|
+
.IP \(bu 2
|
25874
|
+
\fB/reference/grn_expr/script_syntax\fP
|
25875
|
+
.UNINDENT
|
25876
|
+
.UNINDENT
|
25877
|
+
.UNINDENT
|
25878
|
+
.sp
|
25879
|
+
\fBgrn_expr_parse()\fP parses string represented expression and
|
25880
|
+
appends the parsed expression to another expression.
|
25881
|
+
.SS 実行例:
|
25882
|
+
.sp
|
25883
|
+
TODO...
|
25884
|
+
.SS リファレンス
|
25885
|
+
.INDENT 0.0
|
25886
|
+
.TP
|
25887
|
+
.B GRN_API grn_obj *grn_expr_create(grn_ctx\fI\ *ctx\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
25888
|
+
.UNINDENT
|
25889
|
+
.INDENT 0.0
|
25890
|
+
.TP
|
25891
|
+
.B GRN_API grn_rc grn_expr_close(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP)
|
25892
|
+
.UNINDENT
|
25893
|
+
.INDENT 0.0
|
25894
|
+
.TP
|
25895
|
+
.B GRN_API grn_obj *grn_expr_add_var(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
25896
|
+
.UNINDENT
|
25897
|
+
.INDENT 0.0
|
25898
|
+
.TP
|
25899
|
+
.B GRN_API grn_obj *grn_expr_get_var_by_offset(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, unsigned int\fI\ offset\fP)
|
25900
|
+
.UNINDENT
|
25901
|
+
.INDENT 0.0
|
25902
|
+
.TP
|
25903
|
+
.B GRN_API grn_obj *grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj, grn_operator op, int nargs);
|
25904
|
+
.UNINDENT
|
25905
|
+
.INDENT 0.0
|
25906
|
+
.TP
|
25907
|
+
.B GRN_API grn_obj *grn_expr_append_const(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, grn_obj\fI\ *obj\fP, grn_operator\fI\ op\fP, int\fI\ nargs\fP)
|
25908
|
+
.UNINDENT
|
25909
|
+
.INDENT 0.0
|
25910
|
+
.TP
|
25911
|
+
.B GRN_API grn_obj *grn_expr_append_const_str(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, const char\fI\ *str\fP, unsigned int\fI\ str_size\fP, grn_operator\fI\ op\fP, int\fI\ nargs\fP)
|
25912
|
+
.UNINDENT
|
25913
|
+
.INDENT 0.0
|
25914
|
+
.TP
|
25915
|
+
.B GRN_API grn_obj *grn_expr_append_const_int(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, int\fI\ i\fP, grn_operator\fI\ op\fP, int\fI\ nargs\fP)
|
25916
|
+
.UNINDENT
|
25917
|
+
.INDENT 0.0
|
25918
|
+
.TP
|
25919
|
+
.B GRN_API grn_rc grn_expr_append_op(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, grn_operator\fI\ op\fP, int\fI\ nargs\fP)
|
25920
|
+
.UNINDENT
|
25921
|
+
.INDENT 0.0
|
25922
|
+
.TP
|
25923
|
+
.B grn_rc grn_expr_syntax_escape(grn_ctx\fI\ *ctx\fP, const char\fI\ *string\fP, int\fI\ string_size\fP, const char\fI\ *target_characters\fP, char\fI\ escape_character\fP, grn_obj\fI\ *escaped_string\fP)
|
25924
|
+
Escapes \fBtarget_characters\fP in \fBstring\fP by \fBescape_character\fP.
|
25925
|
+
.INDENT 7.0
|
25926
|
+
.TP
|
25927
|
+
.B パラメタ
|
25928
|
+
.INDENT 7.0
|
25929
|
+
.IP \(bu 2
|
25930
|
+
\fBctx\fP \-\- Its encoding must be the same encoding of \fBstring\fP.
|
25931
|
+
It is used for allocating buffer for \fBescaped_string\fP.
|
25932
|
+
.IP \(bu 2
|
25933
|
+
\fBstring\fP \-\- String expression representation.
|
25934
|
+
.IP \(bu 2
|
25935
|
+
\fBstring_size\fP \-\- The byte size of \fBstring\fP. \fB\-1\fP means \fBstring\fP
|
25936
|
+
is NULL terminated string.
|
25937
|
+
.IP \(bu 2
|
25938
|
+
\fBtarget_characters\fP \-\- NULL terminated escape target characters.
|
25939
|
+
For example, \fB"+\-><~*()\e"\e\e:"\fP is
|
25940
|
+
\fBtarget_characters\fP for
|
25941
|
+
\fB/reference/grn_expr/query_syntax\fP.
|
25942
|
+
.IP \(bu 2
|
25943
|
+
\fBescape_character\fP \-\- The character to use escape a character in
|
25944
|
+
\fBtarget_characters\fP. For example, \fB\e\e\fP
|
25945
|
+
(backslash) is \fBescaped_character\fP for
|
25946
|
+
\fB/reference/grn_expr/query_syntax\fP.
|
25947
|
+
.IP \(bu 2
|
25948
|
+
\fBescaped_string\fP \-\- The output of escaped \fBstring\fP. It should be
|
25949
|
+
text typed bulk.
|
25950
|
+
.UNINDENT
|
25951
|
+
.TP
|
25952
|
+
.B 戻り値
|
25953
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25954
|
+
.UNINDENT
|
25955
|
+
.UNINDENT
|
25956
|
+
.INDENT 0.0
|
25957
|
+
.TP
|
25958
|
+
.B grn_rc grn_expr_syntax_escape_query(grn_ctx\fI\ *ctx\fP, const char\fI\ *query\fP, int\fI\ query_size\fP, grn_obj\fI\ *escaped_query\fP)
|
25959
|
+
\fB/reference/grn_expr/query_syntax\fP にある特別な文字をエスケープします。
|
25960
|
+
.INDENT 7.0
|
25961
|
+
.TP
|
25962
|
+
.B パラメタ
|
25963
|
+
.INDENT 7.0
|
25964
|
+
.IP \(bu 2
|
25965
|
+
\fBctx\fP \-\- Its encoding must be the same encoding of \fBquery\fP.
|
25966
|
+
It is used for allocating buffer for \fBescaped_query\fP.
|
25967
|
+
.IP \(bu 2
|
25968
|
+
\fBquery\fP \-\- \fB/reference/grn_expr/query_syntax\fP にある文字列式の表現。
|
25969
|
+
.IP \(bu 2
|
25970
|
+
\fBquery_size\fP \-\- The byte size of \fBquery\fP. \fB\-1\fP means \fBquery\fP
|
25971
|
+
is NULL terminated string.
|
25972
|
+
.IP \(bu 2
|
25973
|
+
\fBescaped_query\fP \-\- The output of escaped \fBquery\fP. It should be
|
25974
|
+
text typed bulk.
|
25975
|
+
.UNINDENT
|
25976
|
+
.TP
|
25977
|
+
.B 戻り値
|
25978
|
+
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
25979
|
+
.UNINDENT
|
25980
|
+
.UNINDENT
|
25981
|
+
.INDENT 0.0
|
25982
|
+
.TP
|
25983
|
+
.B GRN_API grn_rc grn_expr_compile(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP)
|
25984
|
+
.UNINDENT
|
25985
|
+
.INDENT 0.0
|
25986
|
+
.TP
|
25987
|
+
.B GRN_API grn_obj *grn_expr_exec(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, int\fI\ nargs\fP)
|
25988
|
+
.UNINDENT
|
25989
|
+
.INDENT 0.0
|
25990
|
+
.TP
|
25991
|
+
.B GRN_API grn_obj *grn_expr_alloc(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *expr\fP, grn_id\fI\ domain\fP, grn_obj_flags\fI\ flags\fP)
|
25992
|
+
.UNINDENT
|
25993
|
+
.SS \fBgrn_geo\fP
|
25994
|
+
.SS 概要
|
25995
|
+
.sp
|
25996
|
+
TODO...
|
25997
|
+
.SS 実行例:
|
25998
|
+
.sp
|
25999
|
+
TODO...
|
26000
|
+
.SS リファレンス
|
26001
|
+
.INDENT 0.0
|
26002
|
+
.TP
|
26003
|
+
.B grn_geo_point
|
26004
|
+
.UNINDENT
|
26005
|
+
.INDENT 0.0
|
26006
|
+
.TP
|
26007
|
+
.B grn_rc grn_geo_select_in_rectangle(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *index\fP, grn_obj\fI\ *top_left_point\fP, grn_obj\fI\ *bottom_right_point\fP, grn_obj\fI\ *res\fP, grn_operator\fI\ op\fP)
|
26008
|
+
It selects records that are in the rectangle specified by top_left_point parameter and bottom_right_point parameter. Records are searched by index parameter. Found records are added to res parameter table with op parameter operation.
|
26009
|
+
.INDENT 7.0
|
26010
|
+
.TP
|
26011
|
+
.B パラメタ
|
26012
|
+
.INDENT 7.0
|
26013
|
+
.IP \(bu 2
|
26014
|
+
\fBindex\fP \-\- the index column for TokyoGeoPoint or WGS84GeoPpoint type.
|
26015
|
+
.IP \(bu 2
|
26016
|
+
\fBtop_left_point\fP \-\- the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26017
|
+
.IP \(bu 2
|
26018
|
+
\fBbottom_right_point\fP \-\- the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26019
|
+
.IP \(bu 2
|
26020
|
+
\fBres\fP \-\- the table to store found record IDs. It must be \fBGRN_TABLE_HASH_KEY\fP type table.
|
26021
|
+
.IP \(bu 2
|
26022
|
+
\fBop\fP \-\- the operator for matched records.
|
26023
|
+
.UNINDENT
|
26024
|
+
.UNINDENT
|
26025
|
+
.UNINDENT
|
26026
|
+
.INDENT 0.0
|
26027
|
+
.TP
|
26028
|
+
.B int grn_geo_estimate_in_rectangle(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *index\fP, grn_obj\fI\ *top_left_point\fP, grn_obj\fI\ *bottom_right_point\fP)
|
26029
|
+
It estimates number of records in the rectangle specified by top_left_point parameter and bottom_right_point parameter. Number of records is estimated by index parameter. If an error is occurred, \-1 is returned.
|
26030
|
+
.INDENT 7.0
|
26031
|
+
.TP
|
26032
|
+
.B パラメタ
|
26033
|
+
.INDENT 7.0
|
26034
|
+
.IP \(bu 2
|
26035
|
+
\fBindex\fP \-\- the index column for TokyoGeoPoint or WGS84GeoPpoint type.
|
26036
|
+
.IP \(bu 2
|
26037
|
+
\fBtop_left_point\fP \-\- the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26038
|
+
.IP \(bu 2
|
26039
|
+
\fBbottom_right_point\fP \-\- the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26040
|
+
.UNINDENT
|
26041
|
+
.UNINDENT
|
26042
|
+
.UNINDENT
|
26043
|
+
.INDENT 0.0
|
26044
|
+
.TP
|
26045
|
+
.B grn_obj *grn_geo_cursor_open_in_rectangle(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *index\fP, grn_obj\fI\ *top_left_point\fP, grn_obj\fI\ *bottom_right_point\fP, int\fI\ offset\fP, int\fI\ limit\fP)
|
26046
|
+
It opens a cursor to get records in the rectangle specfied by top_left_point parameter and bottom_right_point parameter.
|
26047
|
+
.INDENT 7.0
|
26048
|
+
.TP
|
26049
|
+
.B パラメタ
|
26050
|
+
.INDENT 7.0
|
26051
|
+
.IP \(bu 2
|
26052
|
+
\fBindex\fP \-\- the index column for TokyoGeoPoint or WGS84GeoPpoint type.
|
26053
|
+
.IP \(bu 2
|
26054
|
+
\fBtop_left_point\fP \-\- the top left point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26055
|
+
.IP \(bu 2
|
26056
|
+
\fBbottom_right_point\fP \-\- the bottom right point of the target rectangle. (ShortText, Text, LongText, TokyoGeoPoint or WGS84GeoPoint)
|
26057
|
+
.IP \(bu 2
|
26058
|
+
\fBoffset\fP \-\- the cursor returns records from offset parameter position. offset parameter is based on 0.
|
26059
|
+
.IP \(bu 2
|
26060
|
+
\fBlimit\fP \-\- the cursor returns at most limit parameter records. \-1 means no limit.
|
26061
|
+
.UNINDENT
|
26062
|
+
.UNINDENT
|
26063
|
+
.UNINDENT
|
26064
|
+
.INDENT 0.0
|
26065
|
+
.TP
|
26066
|
+
.B grn_posting *grn_geo_cursor_next(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *cursor\fP)
|
26067
|
+
It returns the next posting that has record ID. It returns NULL after all records are returned.
|
26068
|
+
.INDENT 7.0
|
26069
|
+
.TP
|
26070
|
+
.B パラメタ
|
26071
|
+
.INDENT 7.0
|
26072
|
+
.IP \(bu 2
|
26073
|
+
\fBcursor\fP \-\- the geo cursor.
|
26074
|
+
.UNINDENT
|
26075
|
+
.UNINDENT
|
26076
|
+
.UNINDENT
|
26077
|
+
.SS \fBgrn_hook\fP
|
26078
|
+
.SS 概要
|
26079
|
+
.sp
|
26080
|
+
TODO...
|
26081
|
+
.SS 実行例:
|
26082
|
+
.sp
|
26083
|
+
TODO...
|
26084
|
+
.SS リファレンス
|
26085
|
+
.INDENT 0.0
|
26086
|
+
.TP
|
26087
|
+
.B grn_hook_entry
|
26088
|
+
TODO...
|
26089
|
+
.UNINDENT
|
26090
|
+
.INDENT 0.0
|
26091
|
+
.TP
|
26092
|
+
.B grn_rc grn_obj_add_hook(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_hook_entry\fI\ entry\fP, int\fI\ offset\fP, grn_obj\fI\ *proc\fP, grn_obj\fI\ *data\fP)
|
26093
|
+
objに対してhookを追加します。
|
26094
|
+
.INDENT 7.0
|
26095
|
+
.TP
|
26096
|
+
.B パラメタ
|
26097
|
+
.INDENT 7.0
|
26098
|
+
.IP \(bu 2
|
26099
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26100
|
+
.IP \(bu 2
|
26101
|
+
\fBentry\fP \-\-
|
26102
|
+
.sp
|
26103
|
+
\fBGRN_HOOK_GET\fP は、objectの参照時に呼び出されるhookを定義します。
|
26104
|
+
.sp
|
26105
|
+
\fBGRN_HOOK_SET\fP は、objectの更新時に呼び出されるhookを定義します。
|
26106
|
+
.sp
|
26107
|
+
\fBGRN_HOOK_SELECT\fP は、検索処理の実行中に適時呼び出され、処理の実行状況を調べたり、実行の中断を指示することができます。
|
26108
|
+
|
26109
|
+
.IP \(bu 2
|
26110
|
+
\fBoffset\fP \-\-
|
26111
|
+
.sp
|
26112
|
+
hookの実行順位。offsetに対応するhookの直前に新たなhookを挿入します。
|
26113
|
+
.sp
|
26114
|
+
0を指定した場合は先頭に挿入されます。\-1を指定した場合は末尾に挿入されます。
|
26115
|
+
.sp
|
26116
|
+
objectに複数のhookが定義されている場合は順位の順に呼び出されます。
|
26117
|
+
|
26118
|
+
.IP \(bu 2
|
26119
|
+
\fBproc\fP \-\- 手続きを指定します。
|
26120
|
+
.IP \(bu 2
|
26121
|
+
\fBdata\fP \-\- hook固有情報を指定します。
|
26122
|
+
.UNINDENT
|
26123
|
+
.UNINDENT
|
26124
|
+
.UNINDENT
|
26125
|
+
.INDENT 0.0
|
26126
|
+
.TP
|
26127
|
+
.B int grn_obj_get_nhooks(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_hook_entry\fI\ entry\fP)
|
26128
|
+
objに定義されているhookの数を返します。
|
26129
|
+
.INDENT 7.0
|
26130
|
+
.TP
|
26131
|
+
.B パラメタ
|
26132
|
+
.INDENT 7.0
|
26133
|
+
.IP \(bu 2
|
26134
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26135
|
+
.IP \(bu 2
|
26136
|
+
\fBentry\fP \-\- hookタイプを指定します。
|
26137
|
+
.UNINDENT
|
26138
|
+
.UNINDENT
|
26139
|
+
.UNINDENT
|
26140
|
+
.INDENT 0.0
|
26141
|
+
.TP
|
26142
|
+
.B grn_obj *grn_obj_get_hook(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_hook_entry\fI\ entry\fP, int\fI\ offset\fP, grn_obj\fI\ *data\fP)
|
26143
|
+
objに定義されているhookの手続き(proc)を返します。hook固有情報が定義されている場合は、その内容をdataにコピーして返します。
|
26144
|
+
.INDENT 7.0
|
26145
|
+
.TP
|
26146
|
+
.B パラメタ
|
26147
|
+
.INDENT 7.0
|
26148
|
+
.IP \(bu 2
|
26149
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26150
|
+
.IP \(bu 2
|
26151
|
+
\fBentry\fP \-\- hookタイプを指定します。
|
26152
|
+
.IP \(bu 2
|
26153
|
+
\fBoffset\fP \-\- 実行順位を指定します。
|
26154
|
+
.IP \(bu 2
|
26155
|
+
\fBdata\fP \-\- hook固有情報格納バッファを指定します。
|
26156
|
+
.UNINDENT
|
26157
|
+
.UNINDENT
|
26158
|
+
.UNINDENT
|
26159
|
+
.INDENT 0.0
|
26160
|
+
.TP
|
26161
|
+
.B grn_rc grn_obj_delete_hook(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_hook_entry\fI\ entry\fP, int\fI\ offset\fP)
|
26162
|
+
objに定義されているhookを削除します。
|
26163
|
+
.INDENT 7.0
|
26164
|
+
.TP
|
26165
|
+
.B パラメタ
|
26166
|
+
.INDENT 7.0
|
26167
|
+
.IP \(bu 2
|
26168
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26169
|
+
.IP \(bu 2
|
26170
|
+
\fBentry\fP \-\- hookタイプを指定します。
|
26171
|
+
.IP \(bu 2
|
26172
|
+
\fBoffset\fP \-\- 実行順位を指定します。
|
26173
|
+
.UNINDENT
|
26174
|
+
.UNINDENT
|
26175
|
+
.UNINDENT
|
26176
|
+
.SS \fBgrn_ii\fP
|
26177
|
+
.SS 概要
|
26178
|
+
.sp
|
26179
|
+
buffered index builder
|
26180
|
+
.sp
|
26181
|
+
特定のアプリケーション用に準備した内部APIです。
|
26182
|
+
.sp
|
26183
|
+
TODO...
|
26184
|
+
.SS 実行例:
|
26185
|
+
.sp
|
26186
|
+
TODO...
|
26187
|
+
.SS リファレンス
|
26188
|
+
.INDENT 0.0
|
26189
|
+
.TP
|
26190
|
+
.B grn_ii
|
26191
|
+
.UNINDENT
|
26192
|
+
.INDENT 0.0
|
26193
|
+
.TP
|
26194
|
+
.B grn_ii_buffer
|
26195
|
+
.UNINDENT
|
26196
|
+
.INDENT 0.0
|
26197
|
+
.TP
|
26198
|
+
.B grn_ii_buffer *grn_ii_buffer_open(grn_ctx\fI\ *ctx\fP, grn_ii\fI\ *ii\fP, long long unsigned int\fI\ update_buffer_size\fP)
|
26199
|
+
.UNINDENT
|
26200
|
+
.INDENT 0.0
|
26201
|
+
.TP
|
26202
|
+
.B grn_rc grn_ii_buffer_append(grn_ctx\fI\ *ctx\fP, grn_ii_buffer\fI\ *ii_buffer\fP, grn_id\fI\ rid\fP, unsigned int\fI\ section\fP, grn_obj\fI\ *value\fP)
|
26203
|
+
.UNINDENT
|
26204
|
+
.INDENT 0.0
|
26205
|
+
.TP
|
26206
|
+
.B grn_rc grn_ii_buffer_commit(grn_ctx\fI\ *ctx\fP, grn_ii_buffer\fI\ *ii_buffer\fP)
|
26207
|
+
.UNINDENT
|
26208
|
+
.INDENT 0.0
|
26209
|
+
.TP
|
26210
|
+
.B grn_rc grn_ii_buffer_close(grn_ctx\fI\ *ctx\fP, grn_ii_buffer\fI\ *ii_buffer\fP)
|
26211
|
+
.UNINDENT
|
26212
|
+
.SS \fBgrn_index_cursor\fP
|
26213
|
+
.SS 概要
|
26214
|
+
.sp
|
26215
|
+
TODO...
|
26216
|
+
.SS 実行例:
|
26217
|
+
.sp
|
26218
|
+
TODO...
|
26219
|
+
.SS リファレンス
|
26220
|
+
.INDENT 0.0
|
26221
|
+
.TP
|
26222
|
+
.B grn_obj *grn_index_cursor_open(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP, grn_obj\fI\ *index\fP, grn_id\fI\ rid_min\fP, grn_id\fI\ rid_max\fP, int\fI\ flags\fP)
|
26223
|
+
\fBgrn_table_cursor\fP から取得できるそれぞれのレコードについて、 \fBGRN_OBJ_COLUMN_INDEX\fP 型のカラムの値を順番に取り出すためのカーソルを生成して返します。
|
26224
|
+
.sp
|
26225
|
+
rid_min, rid_maxを指定して取得するレコードidの値を制限することができます。
|
26226
|
+
.sp
|
26227
|
+
戻り値であるgrn_index_cursorは \fBgrn_obj_close()\fP を使って解放します。
|
26228
|
+
.INDENT 7.0
|
26229
|
+
.TP
|
26230
|
+
.B パラメタ
|
26231
|
+
.INDENT 7.0
|
26232
|
+
.IP \(bu 2
|
26233
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
26234
|
+
.IP \(bu 2
|
26235
|
+
\fBindex\fP \-\- 対象インデックスカラムを指定します。
|
26236
|
+
.IP \(bu 2
|
26237
|
+
\fBrid_min\fP \-\- 出力するレコードidの下限を指定します。
|
26238
|
+
.IP \(bu 2
|
26239
|
+
\fBrid_max\fP \-\- 出力するレコードidの上限を指定します。
|
26240
|
+
.UNINDENT
|
26241
|
+
.UNINDENT
|
26242
|
+
.UNINDENT
|
26243
|
+
.INDENT 0.0
|
26244
|
+
.TP
|
26245
|
+
.B grn_posting *grn_index_cursor_next(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *ic\fP, grn_id\fI\ *tid\fP)
|
26246
|
+
cursorの範囲内のインデックスの値を順番に取り出します。
|
26247
|
+
.sp
|
26248
|
+
tidにNULL以外を指定した場合は、index_cursorを作成するときに指定したtable_cursorの現在の対象レコードのidを返します。
|
26249
|
+
.sp
|
26250
|
+
戻り値である \fBgrn_posting\fP 構造体は解放する必要はありません。
|
26251
|
+
.INDENT 7.0
|
26252
|
+
.TP
|
26253
|
+
.B パラメタ
|
26254
|
+
.INDENT 7.0
|
26255
|
+
.IP \(bu 2
|
26256
|
+
\fBic\fP \-\- 対象cursorを指定します。
|
26257
|
+
.IP \(bu 2
|
26258
|
+
\fBtid\fP \-\- テーブルレコードIDを指定します。
|
26259
|
+
.UNINDENT
|
26260
|
+
.UNINDENT
|
26261
|
+
.UNINDENT
|
26262
|
+
.SS \fBgrn_info\fP
|
26263
|
+
.SS 概要
|
26264
|
+
.sp
|
26265
|
+
TODO...
|
26266
|
+
.SS 実行例:
|
26267
|
+
.sp
|
26268
|
+
TODO...
|
26269
|
+
.SS リファレンス
|
26270
|
+
.INDENT 0.0
|
26271
|
+
.TP
|
26272
|
+
.B grn_info_type
|
26273
|
+
TODO...
|
26274
|
+
.UNINDENT
|
26275
|
+
.INDENT 0.0
|
26276
|
+
.TP
|
26277
|
+
.B grn_obj *grn_obj_get_info(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_info_type\fI\ type\fP, grn_obj\fI\ *valuebuf\fP)
|
26278
|
+
objのtypeに対応する情報をvaluebufに格納します。
|
26279
|
+
.INDENT 7.0
|
26280
|
+
.TP
|
26281
|
+
.B パラメタ
|
26282
|
+
.INDENT 7.0
|
26283
|
+
.IP \(bu 2
|
26284
|
+
\fBobj\fP \-\- 対象objを指定します。
|
26285
|
+
.IP \(bu 2
|
26286
|
+
\fBtype\fP \-\- 取得する情報の種類を指定します。
|
26287
|
+
.IP \(bu 2
|
26288
|
+
\fBvaluebuf\fP \-\- 値を格納するバッファ(呼出側で準備)を指定します。
|
26289
|
+
.UNINDENT
|
26290
|
+
.UNINDENT
|
26291
|
+
.UNINDENT
|
26292
|
+
.INDENT 0.0
|
26293
|
+
.TP
|
26294
|
+
.B grn_rc grn_obj_set_info(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_info_type\fI\ type\fP, grn_obj\fI\ *value\fP)
|
26295
|
+
objのtypeに対応する情報をvalueの内容に更新します。
|
26296
|
+
.INDENT 7.0
|
26297
|
+
.TP
|
26298
|
+
.B パラメタ
|
26299
|
+
.INDENT 7.0
|
26300
|
+
.IP \(bu 2
|
26301
|
+
\fBobj\fP \-\- 対象objを指定します。
|
26302
|
+
.IP \(bu 2
|
26303
|
+
\fBtype\fP \-\- 設定する情報の種類を指定します。
|
26304
|
+
.UNINDENT
|
26305
|
+
.UNINDENT
|
26306
|
+
.UNINDENT
|
26307
|
+
.INDENT 0.0
|
26308
|
+
.TP
|
26309
|
+
.B grn_obj *grn_obj_get_element_info(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP, grn_info_type\fI\ type\fP, grn_obj\fI\ *value\fP)
|
26310
|
+
objのidに対応するレコードの、typeに対応する情報をvaluebufに格納します。呼出側ではtypeに応じて十分なサイズのバッファを確保しなければいけません。
|
26311
|
+
.INDENT 7.0
|
26312
|
+
.TP
|
26313
|
+
.B パラメタ
|
26314
|
+
.INDENT 7.0
|
26315
|
+
.IP \(bu 2
|
26316
|
+
\fBobj\fP \-\- 対象objを指定します。
|
26317
|
+
.IP \(bu 2
|
26318
|
+
\fBid\fP \-\- 対象IDを指定します。
|
26319
|
+
.IP \(bu 2
|
26320
|
+
\fBtype\fP \-\- 取得する情報の種類を指定します。
|
26321
|
+
.IP \(bu 2
|
26322
|
+
\fBvalue\fP \-\- 値を格納するバッファ(呼出側で準備)を指定します。
|
26323
|
+
.UNINDENT
|
26324
|
+
.UNINDENT
|
26325
|
+
.UNINDENT
|
26326
|
+
.INDENT 0.0
|
26327
|
+
.TP
|
26328
|
+
.B grn_rc grn_obj_set_element_info(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP, grn_info_type\fI\ type\fP, grn_obj\fI\ *value\fP)
|
26329
|
+
objのidに対応するレコードのtypeに対応する情報をvalueの内容に更新します。
|
26330
|
+
.INDENT 7.0
|
26331
|
+
.TP
|
26332
|
+
.B パラメタ
|
26333
|
+
.INDENT 7.0
|
26334
|
+
.IP \(bu 2
|
26335
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26336
|
+
.IP \(bu 2
|
26337
|
+
\fBid\fP \-\- 対象IDを指定します。
|
26338
|
+
.IP \(bu 2
|
26339
|
+
\fBtype\fP \-\- 設定する情報の種類を指定します。
|
26340
|
+
.IP \(bu 2
|
26341
|
+
\fBvalue\fP \-\- 設定しようとする値を指定します。
|
26342
|
+
.UNINDENT
|
26343
|
+
.UNINDENT
|
26344
|
+
.UNINDENT
|
26345
|
+
.SS \fBgrn_match_escalation\fP
|
26346
|
+
.SS 概要
|
26347
|
+
.sp
|
26348
|
+
TODO...
|
26349
|
+
.SS 実行例:
|
26350
|
+
.sp
|
26351
|
+
TODO...
|
26352
|
+
.SS リファレンス
|
26353
|
+
.INDENT 0.0
|
26354
|
+
.TP
|
26355
|
+
.B long long int grn_ctx_get_match_escalation_threshold(grn_ctx\fI\ *ctx\fP)
|
26356
|
+
検索の挙動をエスカレーションする閾値を返します。エスカレーションの詳細は検索の仕様に関するドキュメントを参照してください。
|
26357
|
+
.UNINDENT
|
26358
|
+
.INDENT 0.0
|
26359
|
+
.TP
|
26360
|
+
.B grn_rc grn_ctx_set_match_escalation_threshold(grn_ctx\fI\ *ctx\fP, long long int\fI\ threshold\fP)
|
26361
|
+
検索の挙動をエスカレーションする閾値を変更します。エスカレーションの詳細は検索の仕様に関するドキュメントを参照してください。
|
26362
|
+
.INDENT 7.0
|
26363
|
+
.TP
|
26364
|
+
.B パラメタ
|
26365
|
+
.INDENT 7.0
|
26366
|
+
.IP \(bu 2
|
26367
|
+
\fBthreshold\fP \-\- 変更後の検索の挙動をエスカレーションする閾値を指定します。
|
26368
|
+
.UNINDENT
|
26369
|
+
.UNINDENT
|
26370
|
+
.UNINDENT
|
26371
|
+
.INDENT 0.0
|
26372
|
+
.TP
|
26373
|
+
.B long long int grn_get_default_match_escalation_threshold(void)
|
26374
|
+
デフォルトの検索の挙動をエスカレーションする閾値を返します。エスカレーションの詳細は検索の仕様に関するドキュメントを参照してください。
|
26375
|
+
.UNINDENT
|
26376
|
+
.INDENT 0.0
|
26377
|
+
.TP
|
26378
|
+
.B grn_rc grn_set_default_match_escalation_threshold(long long int\fI\ threshold\fP)
|
26379
|
+
デフォルトの検索の挙動をエスカレーションする閾値を変更します。エスカレーションの詳細は詳細は検索の仕様に関するドキュメントを参照してください。
|
26380
|
+
.INDENT 7.0
|
26381
|
+
.TP
|
26382
|
+
.B パラメタ
|
26383
|
+
.INDENT 7.0
|
26384
|
+
.IP \(bu 2
|
26385
|
+
\fBthreshold\fP \-\- 変更後のデフォルトの検索の挙動をエスカレーションする閾値を指定します。
|
26386
|
+
.UNINDENT
|
26387
|
+
.UNINDENT
|
26388
|
+
.UNINDENT
|
26389
|
+
.SS \fBgrn_obj\fP
|
26390
|
+
.SS 概要
|
26391
|
+
.sp
|
26392
|
+
TODO...
|
26393
|
+
.SS 実行例:
|
26394
|
+
.sp
|
26395
|
+
TODO...
|
26396
|
+
.SS リファレンス
|
26397
|
+
.INDENT 0.0
|
26398
|
+
.TP
|
26399
|
+
.B grn_obj
|
26400
|
+
TODO...
|
26401
|
+
.UNINDENT
|
26402
|
+
.INDENT 0.0
|
26403
|
+
.TP
|
26404
|
+
.B grn_obj *grn_obj_column(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
26405
|
+
nameがカラム名の場合、それに対応するtableのカラムを返します。対応するカラムが存在しなければNULLを返します。
|
26406
|
+
.sp
|
26407
|
+
nameはアクセサ文字列の場合、それに対応するaccessorを返します。アクセサ文字列とは、カラム名等を\(aq.\(aqで連結した文字列です。\(aq_id\(aq, \(aq_key\(aqは特殊なアクセサで、それぞれレコードID/keyを返します。例) \(aqcol1\(aq / \(aqcol2.col3\(aq / \(aqcol2._id\(aq
|
26408
|
+
.INDENT 7.0
|
26409
|
+
.TP
|
26410
|
+
.B パラメタ
|
26411
|
+
.INDENT 7.0
|
26412
|
+
.IP \(bu 2
|
26413
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
26414
|
+
.IP \(bu 2
|
26415
|
+
\fBname\fP \-\- カラム名を指定します。
|
26416
|
+
.UNINDENT
|
26417
|
+
.UNINDENT
|
26418
|
+
.UNINDENT
|
26419
|
+
.INDENT 0.0
|
26420
|
+
.TP
|
26421
|
+
.B grn_bool grn_obj_is_builtin(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26422
|
+
Check whether groonga built\-in object.
|
26423
|
+
.INDENT 7.0
|
26424
|
+
.TP
|
26425
|
+
.B パラメタ
|
26426
|
+
.INDENT 7.0
|
26427
|
+
.IP \(bu 2
|
26428
|
+
\fBctx\fP \-\- context
|
26429
|
+
.IP \(bu 2
|
26430
|
+
\fBobj\fP \-\- target object
|
26431
|
+
.UNINDENT
|
26432
|
+
.TP
|
26433
|
+
.B 戻り値
|
26434
|
+
\fBGRN_TRUE\fP for built\-in groonga object, \fBGRN_FALSE\fP otherwise.
|
26435
|
+
.UNINDENT
|
26436
|
+
.UNINDENT
|
26437
|
+
.INDENT 0.0
|
26438
|
+
.TP
|
26439
|
+
.B grn_obj *grn_obj_get_value(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP, grn_obj\fI\ *value\fP)
|
26440
|
+
objのIDに対応するレコードのvalueを取得します。valueを戻り値として返します。
|
26441
|
+
.INDENT 7.0
|
26442
|
+
.TP
|
26443
|
+
.B パラメタ
|
26444
|
+
.INDENT 7.0
|
26445
|
+
.IP \(bu 2
|
26446
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26447
|
+
.IP \(bu 2
|
26448
|
+
\fBid\fP \-\- 対象レコードのIDを指定します。
|
26449
|
+
.IP \(bu 2
|
26450
|
+
\fBvalue\fP \-\- 値を格納するバッファ(呼出側で準備する)を指定します。
|
26451
|
+
.UNINDENT
|
26452
|
+
.UNINDENT
|
26453
|
+
.UNINDENT
|
26454
|
+
.INDENT 0.0
|
26455
|
+
.TP
|
26456
|
+
.B int grn_obj_get_values(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ offset\fP, void\fI\ **values\fP)
|
26457
|
+
objに指定されたカラムについて、offsetに指定されたレコードIDを開始位置として、IDが連続するレコードに対応するカラム値が昇順に格納された配列へのポインタをvaluesにセットします。
|
26458
|
+
.sp
|
26459
|
+
取得できた件数が戻り値として返されます。エラーが発生した場合は \-1 が返されます。
|
26460
|
+
.sp
|
26461
|
+
\fBノート:\fP
|
26462
|
+
.INDENT 7.0
|
26463
|
+
.INDENT 3.5
|
26464
|
+
値が固定長であるカラムのみがobjに指定できます。範囲内のIDに対応するレコードが有効であるとは限りません。delete操作を実行したことのあるテーブルに対しては、\fBgrn_table_at()\fP などによって各レコードの存否を別途確認しなければなりません。
|
26465
|
+
.UNINDENT
|
26466
|
+
.UNINDENT
|
26467
|
+
.INDENT 7.0
|
26468
|
+
.TP
|
26469
|
+
.B パラメタ
|
26470
|
+
.INDENT 7.0
|
26471
|
+
.IP \(bu 2
|
26472
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26473
|
+
.IP \(bu 2
|
26474
|
+
\fBoffset\fP \-\- 値を取得する範囲の開始位置となるレコードIDを指定します。
|
26475
|
+
.IP \(bu 2
|
26476
|
+
\fBvalues\fP \-\- 値の配列がセットされます。
|
26477
|
+
.UNINDENT
|
26478
|
+
.UNINDENT
|
26479
|
+
.UNINDENT
|
26480
|
+
.INDENT 0.0
|
26481
|
+
.TP
|
26482
|
+
.B grn_rc grn_obj_set_value(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP, grn_obj\fI\ *value\fP, int\fI\ flags\fP)
|
26483
|
+
objのIDに対応するレコードの値を更新します。対応するレコードが存在しない場合は \fBGRN_INVALID_ARGUMENT\fP を返します。
|
26484
|
+
.INDENT 7.0
|
26485
|
+
.TP
|
26486
|
+
.B パラメタ
|
26487
|
+
.INDENT 7.0
|
26488
|
+
.IP \(bu 2
|
26489
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26490
|
+
.IP \(bu 2
|
26491
|
+
\fBid\fP \-\- 対象レコードのIDを指定します。
|
26492
|
+
.IP \(bu 2
|
26493
|
+
\fBvalue\fP \-\- 格納する値を指定します。
|
26494
|
+
.IP \(bu 2
|
26495
|
+
\fBflags\fP \-\-
|
26496
|
+
.sp
|
26497
|
+
以下の値を指定できます。
|
26498
|
+
.INDENT 2.0
|
26499
|
+
.INDENT 2.0
|
26500
|
+
.IP \(bu 2
|
26501
|
+
\fBGRN_OBJ_SET\fP
|
26502
|
+
.IP \(bu 2
|
26503
|
+
\fBGRN_OBJ_INCR\fP
|
26504
|
+
.IP \(bu 2
|
26505
|
+
\fBGRN_OBJ_DECR\fP
|
26506
|
+
.UNINDENT
|
26507
|
+
.INDENT 2.0
|
26508
|
+
.IP \(bu 2
|
26509
|
+
\fBGRN_OBJ_APPEND\fP
|
26510
|
+
.IP \(bu 2
|
26511
|
+
\fBGRN_OBJ_PREPEND\fP
|
26512
|
+
.IP \(bu 2
|
26513
|
+
\fBGRN_OBJ_GET\fP
|
26514
|
+
.UNINDENT
|
26515
|
+
.INDENT 2.0
|
26516
|
+
.IP \(bu 2
|
26517
|
+
\fBGRN_OBJ_COMPARE\fP
|
26518
|
+
.IP \(bu 2
|
26519
|
+
\fBGRN_OBJ_LOCK\fP
|
26520
|
+
.IP \(bu 2
|
26521
|
+
\fBGRN_OBJ_UNLOCK\fP
|
26522
|
+
.UNINDENT
|
26523
|
+
.UNINDENT
|
26524
|
+
|
26525
|
+
.UNINDENT
|
26526
|
+
.UNINDENT
|
26527
|
+
.UNINDENT
|
26528
|
+
.INDENT 0.0
|
26529
|
+
.TP
|
26530
|
+
.B GRN_OBJ_SET_MASK
|
26531
|
+
.UNINDENT
|
26532
|
+
.INDENT 0.0
|
26533
|
+
.TP
|
26534
|
+
.B GRN_OBJ_SET
|
26535
|
+
レコードの値をvalueと置き換えます。
|
26536
|
+
.UNINDENT
|
26537
|
+
.INDENT 0.0
|
26538
|
+
.TP
|
26539
|
+
.B GRN_OBJ_INCR
|
26540
|
+
レコードの値にvalueを加算します。
|
26541
|
+
.UNINDENT
|
26542
|
+
.INDENT 0.0
|
26543
|
+
.TP
|
26544
|
+
.B GRN_OBJ_DECR
|
26545
|
+
レコードの値にvalueを減算します。
|
26546
|
+
.UNINDENT
|
26547
|
+
.INDENT 0.0
|
26548
|
+
.TP
|
26549
|
+
.B GRN_OBJ_APPEND
|
26550
|
+
レコードの値の末尾にvalueを追加します。
|
26551
|
+
.UNINDENT
|
26552
|
+
.INDENT 0.0
|
26553
|
+
.TP
|
26554
|
+
.B GRN_OBJ_PREPEND
|
26555
|
+
レコードの値の先頭にvalueを追加します。
|
26556
|
+
.UNINDENT
|
26557
|
+
.INDENT 0.0
|
26558
|
+
.TP
|
26559
|
+
.B GRN_OBJ_GET
|
26560
|
+
新しいレコードの値をvalueにセットします。
|
26561
|
+
.UNINDENT
|
26562
|
+
.INDENT 0.0
|
26563
|
+
.TP
|
26564
|
+
.B GRN_OBJ_COMPARE
|
26565
|
+
レコードの値とvalueが等しいか調べます。
|
26566
|
+
.UNINDENT
|
26567
|
+
.INDENT 0.0
|
26568
|
+
.TP
|
26569
|
+
.B GRN_OBJ_LOCK
|
26570
|
+
当該レコードをロックします。\fBGRN_OBJ_COMPARE\fP と共に指定された場合は、レコードの値とvalueが等しい場合に限ってロックします。
|
26571
|
+
.UNINDENT
|
26572
|
+
.INDENT 0.0
|
26573
|
+
.TP
|
26574
|
+
.B GRN_OBJ_UNLOCK
|
26575
|
+
当該レコードのロックを解除します。
|
26576
|
+
.UNINDENT
|
26577
|
+
.INDENT 0.0
|
26578
|
+
.TP
|
26579
|
+
.B grn_rc grn_obj_remove(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26580
|
+
objをメモリから解放し、それが永続オブジェクトであった場合は、該当するファイル一式を削除します。
|
26581
|
+
.INDENT 7.0
|
26582
|
+
.TP
|
26583
|
+
.B パラメタ
|
26584
|
+
.INDENT 7.0
|
26585
|
+
.IP \(bu 2
|
26586
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26587
|
+
.UNINDENT
|
26588
|
+
.UNINDENT
|
26589
|
+
.UNINDENT
|
26590
|
+
.INDENT 0.0
|
26591
|
+
.TP
|
26592
|
+
.B grn_rc grn_obj_rename(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
26593
|
+
ctxが使用するdbにおいてobjに対応する名前をnameに更新します。objは永続オブジェクトでなければいけません。
|
26594
|
+
.INDENT 7.0
|
26595
|
+
.TP
|
26596
|
+
.B パラメタ
|
26597
|
+
.INDENT 7.0
|
26598
|
+
.IP \(bu 2
|
26599
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26600
|
+
.IP \(bu 2
|
26601
|
+
\fBname\fP \-\- 新しい名前を指定します。
|
26602
|
+
.IP \(bu 2
|
26603
|
+
\fBname_size\fP \-\- nameパラメータのsize(byte)を指定します。
|
26604
|
+
.UNINDENT
|
26605
|
+
.UNINDENT
|
26606
|
+
.UNINDENT
|
26607
|
+
.INDENT 0.0
|
26608
|
+
.TP
|
26609
|
+
.B grn_rc grn_obj_close(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26610
|
+
一時的なobjectであるobjをメモリから解放します。objに属するobjectも再帰的にメモリから解放されます。
|
26611
|
+
.sp
|
26612
|
+
永続的な、table, column, exprなどは解放してはいけません。一般的には、一時的か永続的かを気にしなくてよい \fBgrn_obj_unlink()\fP を用いるべきです。
|
26613
|
+
.INDENT 7.0
|
26614
|
+
.TP
|
26615
|
+
.B パラメタ
|
26616
|
+
.INDENT 7.0
|
26617
|
+
.IP \(bu 2
|
26618
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26619
|
+
.UNINDENT
|
26620
|
+
.UNINDENT
|
26621
|
+
.UNINDENT
|
26622
|
+
.INDENT 0.0
|
26623
|
+
.TP
|
26624
|
+
.B grn_rc grn_obj_reinit(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ domain\fP, unsigned char\fI\ flags\fP)
|
26625
|
+
objの型を変更します。
|
26626
|
+
.sp
|
26627
|
+
objは \fBGRN_OBJ_INIT()\fP マクロなどで初期化済みでなければいけません。
|
26628
|
+
.INDENT 7.0
|
26629
|
+
.TP
|
26630
|
+
.B パラメタ
|
26631
|
+
.INDENT 7.0
|
26632
|
+
.IP \(bu 2
|
26633
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26634
|
+
.IP \(bu 2
|
26635
|
+
\fBdomain\fP \-\- 変更後のobjの型を指定します。
|
26636
|
+
.IP \(bu 2
|
26637
|
+
\fBflags\fP \-\- \fBGRN_OBJ_VECTOR\fP を指定するとdomain型の値のベクタを格納するオブジェクトになります。
|
26638
|
+
.UNINDENT
|
26639
|
+
.UNINDENT
|
26640
|
+
.UNINDENT
|
26641
|
+
.INDENT 0.0
|
26642
|
+
.TP
|
26643
|
+
.B void grn_obj_unlink(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26644
|
+
objをメモリから解放します。objに属するobjectも再帰的にメモリから解放されます。
|
26645
|
+
.UNINDENT
|
26646
|
+
.INDENT 0.0
|
26647
|
+
.TP
|
26648
|
+
.B const char *grn_obj_path(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26649
|
+
objに対応するファイルパスを返します。一時objectならNULLを返します。
|
26650
|
+
.INDENT 7.0
|
26651
|
+
.TP
|
26652
|
+
.B パラメタ
|
26653
|
+
.INDENT 7.0
|
26654
|
+
.IP \(bu 2
|
26655
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26656
|
+
.UNINDENT
|
26657
|
+
.UNINDENT
|
26658
|
+
.UNINDENT
|
26659
|
+
.INDENT 0.0
|
26660
|
+
.TP
|
26661
|
+
.B int grn_obj_name(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, char\fI\ *namebuf\fP, int\fI\ buf_size\fP)
|
26662
|
+
objの名前の長さを返します。無名objectなら0を返します。
|
26663
|
+
.sp
|
26664
|
+
名前付きのobjectであり、buf_sizeの長さが名前の長以上であった場合は、namebufに該当する名前をコピーします。
|
26665
|
+
.INDENT 7.0
|
26666
|
+
.TP
|
26667
|
+
.B パラメタ
|
26668
|
+
.INDENT 7.0
|
26669
|
+
.IP \(bu 2
|
26670
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26671
|
+
.IP \(bu 2
|
26672
|
+
\fBnamebuf\fP \-\- 名前を格納するバッファ(呼出側で準備する)を指定します。
|
26673
|
+
.IP \(bu 2
|
26674
|
+
\fBbuf_size\fP \-\- namebufのサイズ(byte長)を指定します。
|
26675
|
+
.UNINDENT
|
26676
|
+
.UNINDENT
|
26677
|
+
.UNINDENT
|
26678
|
+
.INDENT 0.0
|
26679
|
+
.TP
|
26680
|
+
.B grn_id grn_obj_get_range(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26681
|
+
objパラメータのとる値の範囲を表わしているオブジェクトのIDを返します。例えば、\fBgrn_builtin_type\fP にある \fBGRN_DB_INT\fP などを返します。
|
26682
|
+
.INDENT 7.0
|
26683
|
+
.TP
|
26684
|
+
.B パラメタ
|
26685
|
+
.INDENT 7.0
|
26686
|
+
.IP \(bu 2
|
26687
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26688
|
+
.UNINDENT
|
26689
|
+
.UNINDENT
|
26690
|
+
.UNINDENT
|
26691
|
+
.INDENT 0.0
|
26692
|
+
.TP
|
26693
|
+
.B int grn_obj_expire(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, int\fI\ threshold\fP)
|
26694
|
+
objの占有するメモリのうち、可能な領域をthresholdを指標として解放します。
|
26695
|
+
.INDENT 7.0
|
26696
|
+
.TP
|
26697
|
+
.B パラメタ
|
26698
|
+
.INDENT 7.0
|
26699
|
+
.IP \(bu 2
|
26700
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26701
|
+
.UNINDENT
|
26702
|
+
.UNINDENT
|
26703
|
+
.UNINDENT
|
26704
|
+
.INDENT 0.0
|
26705
|
+
.TP
|
26706
|
+
.B int grn_obj_check(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26707
|
+
objに対応するファイルの整合性を検査します。
|
26708
|
+
.INDENT 7.0
|
26709
|
+
.TP
|
26710
|
+
.B パラメタ
|
26711
|
+
.INDENT 7.0
|
26712
|
+
.IP \(bu 2
|
26713
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26714
|
+
.UNINDENT
|
26715
|
+
.UNINDENT
|
26716
|
+
.UNINDENT
|
26717
|
+
.INDENT 0.0
|
26718
|
+
.TP
|
26719
|
+
.B grn_rc grn_obj_lock(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP, int\fI\ timeout\fP)
|
26720
|
+
objをlockします。timeout(秒)経過してもlockを取得できない場合は \fBGRN_RESOURCE_DEADLOCK_AVOIDED\fP を返します。
|
26721
|
+
.INDENT 7.0
|
26722
|
+
.TP
|
26723
|
+
.B パラメタ
|
26724
|
+
.INDENT 7.0
|
26725
|
+
.IP \(bu 2
|
26726
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26727
|
+
.UNINDENT
|
26728
|
+
.UNINDENT
|
26729
|
+
.UNINDENT
|
26730
|
+
.INDENT 0.0
|
26731
|
+
.TP
|
26732
|
+
.B grn_rc grn_obj_unlock(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_id\fI\ id\fP)
|
26733
|
+
objをunlockします。
|
26734
|
+
.INDENT 7.0
|
26735
|
+
.TP
|
26736
|
+
.B パラメタ
|
26737
|
+
.INDENT 7.0
|
26738
|
+
.IP \(bu 2
|
26739
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26740
|
+
.UNINDENT
|
26741
|
+
.UNINDENT
|
26742
|
+
.UNINDENT
|
26743
|
+
.INDENT 0.0
|
26744
|
+
.TP
|
26745
|
+
.B grn_rc grn_obj_clear_lock(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26746
|
+
強制的にロックをクリアします。
|
26747
|
+
.INDENT 7.0
|
26748
|
+
.TP
|
26749
|
+
.B パラメタ
|
26750
|
+
.INDENT 7.0
|
26751
|
+
.IP \(bu 2
|
26752
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26753
|
+
.UNINDENT
|
26754
|
+
.UNINDENT
|
26755
|
+
.UNINDENT
|
26756
|
+
.INDENT 0.0
|
26757
|
+
.TP
|
26758
|
+
.B unsigned int grn_obj_is_locked(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26759
|
+
objが現在lockされていれば0以外の値を返します。
|
26760
|
+
.INDENT 7.0
|
26761
|
+
.TP
|
26762
|
+
.B パラメタ
|
26763
|
+
.INDENT 7.0
|
26764
|
+
.IP \(bu 2
|
26765
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26766
|
+
.UNINDENT
|
26767
|
+
.UNINDENT
|
26768
|
+
.UNINDENT
|
26769
|
+
.INDENT 0.0
|
26770
|
+
.TP
|
26771
|
+
.B int grn_obj_defrag(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, int\fI\ threshold\fP)
|
26772
|
+
objの占有するDBファイル領域のうち、可能な領域をthresholdを指標としてフラグメントの解消を行います。
|
26773
|
+
.sp
|
26774
|
+
フラグメント解消が実行されたセグメントの数を返します。
|
26775
|
+
.INDENT 7.0
|
26776
|
+
.TP
|
26777
|
+
.B パラメタ
|
26778
|
+
.INDENT 7.0
|
26779
|
+
.IP \(bu 2
|
26780
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26781
|
+
.UNINDENT
|
26782
|
+
.UNINDENT
|
26783
|
+
.UNINDENT
|
26784
|
+
.INDENT 0.0
|
26785
|
+
.TP
|
26786
|
+
.B grn_id grn_obj_id(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
26787
|
+
objのidを返します。
|
26788
|
+
.INDENT 7.0
|
26789
|
+
.TP
|
26790
|
+
.B パラメタ
|
26791
|
+
.INDENT 7.0
|
26792
|
+
.IP \(bu 2
|
26793
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26794
|
+
.UNINDENT
|
26795
|
+
.UNINDENT
|
26796
|
+
.UNINDENT
|
26797
|
+
.INDENT 0.0
|
26798
|
+
.TP
|
26799
|
+
.B grn_rc grn_obj_delete_by_id(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *db\fP, grn_id\fI\ id\fP, grn_bool\fI\ removep\fP)
|
26800
|
+
dbからidに対応するテーブルやカラムなどを削除します。mroonga向けに用意した内部APIです。
|
26801
|
+
.INDENT 7.0
|
26802
|
+
.TP
|
26803
|
+
.B パラメタ
|
26804
|
+
.INDENT 7.0
|
26805
|
+
.IP \(bu 2
|
26806
|
+
\fBdb\fP \-\- The target database.
|
26807
|
+
.IP \(bu 2
|
26808
|
+
\fBid\fP \-\- The object (table, column and so on) ID to be deleted.
|
26809
|
+
.IP \(bu 2
|
26810
|
+
\fBremovep\fP \-\- If \fBGRN_TRUE\fP, clear object cache and remove relation between ID and key in database. Otherwise, just clear object cache.
|
26811
|
+
.UNINDENT
|
26812
|
+
.UNINDENT
|
26813
|
+
.UNINDENT
|
26814
|
+
.INDENT 0.0
|
26815
|
+
.TP
|
26816
|
+
.B grn_rc grn_obj_path_by_id(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *db\fP, grn_id\fI\ id\fP, char\fI\ *buffer\fP)
|
26817
|
+
dbのidに対応するpathを返します。mroonga向けに用意した内部APIです。
|
26818
|
+
.INDENT 7.0
|
26819
|
+
.TP
|
26820
|
+
.B パラメタ
|
26821
|
+
.INDENT 7.0
|
26822
|
+
.IP \(bu 2
|
26823
|
+
\fBdb\fP \-\- The target database.
|
26824
|
+
.IP \(bu 2
|
26825
|
+
\fBid\fP \-\- The object (table, column and so on) ID to be deleted.
|
26826
|
+
.IP \(bu 2
|
26827
|
+
\fBbuffer\fP \-\- path string corresponding to the id will be set in this buffer.
|
26828
|
+
.UNINDENT
|
26829
|
+
.UNINDENT
|
26830
|
+
.UNINDENT
|
26831
|
+
.SS \fBgrn_proc\fP
|
26832
|
+
.SS 概要
|
26833
|
+
.sp
|
26834
|
+
TODO...
|
26835
|
+
.SS 実行例:
|
26836
|
+
.sp
|
26837
|
+
TODO...
|
26838
|
+
.SS リファレンス
|
26839
|
+
.INDENT 0.0
|
26840
|
+
.TP
|
26841
|
+
.B grn_proc_type
|
26842
|
+
TODO...
|
26843
|
+
.UNINDENT
|
26844
|
+
.INDENT 0.0
|
26845
|
+
.TP
|
26846
|
+
.B grn_proc_func
|
26847
|
+
TODO...
|
26848
|
+
.UNINDENT
|
26849
|
+
.INDENT 0.0
|
26850
|
+
.TP
|
26851
|
+
.B grn_obj *grn_proc_create(grn_ctx\fI\ *ctx\fP, const char\fI\ *name\fP, int\fI\ name_size\fP, grn_proc_type\fI\ type\fP, grn_proc_func\fI\ *init\fP, grn_proc_func\fI\ *next\fP, grn_proc_func\fI\ *fin\fP, unsigned int\fI\ nvars\fP, grn_expr_var\fI\ *vars\fP)
|
26852
|
+
nameに対応する新たなproc(手続き)をctxが使用するdbに定義します。
|
26853
|
+
.INDENT 7.0
|
26854
|
+
.TP
|
26855
|
+
.B パラメタ
|
26856
|
+
.INDENT 7.0
|
26857
|
+
.IP \(bu 2
|
26858
|
+
\fBname\fP \-\- 作成するprocの名前を指定します。
|
26859
|
+
.IP \(bu 2
|
26860
|
+
\fBname_size\fP \-\- The number of bytes of name parameter. If negative value is specified, name parameter is assumed that NULL\-terminated string.
|
26861
|
+
.IP \(bu 2
|
26862
|
+
\fBtype\fP \-\- procの種類を指定します。
|
26863
|
+
.IP \(bu 2
|
26864
|
+
\fBinit\fP \-\- 初期化関数のポインタを指定します。
|
26865
|
+
.IP \(bu 2
|
26866
|
+
\fBnext\fP \-\- 実処理関数のポインタを指定します。
|
26867
|
+
.IP \(bu 2
|
26868
|
+
\fBfin\fP \-\- 終了関数のポインタを指定します。
|
26869
|
+
.IP \(bu 2
|
26870
|
+
\fBnvars\fP \-\- procで使用する変数の数を指定します。
|
26871
|
+
.IP \(bu 2
|
26872
|
+
\fBvars\fP \-\- procで使用する変数の定義を指定します。( \fBgrn_expr_var\fP 構造体の配列)
|
26873
|
+
.UNINDENT
|
26874
|
+
.UNINDENT
|
26875
|
+
.UNINDENT
|
26876
|
+
.INDENT 0.0
|
26877
|
+
.TP
|
26878
|
+
.B grn_obj *grn_proc_get_info(grn_ctx\fI\ *ctx\fP, grn_user_data\fI\ *user_data\fP, grn_expr_var\fI\ **vars\fP, unsigned int\fI\ *nvars\fP, grn_obj\fI\ **caller\fP)
|
26879
|
+
user_dataをキーとして、現在実行中の \fBgrn_proc_func\fP 関数および定義されている変数( \fBgrn_expr_var\fP )の配列とその数を取得します。
|
26880
|
+
.INDENT 7.0
|
26881
|
+
.TP
|
26882
|
+
.B パラメタ
|
26883
|
+
.INDENT 7.0
|
26884
|
+
.IP \(bu 2
|
26885
|
+
\fBuser_data\fP \-\- \fBgrn_proc_func\fP に渡されたuser_dataを指定します。
|
26886
|
+
.IP \(bu 2
|
26887
|
+
\fBnvars\fP \-\- 変数の数を取得します。
|
26888
|
+
.UNINDENT
|
26889
|
+
.UNINDENT
|
26890
|
+
.UNINDENT
|
26891
|
+
.INDENT 0.0
|
26892
|
+
.TP
|
26893
|
+
.B grn_rc grn_obj_set_finalizer(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_proc_func\fI\ *func\fP)
|
26894
|
+
objectを破棄するときに呼ばれる関数を設定します。
|
26895
|
+
.sp
|
26896
|
+
table, column, proc, exprのみ設定可能です。
|
26897
|
+
.INDENT 7.0
|
26898
|
+
.TP
|
26899
|
+
.B パラメタ
|
26900
|
+
.INDENT 7.0
|
26901
|
+
.IP \(bu 2
|
26902
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
26903
|
+
.IP \(bu 2
|
26904
|
+
\fBfunc\fP \-\- objectを破棄するときに呼ばれる関数を指定します。
|
26905
|
+
.UNINDENT
|
26906
|
+
.UNINDENT
|
26907
|
+
.UNINDENT
|
26908
|
+
.SS \fBgrn_search\fP
|
26909
|
+
.SS 概要
|
26910
|
+
.sp
|
26911
|
+
TODO...
|
26912
|
+
.SS 実行例:
|
26913
|
+
.sp
|
26914
|
+
TODO...
|
26915
|
+
.SS リファレンス
|
26916
|
+
.INDENT 0.0
|
26917
|
+
.TP
|
26918
|
+
.B grn_search_optarg
|
26919
|
+
.UNINDENT
|
26920
|
+
.INDENT 0.0
|
26921
|
+
.TP
|
26922
|
+
.B grn_rc grn_obj_search(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP, grn_obj\fI\ *query\fP, grn_obj\fI\ *res\fP, grn_operator\fI\ op\fP, grn_search_optarg\fI\ *optarg\fP)
|
26923
|
+
objを対象としてqueryにマッチするレコードを検索し、opの指定に従ってresにレコードを追加あるいは削除します。
|
26924
|
+
.INDENT 7.0
|
26925
|
+
.TP
|
26926
|
+
.B パラメタ
|
26927
|
+
.INDENT 7.0
|
26928
|
+
.IP \(bu 2
|
26929
|
+
\fBobj\fP \-\- 検索対象のobjectを指定します。
|
26930
|
+
.IP \(bu 2
|
26931
|
+
\fBquery\fP \-\- 検索クエリを指定します。
|
26932
|
+
.IP \(bu 2
|
26933
|
+
\fBres\fP \-\- 検索結果を格納するテーブルを指定します。
|
26934
|
+
.IP \(bu 2
|
26935
|
+
\fBop\fP \-\- \fBGRN_OP_OR\fP, \fBGRN_OP_AND\fP, \fBGRN_OP_AND_NOT\fP, \fBGRN_OP_ADJUST\fP のいずれかを指定します。
|
26936
|
+
.IP \(bu 2
|
26937
|
+
\fBoptarg\fP \-\- 詳細検索条件を指定します。
|
26938
|
+
.UNINDENT
|
26939
|
+
.UNINDENT
|
26940
|
+
.UNINDENT
|
26941
|
+
.SS \fBgrn_table\fP
|
26942
|
+
.SS 概要
|
26943
|
+
.sp
|
26944
|
+
TODO...
|
26945
|
+
.SS 実行例:
|
26946
|
+
.sp
|
26947
|
+
TODO...
|
26948
|
+
.SS リファレンス
|
26949
|
+
.INDENT 0.0
|
26950
|
+
.TP
|
26951
|
+
.B grn_obj *grn_table_create(grn_ctx\fI\ *ctx\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP, const char\fI\ *path\fP, grn_obj_flags\fI\ flags\fP, grn_obj\fI\ *key_type\fP, grn_obj\fI\ *value_type\fP)
|
26952
|
+
nameパラメータに対応する新たなtableをctxが使用するdbに定義します。
|
26953
|
+
.INDENT 7.0
|
26954
|
+
.TP
|
26955
|
+
.B パラメタ
|
26956
|
+
.INDENT 7.0
|
26957
|
+
.IP \(bu 2
|
26958
|
+
\fBname\fP \-\-
|
26959
|
+
.sp
|
26960
|
+
作成するtableの名前を指定します。NULLなら無名tableとなります。
|
26961
|
+
.sp
|
26962
|
+
persistent dbに対して名前をありのtableを作成するときには、flagsに \fBGRN_OBJ_PERSISTENT\fP が指定されていなけれなりません。
|
26963
|
+
|
26964
|
+
.IP \(bu 2
|
26965
|
+
\fBpath\fP \-\- 作成するtableのファイルパスを指定します。
|
26966
|
+
flagsに \fBGRN_OBJ_PERSISTENT\fP が指定されている場合のみ有効です。
|
26967
|
+
NULLなら自動的にファイルパスが付与されます。
|
26968
|
+
.IP \(bu 2
|
26969
|
+
\fBflags\fP \-\-
|
26970
|
+
.sp
|
26971
|
+
\fBGRN_OBJ_PERSISTENT\fP を指定すると永続tableとなります。
|
26972
|
+
.sp
|
26973
|
+
\fBGRN_OBJ_TABLE_PAT_KEY\fP, \fBGRN_OBJ_TABLE_HASH_KEY\fP, \fBGRN_OBJ_TABLE_NO_KEY\fP のいずれかを指定します。
|
26974
|
+
.sp
|
26975
|
+
\fBGRN_OBJ_KEY_NORMALIZE\fP を指定すると正規化された文字列がkeyとなります。
|
26976
|
+
.sp
|
26977
|
+
\fBGRN_OBJ_KEY_WITH_SIS\fP を指定するとkey文字列の全suffixが自動的に登録されます。
|
26978
|
+
|
26979
|
+
.IP \(bu 2
|
26980
|
+
\fBkey_type\fP \-\-
|
26981
|
+
.sp
|
26982
|
+
keyの型を指定します。\fBGRN_OBJ_TABLE_NO_KEY\fP が指定された場合は無効です。
|
26983
|
+
既存のtypeあるいはtableを指定できます。
|
26984
|
+
.sp
|
26985
|
+
key_typeにtable Aを指定してtable Bを作成した場合、Bは必ずAのサブセットとなります。
|
26986
|
+
|
26987
|
+
.IP \(bu 2
|
26988
|
+
\fBvalue_type\fP \-\- keyに対応する値を格納する領域の型を指定します。
|
26989
|
+
tableはcolumnとは別に、keyに対応する値を格納する領域を一つだけ持つことができます。
|
26990
|
+
.UNINDENT
|
26991
|
+
.UNINDENT
|
26992
|
+
.UNINDENT
|
26993
|
+
.INDENT 0.0
|
26994
|
+
.TP
|
26995
|
+
.B grn_id grn_table_add(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *key\fP, unsigned int\fI\ key_size\fP, int\fI\ *added\fP)
|
26996
|
+
keyに対応する新しいrecordをtableに追加し、そのIDを返します。keyに対応するrecordがすでにtableに存在するならば、そのrecordのIDを返します。
|
26997
|
+
.sp
|
26998
|
+
\fBGRN_OBJ_TABLE_NO_KEY\fP が指定されたtableでは、key, key_size は無視されます。
|
26999
|
+
.INDENT 7.0
|
27000
|
+
.TP
|
27001
|
+
.B パラメタ
|
27002
|
+
.INDENT 7.0
|
27003
|
+
.IP \(bu 2
|
27004
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27005
|
+
.IP \(bu 2
|
27006
|
+
\fBkey\fP \-\- 検索keyを指定します。
|
27007
|
+
.IP \(bu 2
|
27008
|
+
\fBadded\fP \-\- NULL以外の値が指定された場合、新たにrecordが追加された時には1が、既存recordだった時には0がセットされます。
|
27009
|
+
.UNINDENT
|
27010
|
+
.UNINDENT
|
27011
|
+
.UNINDENT
|
27012
|
+
.INDENT 0.0
|
27013
|
+
.TP
|
27014
|
+
.B grn_id grn_table_get(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *key\fP, unsigned int\fI\ key_size\fP)
|
27015
|
+
It finds a record that has key parameter and returns ID of the found record. If table parameter is a database, it finds an object (table, column and so on) that has key parameter and returns ID of the found object.
|
27016
|
+
.INDENT 7.0
|
27017
|
+
.TP
|
27018
|
+
.B パラメタ
|
27019
|
+
.INDENT 7.0
|
27020
|
+
.IP \(bu 2
|
27021
|
+
\fBtable\fP \-\- The table or database.
|
27022
|
+
.IP \(bu 2
|
27023
|
+
\fBkey\fP \-\- The record or object key to be found.
|
27024
|
+
.UNINDENT
|
27025
|
+
.UNINDENT
|
27026
|
+
.UNINDENT
|
27027
|
+
.INDENT 0.0
|
27028
|
+
.TP
|
27029
|
+
.B grn_id grn_table_at(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, grn_id\fI\ id\fP)
|
27030
|
+
tableにidに対応するrecordが存在するか確認し、存在すれば指定されたIDを、存在しなければ \fBGRN_ID_NIL\fP を返します。
|
27031
|
+
.sp
|
27032
|
+
注意: 実行には相応のコストがかかるのであまり頻繁に呼ばないようにして下さい。
|
27033
|
+
.INDENT 7.0
|
27034
|
+
.TP
|
27035
|
+
.B パラメタ
|
27036
|
+
.INDENT 7.0
|
27037
|
+
.IP \(bu 2
|
27038
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27039
|
+
.IP \(bu 2
|
27040
|
+
\fBid\fP \-\- 検索idを指定します。
|
27041
|
+
.UNINDENT
|
27042
|
+
.UNINDENT
|
27043
|
+
.UNINDENT
|
27044
|
+
.INDENT 0.0
|
27045
|
+
.TP
|
27046
|
+
.B grn_id grn_table_lcp_search(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *key\fP, unsigned int\fI\ key_size\fP)
|
27047
|
+
tableが \fBGRN_TABLE_PAT_KEY\fP もしくは \fBGRN_TABLE_DAT_KEY\fP を指定して作ったtableなら、longest common prefix searchを行い、対応するIDを返します。
|
27048
|
+
.sp
|
27049
|
+
tableが \fBGRN_TABLE_HASH_KEY\fP を指定して作ったtableなら、完全に一致するキーを検索し、対応するIDを返します。
|
27050
|
+
.INDENT 7.0
|
27051
|
+
.TP
|
27052
|
+
.B パラメタ
|
27053
|
+
.INDENT 7.0
|
27054
|
+
.IP \(bu 2
|
27055
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27056
|
+
.IP \(bu 2
|
27057
|
+
\fBkey\fP \-\- 検索keyを指定します。
|
27058
|
+
.UNINDENT
|
27059
|
+
.UNINDENT
|
27060
|
+
.UNINDENT
|
27061
|
+
.INDENT 0.0
|
27062
|
+
.TP
|
27063
|
+
.B int grn_table_get_key(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, grn_id\fI\ id\fP, void\fI\ *keybuf\fP, int\fI\ buf_size\fP)
|
27064
|
+
tableのIDに対応するレコードのkeyを取得します。
|
27065
|
+
.sp
|
27066
|
+
対応するレコードが存在する場合はkey長を返します。見つからない場合は0を返します。対応するキーの検索に成功し、またbuf_sizeの長さがkey長以上であった場合は、keybufに該当するkeyをコピーします。
|
27067
|
+
.INDENT 7.0
|
27068
|
+
.TP
|
27069
|
+
.B パラメタ
|
27070
|
+
.INDENT 7.0
|
27071
|
+
.IP \(bu 2
|
27072
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27073
|
+
.IP \(bu 2
|
27074
|
+
\fBid\fP \-\- 対象レコードのIDを指定します。
|
27075
|
+
.IP \(bu 2
|
27076
|
+
\fBkeybuf\fP \-\- keyを格納するバッファ(呼出側で準備する)を指定します。
|
27077
|
+
.IP \(bu 2
|
27078
|
+
\fBbuf_size\fP \-\- keybufのサイズ(byte長)を指定します。
|
27079
|
+
.UNINDENT
|
27080
|
+
.UNINDENT
|
27081
|
+
.UNINDENT
|
27082
|
+
.INDENT 0.0
|
27083
|
+
.TP
|
27084
|
+
.B grn_rc grn_table_delete(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *key\fP, unsigned int\fI\ key_size\fP)
|
27085
|
+
tableのkeyに対応するレコードを削除します。対応するレコードが存在しない場合は \fBGRN_INVALID_ARGUMENT\fP を返します。
|
27086
|
+
.INDENT 7.0
|
27087
|
+
.TP
|
27088
|
+
.B パラメタ
|
27089
|
+
.INDENT 7.0
|
27090
|
+
.IP \(bu 2
|
27091
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27092
|
+
.IP \(bu 2
|
27093
|
+
\fBkey\fP \-\- 検索keyを指定します。
|
27094
|
+
.IP \(bu 2
|
27095
|
+
\fBkey_size\fP \-\- 検索keyのサイズを指定します。
|
27096
|
+
.UNINDENT
|
27097
|
+
.UNINDENT
|
27098
|
+
.UNINDENT
|
27099
|
+
.INDENT 0.0
|
27100
|
+
.TP
|
27101
|
+
.B grn_rc grn_table_delete_by_id(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, grn_id\fI\ id\fP)
|
27102
|
+
tableのidに対応するレコードを削除します。対応するレコードが存在しない場合は \fBGRN_INVALID_ARGUMENT\fP を返します。
|
27103
|
+
.INDENT 7.0
|
27104
|
+
.TP
|
27105
|
+
.B パラメタ
|
27106
|
+
.INDENT 7.0
|
27107
|
+
.IP \(bu 2
|
27108
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27109
|
+
.IP \(bu 2
|
27110
|
+
\fBid\fP \-\- レコードIDを指定します。
|
27111
|
+
.UNINDENT
|
27112
|
+
.UNINDENT
|
27113
|
+
.UNINDENT
|
27114
|
+
.INDENT 0.0
|
27115
|
+
.TP
|
27116
|
+
.B grn_rc grn_table_update_by_id(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, grn_id\fI\ id\fP, const void\fI\ *dest_key\fP, unsigned int\fI\ dest_key_size\fP)
|
27117
|
+
tableのidに対応するレコードのkeyを変更します。新しいkeyとそのbyte長をdest_keyとdest_key_sizeに指定します。
|
27118
|
+
.sp
|
27119
|
+
この操作は、\fBGRN_TABLE_DAT_KEY\fP 型のテーブルのみ使用できます。
|
27120
|
+
.INDENT 7.0
|
27121
|
+
.TP
|
27122
|
+
.B パラメタ
|
27123
|
+
.INDENT 7.0
|
27124
|
+
.IP \(bu 2
|
27125
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27126
|
+
.IP \(bu 2
|
27127
|
+
\fBid\fP \-\- レコードIDを指定します。
|
27128
|
+
.UNINDENT
|
27129
|
+
.UNINDENT
|
27130
|
+
.UNINDENT
|
27131
|
+
.INDENT 0.0
|
27132
|
+
.TP
|
27133
|
+
.B grn_rc grn_table_update(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *src_key\fP, unsigned int\fI\ src_key_size\fP, const void\fI\ *dest_key\fP, unsigned int\fI\ dest_key_size\fP)
|
27134
|
+
tableのsrc_keyに対応するレコードのkeyを変更します。新しいkeyとそのbyte長をdest_keyとdest_key_sizeに指定します。
|
27135
|
+
.sp
|
27136
|
+
この操作は、\fBGRN_TABLE_DAT_KEY\fP 型のテーブルのみ使用できます。
|
27137
|
+
.INDENT 7.0
|
27138
|
+
.TP
|
27139
|
+
.B パラメタ
|
27140
|
+
.INDENT 7.0
|
27141
|
+
.IP \(bu 2
|
27142
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27143
|
+
.IP \(bu 2
|
27144
|
+
\fBsrc_key\fP \-\- 対象レコードのkeyを指定します。
|
27145
|
+
.IP \(bu 2
|
27146
|
+
\fBsrc_key_size\fP \-\- 対象レコードのkeyの長さ(byte)を指定します。
|
27147
|
+
.IP \(bu 2
|
27148
|
+
\fBdest_key\fP \-\- 変更後のkeyを指定します。
|
27149
|
+
.IP \(bu 2
|
27150
|
+
\fBdest_key_size\fP \-\- 変更後のkeyの長さ(byte)を指定します。
|
27151
|
+
.UNINDENT
|
27152
|
+
.UNINDENT
|
27153
|
+
.UNINDENT
|
27154
|
+
.INDENT 0.0
|
27155
|
+
.TP
|
27156
|
+
.B grn_rc grn_table_truncate(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP)
|
27157
|
+
tableの全レコードを一括して削除します。
|
27158
|
+
.sp
|
27159
|
+
注意: multithread環境では他のthreadのアクセスによって、存在しないアドレスへアクセスし、SIGSEGVが発生する可能性があります。
|
27160
|
+
.INDENT 7.0
|
27161
|
+
.TP
|
27162
|
+
.B パラメタ
|
27163
|
+
.INDENT 7.0
|
27164
|
+
.IP \(bu 2
|
27165
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27166
|
+
.UNINDENT
|
27167
|
+
.UNINDENT
|
27168
|
+
.UNINDENT
|
27169
|
+
.INDENT 0.0
|
27170
|
+
.TP
|
27171
|
+
.B grn_table_sort_key
|
27172
|
+
TODO...
|
27173
|
+
.UNINDENT
|
27174
|
+
.INDENT 0.0
|
27175
|
+
.TP
|
27176
|
+
.B grn_table_sort_flags
|
27177
|
+
TODO...
|
27178
|
+
.UNINDENT
|
27179
|
+
.INDENT 0.0
|
27180
|
+
.TP
|
27181
|
+
.B int grn_table_sort(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, int\fI\ offset\fP, int\fI\ limit\fP, grn_obj\fI\ *result\fP, grn_table_sort_key\fI\ *keys\fP, int\fI\ n_keys\fP)
|
27182
|
+
table内のレコードをソートし、上位limit個の要素をresultに格納します。
|
27183
|
+
.sp
|
27184
|
+
keys.keyには、tableのcolumn,accessor,procのいずれかが指定できます。keys.flagsには、\fBGRN_TABLE_SORT_ASC\fP / \fBGRN_TABLE_SORT_DESC\fP のいずれかを指定できます。\fBGRN_TABLE_SORT_ASC\fP では昇順、\fBGRN_TABLE_SORT_DESC\fP では降順でソートされます。keys.offsetは、内部利用のためのメンバです。
|
27185
|
+
.INDENT 7.0
|
27186
|
+
.TP
|
27187
|
+
.B パラメタ
|
27188
|
+
.INDENT 7.0
|
27189
|
+
.IP \(bu 2
|
27190
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27191
|
+
.IP \(bu 2
|
27192
|
+
\fBoffset\fP \-\- sortされたレコードのうち、(0ベースで)offset番目から順にresにレコードを格納します。
|
27193
|
+
.IP \(bu 2
|
27194
|
+
\fBlimit\fP \-\- resに格納するレコードの上限を指定します。
|
27195
|
+
.IP \(bu 2
|
27196
|
+
\fBresult\fP \-\- 結果を格納するtableを指定します。
|
27197
|
+
.IP \(bu 2
|
27198
|
+
\fBkeys\fP \-\- ソートキー配列へのポインタを指定します。
|
27199
|
+
.IP \(bu 2
|
27200
|
+
\fBn_keys\fP \-\- ソートキー配列のサイズを指定します。
|
27201
|
+
.UNINDENT
|
27202
|
+
.UNINDENT
|
27203
|
+
.UNINDENT
|
27204
|
+
.INDENT 0.0
|
27205
|
+
.TP
|
27206
|
+
.B grn_table_group_result
|
27207
|
+
TODO...
|
27208
|
+
.UNINDENT
|
27209
|
+
.INDENT 0.0
|
27210
|
+
.TP
|
27211
|
+
.B grn_table_group_flags
|
27212
|
+
TODO...
|
27213
|
+
.UNINDENT
|
27214
|
+
.INDENT 0.0
|
27215
|
+
.TP
|
27216
|
+
.B grn_rc grn_table_group(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, grn_table_sort_key\fI\ *keys\fP, int\fI\ n_keys\fP, grn_table_group_result\fI\ *results\fP, int\fI\ n_results\fP)
|
27217
|
+
tableのレコードを特定の条件でグループ化します。
|
27218
|
+
.INDENT 7.0
|
27219
|
+
.TP
|
27220
|
+
.B パラメタ
|
27221
|
+
.INDENT 7.0
|
27222
|
+
.IP \(bu 2
|
27223
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27224
|
+
.IP \(bu 2
|
27225
|
+
\fBkeys\fP \-\- group化キー構造体の配列へのポインタを指定します。
|
27226
|
+
.IP \(bu 2
|
27227
|
+
\fBn_keys\fP \-\- group化キー構造体の配列のサイズを指定します。
|
27228
|
+
.IP \(bu 2
|
27229
|
+
\fBresults\fP \-\- group化の結果を格納する構造体の配列へのポインタを指定します。
|
27230
|
+
.IP \(bu 2
|
27231
|
+
\fBn_results\fP \-\- group化の結果を格納する構造体の配列のサイズを指定します。
|
27232
|
+
.UNINDENT
|
27233
|
+
.UNINDENT
|
27234
|
+
.UNINDENT
|
27235
|
+
.INDENT 0.0
|
27236
|
+
.TP
|
27237
|
+
.B grn_rc grn_table_setoperation(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table1\fP, grn_obj\fI\ *table2\fP, grn_obj\fI\ *res\fP, grn_operator\fI\ op\fP)
|
27238
|
+
table1とtable2をopの指定に従って集合演算した結果をresに格納します。
|
27239
|
+
.sp
|
27240
|
+
resにtable1あるいはtable2そのものを指定した場合を除けば、table1, table2は破壊されません。
|
27241
|
+
.INDENT 7.0
|
27242
|
+
.TP
|
27243
|
+
.B パラメタ
|
27244
|
+
.INDENT 7.0
|
27245
|
+
.IP \(bu 2
|
27246
|
+
\fBtable1\fP \-\- 対象table1を指定します。
|
27247
|
+
.IP \(bu 2
|
27248
|
+
\fBtable2\fP \-\- 対象table2を指定します。
|
27249
|
+
.IP \(bu 2
|
27250
|
+
\fBres\fP \-\- 結果を格納するtableを指定します。
|
27251
|
+
.IP \(bu 2
|
27252
|
+
\fBop\fP \-\- 実行する演算の種類を指定します。
|
27253
|
+
.UNINDENT
|
27254
|
+
.UNINDENT
|
27255
|
+
.UNINDENT
|
27256
|
+
.INDENT 0.0
|
27257
|
+
.TP
|
27258
|
+
.B grn_rc grn_table_difference(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table1\fP, grn_obj\fI\ *table2\fP, grn_obj\fI\ *res1\fP, grn_obj\fI\ *res2\fP)
|
27259
|
+
table1とtable2から重複するレコードを取り除いた結果をそれぞれres1, res2に格納します。
|
27260
|
+
.INDENT 7.0
|
27261
|
+
.TP
|
27262
|
+
.B パラメタ
|
27263
|
+
.INDENT 7.0
|
27264
|
+
.IP \(bu 2
|
27265
|
+
\fBtable1\fP \-\- 対象table1を指定します。
|
27266
|
+
.IP \(bu 2
|
27267
|
+
\fBtable2\fP \-\- 対象table2を指定します。
|
27268
|
+
.IP \(bu 2
|
27269
|
+
\fBres1\fP \-\- 結果を格納するtableを指定します。
|
27270
|
+
.IP \(bu 2
|
27271
|
+
\fBres2\fP \-\- 結果を格納するtableを指定します。
|
27272
|
+
.UNINDENT
|
27273
|
+
.UNINDENT
|
27274
|
+
.UNINDENT
|
27275
|
+
.INDENT 0.0
|
27276
|
+
.TP
|
27277
|
+
.B int grn_table_columns(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP, grn_obj\fI\ *res\fP)
|
27278
|
+
nameパラメータから始まるtableのカラムIDをresパラメータに格納します。name_sizeパラメータが0の場合はすべてのカラムIDを格納します。
|
27279
|
+
.INDENT 7.0
|
27280
|
+
.TP
|
27281
|
+
.B パラメタ
|
27282
|
+
.INDENT 7.0
|
27283
|
+
.IP \(bu 2
|
27284
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27285
|
+
.IP \(bu 2
|
27286
|
+
\fBname\fP \-\- 取得したいカラム名のprefixを指定します。
|
27287
|
+
.IP \(bu 2
|
27288
|
+
\fBname_size\fP \-\- nameパラメータの長さを指定します。
|
27289
|
+
.IP \(bu 2
|
27290
|
+
\fBres\fP \-\- 結果を格納する \fBGRN_TABLE_HASH_KEY\fP のtableを指定します。
|
27291
|
+
.UNINDENT
|
27292
|
+
.TP
|
27293
|
+
.B 戻り値
|
27294
|
+
格納したカラムIDの数を返します。
|
27295
|
+
.UNINDENT
|
27296
|
+
.UNINDENT
|
27297
|
+
.INDENT 0.0
|
27298
|
+
.TP
|
27299
|
+
.B unsigned int grn_table_size(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP)
|
27300
|
+
tableに登録されているレコードの件数を返します。
|
27301
|
+
.INDENT 7.0
|
27302
|
+
.TP
|
27303
|
+
.B パラメタ
|
27304
|
+
.INDENT 7.0
|
27305
|
+
.IP \(bu 2
|
27306
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27307
|
+
.UNINDENT
|
27308
|
+
.UNINDENT
|
27309
|
+
.UNINDENT
|
27310
|
+
.INDENT 0.0
|
27311
|
+
.TP
|
27312
|
+
.B grn_rc grn_table_rename(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP)
|
27313
|
+
ctxが使用するdbにおいてtableに対応する名前をnameに更新します。tableの全てのcolumnも同時に名前が変更されます。tableは永続オブジェクトでなければいけません。
|
27314
|
+
.INDENT 7.0
|
27315
|
+
.TP
|
27316
|
+
.B パラメタ
|
27317
|
+
.INDENT 7.0
|
27318
|
+
.IP \(bu 2
|
27319
|
+
\fBname_size\fP \-\- nameパラメータのsize(byte)を指定します。
|
27320
|
+
.UNINDENT
|
27321
|
+
.UNINDENT
|
27322
|
+
.UNINDENT
|
27323
|
+
.SS \fBgrn_table_cursor\fP
|
27324
|
+
.SS 概要
|
27325
|
+
.sp
|
27326
|
+
TODO...
|
27327
|
+
.SS 実行例:
|
27328
|
+
.sp
|
27329
|
+
TODO...
|
27330
|
+
.SS リファレンス
|
27331
|
+
.INDENT 0.0
|
27332
|
+
.TP
|
27333
|
+
.B grn_table_cursor
|
27334
|
+
TODO...
|
27335
|
+
.UNINDENT
|
27336
|
+
.INDENT 0.0
|
27337
|
+
.TP
|
27338
|
+
.B grn_table_cursor *grn_table_cursor_open(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *table\fP, const void\fI\ *min\fP, unsigned int\fI\ min_size\fP, const void\fI\ *max\fP, unsigned int\fI\ max_size\fP, int\fI\ offset\fP, int\fI\ limit\fP, int\fI\ flags\fP)
|
27339
|
+
tableに登録されているレコードを順番に取り出すためのカーソルを生成して返します。
|
27340
|
+
.INDENT 7.0
|
27341
|
+
.TP
|
27342
|
+
.B パラメタ
|
27343
|
+
.INDENT 7.0
|
27344
|
+
.IP \(bu 2
|
27345
|
+
\fBtable\fP \-\- 対象tableを指定します。
|
27346
|
+
.IP \(bu 2
|
27347
|
+
\fBmin\fP \-\- keyの下限を指定します。(NULLは下限なしと見なします。) \fBGRN_CURSOR_PREFIX\fP については後述。
|
27348
|
+
.IP \(bu 2
|
27349
|
+
\fBmin_size\fP \-\- minのsizeを指定します。\fBGRN_CURSOR_PREFIX\fP については後述。
|
27350
|
+
.IP \(bu 2
|
27351
|
+
\fBmax\fP \-\- keyの上限を指定します。(NULLは上限なしと見なします。) \fBGRN_CURSOR_PREFIX\fP については後述。
|
27352
|
+
.IP \(bu 2
|
27353
|
+
\fBmax_size\fP \-\- maxのsizeを指定します。\fBGRN_CURSOR_PREFIX\fP については無視される場合があります。
|
27354
|
+
.IP \(bu 2
|
27355
|
+
\fBflags\fP \-\-
|
27356
|
+
.sp
|
27357
|
+
\fBGRN_CURSOR_ASCENDING\fP を指定すると昇順にレコードを取り出します。
|
27358
|
+
.sp
|
27359
|
+
\fBGRN_CURSOR_DESCENDING\fP を指定すると降順にレコードを取り出します。(下記 \fBGRN_CURSOR_PREFIX\fP を指定し、keyが近いレコードを取得する場合、もしくは、common prefix searchを行う場合には、\fBGRN_CURSOR_ASCENDING\fP / \fBGRN_CURSOR_DESCENDING\fP は無視されます。)
|
27360
|
+
.sp
|
27361
|
+
\fBGRN_CURSOR_GT\fP を指定するとminに一致したkeyをcursorの範囲に含みません。(minがNULLの場合もしくは、下記 \fBGRN_CURSOR_PREFIX\fP を指定し、keyが近いレコードを取得する場合、もしくは、common prefix searchを行う場合には、\fBGRN_CURSOR_GT\fP は無視されます。)
|
27362
|
+
.sp
|
27363
|
+
\fBGRN_CURSOR_LT\fP を指定するとmaxに一致したkeyをcursorの範囲に含みません。(maxがNULLの場合もしくは、下記 \fBGRN_CURSOR_PREFIX\fP を指定した場合には、\fBGRN_CURSOR_LT\fP は無視されます。)
|
27364
|
+
.sp
|
27365
|
+
\fBGRN_CURSOR_BY_ID\fP を指定するとID順にレコードを取り出します。(下記 \fBGRN_CURSOR_PREFIX\fP を指定した場合には、\fBGRN_CURSOR_BY_ID\fP は無視されます。) \fBGRN_OBJ_TABLE_PAT_KEY\fP を指定したtableについては、\fBGRN_CURSOR_BY_KEY\fP を指定するとkey順にレコードを取り出します。( \fBGRN_OBJ_TABLE_HASH_KEY\fP , \fBGRN_OBJ_TABLE_NO_KEY\fP を指定したテーブルでは \fBGRN_CURSOR_BY_KEY\fP は無視されます。)
|
27366
|
+
.sp
|
27367
|
+
\fBGRN_CURSOR_PREFIX\fP を指定すると、 \fBGRN_OBJ_TABLE_PAT_KEY\fP を指定したテーブルに関する下記のレコードを取り出すカーソルが作成されます。maxがNULLの場合には、keyがminと前方一致するレコードを取り出します。max_sizeパラメータは無視されます。
|
27368
|
+
.sp
|
27369
|
+
maxとmax_sizeが指定され、かつ、テーブルのkeyがShortText型である場合、maxとcommon prefix searchを行い、common prefixがmin_sizeバイト以上のレコードを取り出します。minは無視されます。
|
27370
|
+
.sp
|
27371
|
+
maxとmax_sizeが指定され、かつ、テーブルのkeyが固定長型の場合、maxとPAT木上で近い位置にあるノードから順番にレコードを取り出します。ただし、keyのパトリシア木で、min_sizeバイト未満のビットに対するノードで、maxと異なった方向にあるノードに対応するレコードについては取り出しません。PAT木上で位置が近いこととkeyの値が近いことは同一ではありません。この場合、maxで与えられるポインタが指す値は、対象テーブルのkeyサイズと同じか超える幅である必要があります。minは無視されます。
|
27372
|
+
.sp
|
27373
|
+
\fBGRN_CURSOR_BY_ID\fP / \fBGRN_CURSOR_BY_KEY\fP / \fBGRN_CURSOR_PREFIX\fP の3フラグは、同時に指定することができません。
|
27374
|
+
.sp
|
27375
|
+
\fBGRN_OBJ_TABLE_PAT_KEY\fP を指定して作ったテーブルで、\fBGRN_CURSOR_PREFIX\fP と \fBGRN_CURSOR_RK\fP を指定すると、半角小文字のアルファベット文字列から、それを旧JIS X 4063:2000規格に従って全角カタカナに変換した文字列に前方一致する値をkeyとするレコードを取り出します。\fBGRN_ENC_UTF8\fP のみをサポートしています。\fBGRN_CURSOR_ASCENDING\fP / \fBGRN_CURSOR_DESCENDING\fP は無効であり、レコードをkey値の昇降順で取り出すことはできません。
|
27376
|
+
|
27377
|
+
.IP \(bu 2
|
27378
|
+
\fBoffset\fP \-\-
|
27379
|
+
.sp
|
27380
|
+
該当する範囲のレコードのうち、(0ベースで)offset番目からレコードを取り出します。
|
24389
27381
|
.sp
|
24390
|
-
|
24391
|
-
|
24392
|
-
|
24393
|
-
|
24394
|
-
.fi
|
24395
|
-
.UNINDENT
|
24396
|
-
.UNINDENT
|
24397
|
-
.TP
|
24398
|
-
.B ID
|
24399
|
-
ID of a thread. Groonga process creates threads to process
|
24400
|
-
requests concurrently. Each thread outputs some logs for a
|
24401
|
-
request. This ID can be used to extract a log sequence by
|
24402
|
-
a thread.
|
27382
|
+
\fBGRN_CURSOR_PREFIX\fP を指定したときは負の数を指定することはできません。
|
27383
|
+
|
27384
|
+
.IP \(bu 2
|
27385
|
+
\fBlimit\fP \-\-
|
24403
27386
|
.sp
|
24404
|
-
|
24405
|
-
.INDENT 7.0
|
24406
|
-
.INDENT 3.5
|
27387
|
+
該当する範囲のレコードのうち、limit件のみを取り出します。\-1が指定された場合は、全件が指定されたものとみなします。
|
24407
27388
|
.sp
|
24408
|
-
|
24409
|
-
|
24410
|
-
45ea3034
|
24411
|
-
.ft P
|
24412
|
-
.fi
|
27389
|
+
\fBGRN_CURSOR_PREFIX\fP を指定したときは\-1より小さい負の数を指定することはできません。
|
27390
|
+
|
24413
27391
|
.UNINDENT
|
24414
27392
|
.UNINDENT
|
24415
27393
|
.UNINDENT
|
24416
27394
|
.INDENT 0.0
|
24417
27395
|
.TP
|
24418
|
-
.B
|
24419
|
-
|
24420
|
-
.
|
24421
|
-
.INDENT 0.0
|
27396
|
+
.B grn_rc grn_table_cursor_close(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP)
|
27397
|
+
\fBgrn_table_cursor_open()\fP で生成したcursorを解放します。
|
27398
|
+
.INDENT 7.0
|
24422
27399
|
.TP
|
24423
|
-
.B
|
24424
|
-
|
27400
|
+
.B パラメタ
|
27401
|
+
.INDENT 7.0
|
27402
|
+
.IP \(bu 2
|
27403
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
27404
|
+
.UNINDENT
|
27405
|
+
.UNINDENT
|
24425
27406
|
.UNINDENT
|
24426
27407
|
.INDENT 0.0
|
24427
27408
|
.TP
|
24428
|
-
.B
|
24429
|
-
|
27409
|
+
.B grn_id grn_table_cursor_next(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP)
|
27410
|
+
cursorのカレントレコードを一件進めてそのIDを返します。cursorの対象範囲の末尾に達すると \fBGRN_ID_NIL\fP を返します。
|
27411
|
+
.INDENT 7.0
|
24430
27412
|
.TP
|
24431
|
-
.B
|
24432
|
-
Details about the log with free format.
|
24433
|
-
.sp
|
24434
|
-
実行例:
|
27413
|
+
.B パラメタ
|
24435
27414
|
.INDENT 7.0
|
24436
|
-
.
|
24437
|
-
|
24438
|
-
.
|
24439
|
-
.ft C
|
24440
|
-
query log opened.
|
24441
|
-
.ft P
|
24442
|
-
.fi
|
27415
|
+
.IP \(bu 2
|
27416
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
27417
|
+
.UNINDENT
|
24443
27418
|
.UNINDENT
|
24444
27419
|
.UNINDENT
|
27420
|
+
.INDENT 0.0
|
24445
27421
|
.TP
|
24446
|
-
.B
|
24447
|
-
|
24448
|
-
.sp
|
24449
|
-
実行例:
|
27422
|
+
.B int grn_table_cursor_get_key(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP, void\fI\ **key\fP)
|
27423
|
+
cursorのカレントレコードのkeyをkeyパラメータにセットし、その長さを返します。
|
24450
27424
|
.INDENT 7.0
|
24451
|
-
.
|
24452
|
-
.
|
24453
|
-
.
|
24454
|
-
.
|
24455
|
-
|
24456
|
-
.
|
24457
|
-
|
27425
|
+
.TP
|
27426
|
+
.B パラメタ
|
27427
|
+
.INDENT 7.0
|
27428
|
+
.IP \(bu 2
|
27429
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
27430
|
+
.IP \(bu 2
|
27431
|
+
\fBkey\fP \-\- カレントレコードのkeyへのポインタがセットされます。
|
27432
|
+
.UNINDENT
|
24458
27433
|
.UNINDENT
|
24459
27434
|
.UNINDENT
|
27435
|
+
.INDENT 0.0
|
24460
27436
|
.TP
|
24461
|
-
.B
|
24462
|
-
|
24463
|
-
.sp
|
24464
|
-
実行例:
|
27437
|
+
.B int grn_table_cursor_get_value(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP, void\fI\ **value\fP)
|
27438
|
+
cursorパラメータのカレントレコードのvalueをvalueパラメータにセットし、その長さを返します。
|
24465
27439
|
.INDENT 7.0
|
24466
|
-
.
|
24467
|
-
.
|
24468
|
-
.
|
24469
|
-
.
|
24470
|
-
|
24471
|
-
(
|
24472
|
-
|
24473
|
-
.fi
|
27440
|
+
.TP
|
27441
|
+
.B パラメタ
|
27442
|
+
.INDENT 7.0
|
27443
|
+
.IP \(bu 2
|
27444
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
27445
|
+
.IP \(bu 2
|
27446
|
+
\fBvalue\fP \-\- カレントレコードのvalueへのポインタがセットされます。
|
24474
27447
|
.UNINDENT
|
24475
27448
|
.UNINDENT
|
27449
|
+
.UNINDENT
|
27450
|
+
.INDENT 0.0
|
24476
27451
|
.TP
|
24477
|
-
.B
|
24478
|
-
|
24479
|
-
.sp
|
24480
|
-
実行例:
|
27452
|
+
.B grn_rc grn_table_cursor_set_value(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP, const void\fI\ *value\fP, int\fI\ flags\fP)
|
27453
|
+
cursorのカレントレコードのvalueを引数の内容に置き換えます。cursorのカレントレコードが存在しない場合は \fBGRN_INVALID_ARGUMENT\fP を返します。
|
24481
27454
|
.INDENT 7.0
|
24482
|
-
.
|
24483
|
-
.
|
24484
|
-
.
|
24485
|
-
.
|
24486
|
-
|
24487
|
-
|
24488
|
-
|
24489
|
-
.
|
27455
|
+
.TP
|
27456
|
+
.B パラメタ
|
27457
|
+
.INDENT 7.0
|
27458
|
+
.IP \(bu 2
|
27459
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
27460
|
+
.IP \(bu 2
|
27461
|
+
\fBvalue\fP \-\- 新しいvalueの値を指定します。
|
27462
|
+
.IP \(bu 2
|
27463
|
+
\fBflags\fP \-\- \fBgrn_obj_set_value()\fP のflagsと同様の値を指定できます。
|
24490
27464
|
.UNINDENT
|
24491
27465
|
.UNINDENT
|
27466
|
+
.UNINDENT
|
27467
|
+
.INDENT 0.0
|
24492
27468
|
.TP
|
24493
|
-
.B
|
24494
|
-
|
24495
|
-
.sp
|
24496
|
-
実行例:
|
27469
|
+
.B grn_rc grn_table_cursor_delete(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP)
|
27470
|
+
cursorのカレントレコードを削除します。cursorのカレントレコードが存在しない場合は \fBGRN_INVALID_ARGUMENT\fP を返します。
|
24497
27471
|
.INDENT 7.0
|
24498
|
-
.
|
24499
|
-
.
|
24500
|
-
.
|
24501
|
-
.
|
24502
|
-
|
24503
|
-
(It means return code is 0. 0 means GRN_SUCCESS.)
|
24504
|
-
.ft P
|
24505
|
-
.fi
|
27472
|
+
.TP
|
27473
|
+
.B パラメタ
|
27474
|
+
.INDENT 7.0
|
27475
|
+
.IP \(bu 2
|
27476
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
24506
27477
|
.UNINDENT
|
24507
27478
|
.UNINDENT
|
24508
27479
|
.UNINDENT
|
24509
|
-
.sp
|
24510
|
-
実行例:
|
24511
27480
|
.INDENT 0.0
|
24512
|
-
.
|
24513
|
-
.
|
24514
|
-
|
24515
|
-
.
|
24516
|
-
|
24517
|
-
|
24518
|
-
|
24519
|
-
|
24520
|
-
|
24521
|
-
.ft P
|
24522
|
-
.fi
|
27481
|
+
.TP
|
27482
|
+
.B grn_obj *grn_table_cursor_table(grn_ctx\fI\ *ctx\fP, grn_table_cursor\fI\ *tc\fP)
|
27483
|
+
cursorが属するtableを返します。
|
27484
|
+
.INDENT 7.0
|
27485
|
+
.TP
|
27486
|
+
.B パラメタ
|
27487
|
+
.INDENT 7.0
|
27488
|
+
.IP \(bu 2
|
27489
|
+
\fBtc\fP \-\- 対象cursorを指定します。
|
24523
27490
|
.UNINDENT
|
24524
27491
|
.UNINDENT
|
24525
|
-
.
|
24526
|
-
.
|
24527
|
-
groongaを全文検索ライブラリとして使うことができます。この節ではgroongaが提供しているAPIを示します。
|
24528
|
-
.SS \fBgrn_ctx\fP
|
27492
|
+
.UNINDENT
|
27493
|
+
.SS \fBgrn_type\fP
|
24529
27494
|
.SS 概要
|
24530
27495
|
.sp
|
24531
|
-
|
27496
|
+
TODO...
|
27497
|
+
.SS 実行例:
|
27498
|
+
.sp
|
27499
|
+
TODO...
|
27500
|
+
.SS リファレンス
|
24532
27501
|
.INDENT 0.0
|
24533
|
-
.
|
24534
|
-
|
24535
|
-
|
24536
|
-
その時点のエンコーディング。
|
24537
|
-
.IP \(bu 2
|
24538
|
-
デフォルトの閾値。(例: \fImatch\-escalation\-threshold\fP)
|
24539
|
-
.IP \(bu 2
|
24540
|
-
デフォルトのコマンドバージョン。( \fB/reference/commands/command_version\fP )を参照のこと。
|
27502
|
+
.TP
|
27503
|
+
.B grn_builtin_type
|
27504
|
+
TODO...
|
24541
27505
|
.UNINDENT
|
24542
|
-
.sp
|
24543
|
-
\fBgrn_ctx\fP は基盤となる機能を提供します:
|
24544
27506
|
.INDENT 0.0
|
27507
|
+
.TP
|
27508
|
+
.B grn_obj *grn_type_create(grn_ctx\fI\ *ctx\fP, const char\fI\ *name\fP, unsigned int\fI\ name_size\fP, grn_obj_flags\fI\ flags\fP, unsigned int\fI\ size\fP)
|
27509
|
+
nameに対応する新たなtype(型)をdbに定義します。
|
27510
|
+
.INDENT 7.0
|
27511
|
+
.TP
|
27512
|
+
.B パラメタ
|
27513
|
+
.INDENT 7.0
|
24545
27514
|
.IP \(bu 2
|
24546
|
-
|
27515
|
+
\fBname\fP \-\- 作成するtypeの名前を指定します。
|
24547
27516
|
.IP \(bu 2
|
24548
|
-
|
27517
|
+
\fBflags\fP \-\- \fBGRN_OBJ_KEY_VAR_SIZE\fP, \fBGRN_OBJ_KEY_FLOAT\fP, \fBGRN_OBJ_KEY_INT\fP, \fBGRN_OBJ_KEY_UINT\fP のいずれかを指定します。
|
27518
|
+
.IP \(bu 2
|
27519
|
+
\fBsize\fP \-\- \fBGRN_OBJ_KEY_VAR_SIZE\fP の場合は最大長、それ以外の場合は長さ(単位:byte)を指定します。
|
24549
27520
|
.UNINDENT
|
27521
|
+
.UNINDENT
|
27522
|
+
.UNINDENT
|
27523
|
+
.SS \fBgrn_user_data\fP
|
27524
|
+
.SS 概要
|
24550
27525
|
.sp
|
24551
|
-
|
24552
|
-
.sp
|
24553
|
-
同じ \fBgrn_ctx\fP を二つ以上のスレッドからは扱えません。\fBgrn_ctx\fP はスレッドごとに作成する必要があります。一つのスレッドでは \fBgrn_ctx\fP を二つ以上扱えますが、通常はその必要はありません。
|
27526
|
+
TODO...
|
24554
27527
|
.SS 実行例:
|
24555
27528
|
.sp
|
24556
27529
|
TODO...
|
24557
27530
|
.SS リファレンス
|
24558
27531
|
.INDENT 0.0
|
24559
27532
|
.TP
|
24560
|
-
.B
|
27533
|
+
.B grn_user_data
|
24561
27534
|
TODO...
|
24562
27535
|
.UNINDENT
|
24563
27536
|
.INDENT 0.0
|
24564
27537
|
.TP
|
24565
|
-
.B
|
24566
|
-
|
27538
|
+
.B grn_user_data *grn_obj_user_data(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
27539
|
+
objectに登録できるユーザデータへのポインタを返します。table, column, proc, exprのみ使用可能です。
|
24567
27540
|
.INDENT 7.0
|
24568
27541
|
.TP
|
24569
27542
|
.B パラメタ
|
24570
27543
|
.INDENT 7.0
|
24571
27544
|
.IP \(bu 2
|
24572
|
-
\
|
24573
|
-
.IP \(bu 2
|
24574
|
-
\fBflags\fP \-\- 初期化する \fBctx\fP のオプションを指定します。
|
27545
|
+
\fBobj\fP \-\- 対象objectを指定します。
|
24575
27546
|
.UNINDENT
|
24576
|
-
.TP
|
24577
|
-
.B 戻り値
|
24578
|
-
成功時は \fBGRN_SUCCESS\fP 、エラー時は \fBGRN_SUCCESS\fP 以外。
|
24579
27547
|
.UNINDENT
|
24580
27548
|
.UNINDENT
|
24581
|
-
.SS grn_expr
|
24582
|
-
.sp
|
24583
|
-
TODO...
|
24584
27549
|
.SH 仕様
|
24585
27550
|
.SS GQTP
|
24586
27551
|
.sp
|
@@ -25153,6 +28118,13 @@ groongaにはいくつか制限事項があります。
|
|
25153
28118
|
.UNINDENT
|
25154
28119
|
.sp
|
25155
28120
|
実際には他の諸条件の制約により上記の値まで到達しない場合もあります。
|
28121
|
+
.SS カラムの制限
|
28122
|
+
.sp
|
28123
|
+
カラムには以下の制限があります。
|
28124
|
+
.INDENT 0.0
|
28125
|
+
.IP \(bu 2
|
28126
|
+
カラムごとのサイズを合計した上限値: 256GiB
|
28127
|
+
.UNINDENT
|
25156
28128
|
.SH トラブルシューティング
|
25157
28129
|
.SS 同じ検索キーワードなのに全文検索結果が異なる
|
25158
28130
|
.sp
|
@@ -25434,12 +28406,12 @@ Travis CI上でgroongaを使っているオープンソースソフトウェア
|
|
25434
28406
|
\fI\%nroonga用の.travis.yml\fP
|
25435
28407
|
.UNINDENT
|
25436
28408
|
.IP \(bu 2
|
25437
|
-
\fI\%logaling
|
28409
|
+
\fI\%logaling\-command\fP (A glossary management command line tool)
|
25438
28410
|
.INDENT 2.0
|
25439
28411
|
.IP \(bu 2
|
25440
|
-
\fI\%Travis CIでのlogaling
|
28412
|
+
\fI\%Travis CIでのlogaling\-commandのビルド結果\fP
|
25441
28413
|
.IP \(bu 2
|
25442
|
-
\fI\%logaling
|
28414
|
+
\fI\%logaling\-command用の.travis.yml\fP
|
25443
28415
|
.UNINDENT
|
25444
28416
|
.UNINDENT
|
25445
28417
|
.UNINDENT
|
@@ -25494,7 +28466,7 @@ groongaのリポジトリは \fI\%GitHub\fP 上にあります。次のコマン
|
|
25494
28466
|
.UNINDENT
|
25495
28467
|
.UNINDENT
|
25496
28468
|
.sp
|
25497
|
-
\fI\%groonga関係のプロジェクト(grntest, fluent
|
28469
|
+
\fI\%groonga関係のプロジェクト(grntest, fluent\-plugin\-groongaなど)\fP のリストはリンク先をごらんください。
|
25498
28470
|
.SS groonga 通信アーキテクチャ
|
25499
28471
|
.SS gqtpでのアーキテクチャ
|
25500
28472
|
.INDENT 0.0
|
@@ -25520,6 +28492,81 @@ edgeごとにqueueを持つ。
|
|
25520
28492
|
msgはcomによって、edgeのqueueにenqueueされる。
|
25521
28493
|
edgeがworkerに結びついていないときは、同時に、ctx_newというqueueに、msgをenqueueした対象のedgeをenqueueする。
|
25522
28494
|
.UNINDENT
|
28495
|
+
.SS ユーザーと協力して開発をうまく進めていくための指針
|
28496
|
+
.sp
|
28497
|
+
groongaを使ってくれているユーザーと協力して
|
28498
|
+
開発をうまく進めていくためにこうするといい、という事柄をまとめました。
|
28499
|
+
まとめておくと、新しく開発に加わる人とも共有することができます。
|
28500
|
+
.SS twitter編
|
28501
|
+
.sp
|
28502
|
+
groongaを使ってもらえるようにtwitterのアカウントgroongaを取得して
|
28503
|
+
日々、リリースの案内をしたり、ユーザーサポートをしたりしています。
|
28504
|
+
.sp
|
28505
|
+
リリースの案内に利用する場合には、やりとりを考えなくて良いですが、
|
28506
|
+
複数人によるサポートをgroongaで行う場合に、どうサポートするのが
|
28507
|
+
良いのか/どうしてそうするのかという共通認識を持っていないと一貫性のないサポートとなってしま
|
28508
|
+
います。
|
28509
|
+
.sp
|
28510
|
+
twitterでサポートされている安心感からgroongaユーザーの拡大に繋げる
|
28511
|
+
ことができるようにサポートの際に気をつけることをまとめます。
|
28512
|
+
.SS 過去のツイートはおさらいしておく
|
28513
|
+
.SS 理由
|
28514
|
+
.sp
|
28515
|
+
自分がツイートした内容を把握していない返信をされたら普通いい気はしません。
|
28516
|
+
.SS 対応
|
28517
|
+
.sp
|
28518
|
+
過去のツイートをおさらいし、こうすれば良いという提案をできるのが望ましいです。:
|
28519
|
+
.INDENT 0.0
|
28520
|
+
.INDENT 3.5
|
28521
|
+
.sp
|
28522
|
+
.nf
|
28523
|
+
.ft C
|
28524
|
+
良い例: ○○だと原因は□□ですね。××すると大丈夫です。
|
28525
|
+
.ft P
|
28526
|
+
.fi
|
28527
|
+
.UNINDENT
|
28528
|
+
.UNINDENT
|
28529
|
+
.SS こちらから情報を提供する
|
28530
|
+
.SS 理由
|
28531
|
+
.sp
|
28532
|
+
困っているユーザーが複数回ツイートして限られたなかで情報を提供してくれていることがあります。
|
28533
|
+
その限られたツイートから解決方法が見つかればユーザーにとって余計な手間が少なくて済みます。
|
28534
|
+
あれこれ情報提供を要求すると、ユーザーはそのぶん確認する作業が必要になります。
|
28535
|
+
.SS 対応
|
28536
|
+
.sp
|
28537
|
+
最初に声をかけるときに解決策を1つか2つ提案できると望ましいです。ユーザーにあまり負担を感じさせないようにすると良いです。:
|
28538
|
+
.INDENT 0.0
|
28539
|
+
.INDENT 3.5
|
28540
|
+
.sp
|
28541
|
+
.nf
|
28542
|
+
.ft C
|
28543
|
+
良い例: ○○の場合は□□の可能性があるので、××を試してもらえますか?
|
28544
|
+
.ft P
|
28545
|
+
.fi
|
28546
|
+
.UNINDENT
|
28547
|
+
.UNINDENT
|
28548
|
+
.SS twitterでのやりとりはできるだけ他の場所(例えばredmine)へと誘導しない
|
28549
|
+
.SS 理由
|
28550
|
+
.sp
|
28551
|
+
twitterは気軽につぶやけることが重要なので、気軽にできないことを相手に要求すると萎縮されてしまう可能性があります。
|
28552
|
+
.sp
|
28553
|
+
いきなりredmineでバグ報告をお願いすると、しりごみしてしまうかも知れません。:
|
28554
|
+
.INDENT 0.0
|
28555
|
+
.INDENT 3.5
|
28556
|
+
.sp
|
28557
|
+
.nf
|
28558
|
+
.ft C
|
28559
|
+
駄目な例: 再現手順をMLかredmineに報告してもらえますか?
|
28560
|
+
.ft P
|
28561
|
+
.fi
|
28562
|
+
.UNINDENT
|
28563
|
+
.UNINDENT
|
28564
|
+
.sp
|
28565
|
+
groonga関連で気軽につぶやけないとなると開発者は困っている人を見つけられないし、利用者は困ったままとなるので、双方にとって嬉しくない状態になっ
|
28566
|
+
てしまいます。
|
28567
|
+
.SS 対応
|
28568
|
+
.sp
|
28569
|
+
twitterでやりとりを完結できるようにします。
|
25523
28570
|
.SS ドキュメント作成
|
25524
28571
|
.SS Sphinxのインストール
|
25525
28572
|
.sp
|
@@ -26591,7 +29638,7 @@ news.txtに変更点をまとめましたが、それを元にリリースアナ
|
|
26591
29638
|
.INDENT 3.5
|
26592
29639
|
.INDENT 0.0
|
26593
29640
|
.IP \(bu 2
|
26594
|
-
\fI\%http://sourceforge.jp/projects/groonga/lists/archive/dev/2012
|
29641
|
+
\fI\%http://sourceforge.jp/projects/groonga/lists/archive/dev/2012\-April/000794.html\fP
|
26595
29642
|
.UNINDENT
|
26596
29643
|
.UNINDENT
|
26597
29644
|
.UNINDENT
|
@@ -26733,14 +29780,35 @@ doc/source以下のドキュメントを更新、翻訳まで完了している
|
|
26733
29780
|
これによりcloneしておいたgroonga.github.comのdoc/locale以下に更新したドキュメントがコピーされます。
|
26734
29781
|
.sp
|
26735
29782
|
生成されているドキュメントに問題のないことを確認できたら、コミット、pushしてgroonga.orgへと反映します。
|
29783
|
+
.SS Homebrewの更新
|
29784
|
+
.sp
|
29785
|
+
OS Xでのパッケージ管理方法として \fI\%Homebrew\fP があります。
|
29786
|
+
.sp
|
29787
|
+
groongaを簡単にインストールできるようにするために、Homebrewへpull requestを送ります。
|
29788
|
+
.INDENT 0.0
|
29789
|
+
.INDENT 3.5
|
29790
|
+
\fI\%https://github.com/mxcl/homebrew\fP
|
29791
|
+
.UNINDENT
|
29792
|
+
.UNINDENT
|
29793
|
+
.sp
|
29794
|
+
すでにgroongaのFormulaは取り込まれているので、リリースのたびにFormulaの内容を更新する作業を実施します。
|
29795
|
+
.sp
|
29796
|
+
groonga 3.0.6のときは以下のように更新してpull requestを送りました。
|
29797
|
+
.INDENT 0.0
|
29798
|
+
.INDENT 3.5
|
29799
|
+
\fI\%https://github.com/mxcl/homebrew/pull/21456/files\fP
|
29800
|
+
.UNINDENT
|
29801
|
+
.UNINDENT
|
29802
|
+
.sp
|
29803
|
+
上記URLを参照するとわかるようにソースアーカイブのurlとsha1チェックサムを更新します。
|
26736
29804
|
.SS リリースアナウンス
|
26737
29805
|
.sp
|
26738
29806
|
作成したリリースアナウンスをメーリングリストへと流します。
|
26739
29807
|
.INDENT 0.0
|
26740
29808
|
.IP \(bu 2
|
26741
|
-
groonga\-dev \fI\%groonga
|
29809
|
+
groonga\-dev \fI\%groonga\-dev@lists.sourceforge.jp\fP
|
26742
29810
|
.IP \(bu 2
|
26743
|
-
Groonga\-talk \fI\%groonga
|
29811
|
+
Groonga\-talk \fI\%groonga\-talk@lists.sourceforge.net\fP
|
26744
29812
|
.UNINDENT
|
26745
29813
|
.SS freecode.comへリリース情報を登録
|
26746
29814
|
.sp
|
@@ -27140,7 +30208,7 @@ doc/locale/${LANGUAGE}/LC_MESSAGESディレクトリで \fImake update\fP を実
|
|
27140
30208
|
.poファイルを編集するためのツールがあります。.poファイルは単なるテキストなので好きなエディタで編集できます。以下は.poファイルの編集に特化したエディタのリストです。
|
27141
30209
|
.INDENT 0.0
|
27142
30210
|
.TP
|
27143
|
-
.B Emacs\(aqs \fI\%po
|
30211
|
+
.B Emacs\(aqs \fI\%po\-mode\fP
|
27144
30212
|
gettextに同梱されています。
|
27145
30213
|
.TP
|
27146
30214
|
.B \fI\%Poedit\fP
|
@@ -27151,7 +30219,7 @@ gettextに同梱されています。
|
|
27151
30219
|
.UNINDENT
|
27152
30220
|
.SS HTMLファイルの生成方法
|
27153
30221
|
.sp
|
27154
|
-
doc/locale/${LANGUAGE}
|
30222
|
+
doc/locale/${LANGUAGE}ディレクトリで \fImake html\fP を実行すると更新した.poファイルを使ってHTMLファイルを生成できます。(\fI${LANGUAGE}\fP は\(aqja\(aqなど自分の言語の言語コードに置き換えてください。):
|
27155
30223
|
.INDENT 0.0
|
27156
30224
|
.INDENT 3.5
|
27157
30225
|
.sp
|