rroonga 3.1.0-x64-mingw32 → 3.1.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.textile +1 -1
- data/Rakefile +1 -8
- data/bin/grndump +5 -4
- data/bin/grntest-log-analyze +5 -4
- data/bin/groonga-database-inspect +11 -2
- data/bin/groonga-index-dump +1 -0
- data/doc/text/news.textile +21 -0
- data/ext/groonga/extconf.rb +1 -6
- data/ext/groonga/rb-grn-expression.c +3 -3
- 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/lib/groonga/database-inspector.rb +34 -8
- data/rroonga-build.rb +1 -1
- data/test/test-database-inspector.rb +55 -5
- data/test/test-expression.rb +65 -0
- 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 +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga.h +15 -4
- 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 +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.la +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/table/table.la +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmecab.la +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +0 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +2 -2
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/sbin/groonga-httpd-restart +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +11 -11
- data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +7 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/com.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/cooperation.txt +5 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/document.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/query.txt +6 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/release.txt +39 -39
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/development/test.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/development.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/development/travis-ci.txt +2 -2
- 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 -43
- 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 -50
- data/vendor/local/share/doc/groonga/en/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +39 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.0.x.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_column.txt +91 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_ctx.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/api/grn_obj.txt +2 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/command/command_version.txt +6 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/check.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/clearlock.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_create.txt +2 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_list.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/column_remove.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/define_selector.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/defrag.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/dump.txt +3 -8
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_level.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/log_reopen.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/normalize.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/quit.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/select.txt +5 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/shutdown.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/status.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_create.txt +5 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/commands/table_list.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/groonga-benchmark.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/functions/between.txt +118 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/grn_expr/script_syntax.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/normalizers.txt +11 -11
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/tuning.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/types.txt +5 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +5 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +76 -14
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +8 -8
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/lexicon.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +8 -8
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +8 -8
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +18 -19
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/community.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/contribution.html +73 -73
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/contribution/development/cooperation.html +43 -43
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +69 -69
- data/vendor/local/share/doc/groonga/en/html/contribution/development/release.html +132 -132
- data/vendor/local/share/doc/groonga/en/html/contribution/development/repository.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +43 -53
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +17 -17
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +46 -36
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/development/travis-ci.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/genindex.html +47 -7
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +50 -46
- data/vendor/local/share/doc/groonga/en/html/install.html +19 -21
- data/vendor/local/share/doc/groonga/en/html/install/centos.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/install/debian.html +16 -52
- 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 +18 -62
- data/vendor/local/share/doc/groonga/en/html/install/windows.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +225 -179
- 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 +6 -6
- 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 +16 -15
- data/vendor/local/share/doc/groonga/en/html/reference/api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_cache.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_column.html +105 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ctx.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_db.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_encoding.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_geo.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_hook.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_ii.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_index_cursor.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_info.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_match_escalation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_obj.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_proc.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_table_cursor.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_type.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/api/grn_user_data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/command_version.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/command/output_format.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/check.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/clearlock.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_create.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/column_remove.html +6 -6
- 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 +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/defrag.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/dump.html +8 -8
- 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 +6 -6
- 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 +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/normalize.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/quit.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/register.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_eval.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/ruby_load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/select.html +8 -8
- data/vendor/local/share/doc/groonga/en/html/reference/commands/shutdown.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/status.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_create.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_list.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/tokenize.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands/truncate.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-benchmark.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-httpd.html +9 -9
- 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-suggest-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/executables/groonga-suggest-learner.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 +21 -20
- data/vendor/local/share/doc/groonga/en/html/reference/functions/between.html +331 -0
- data/vendor/local/share/doc/groonga/en/html/reference/functions/edit_distance.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_distance.html +45 -45
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_circle.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/functions/geo_in_rectangle.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/functions/html_untag.html +29 -29
- data/vendor/local/share/doc/groonga/en/html/reference/functions/now.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/reference/functions/query.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/reference/functions/rand.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/functions/snippet_html.html +27 -27
- data/vendor/local/share/doc/groonga/en/html/reference/functions/sub_filter.html +28 -28
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/grn_expr/script_syntax.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/indexing.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference/normalizers.html +17 -17
- 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/tuning.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/reference/types.html +10 -10
- 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 +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/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/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +12 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +168 -14
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +15 -15
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +34 -35
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +11 -11
- data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +7 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/com.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/cooperation.txt +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/document.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/query.txt +6 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/release.txt +39 -39
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/development/test.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/development.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/development/travis-ci.txt +2 -2
- 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 -43
- 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 -50
- data/vendor/local/share/doc/groonga/ja/html/_sources/install/windows.txt +9 -9
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +39 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.0.x.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_column.txt +91 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_ctx.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/api/grn_obj.txt +2 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/command/command_version.txt +6 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/check.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/clearlock.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_create.txt +2 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_list.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/column_remove.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/define_selector.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/defrag.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/dump.txt +3 -8
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_level.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/log_reopen.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/normalize.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/quit.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/select.txt +5 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/shutdown.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/status.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_create.txt +5 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/commands/table_list.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/groonga-benchmark.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/functions/between.txt +118 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/grn_expr/script_syntax.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/normalizers.txt +11 -11
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/tuning.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/types.txt +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +76 -14
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +8 -8
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/lexicon.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +8 -8
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +8 -8
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +18 -19
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/community.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +76 -76
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +26 -26
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/cooperation.html +45 -45
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +71 -71
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/release.html +134 -134
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/repository.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +45 -55
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +19 -19
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +54 -44
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +19 -19
- data/vendor/local/share/doc/groonga/ja/html/development.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/development/travis-ci.html +14 -14
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +47 -7
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/index.html +55 -51
- data/vendor/local/share/doc/groonga/ja/html/install.html +20 -22
- data/vendor/local/share/doc/groonga/ja/html/install/centos.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/install/debian.html +28 -60
- data/vendor/local/share/doc/groonga/ja/html/install/fedora.html +18 -18
- 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 +21 -21
- data/vendor/local/share/doc/groonga/ja/html/install/solaris.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/install/ubuntu.html +33 -73
- data/vendor/local/share/doc/groonga/ja/html/install/windows.html +15 -15
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news.html +242 -182
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/reference.html +16 -15
- data/vendor/local/share/doc/groonga/ja/html/reference/api.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_cache.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_column.html +105 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ctx.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_db.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_encoding.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_geo.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_hook.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_ii.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_index_cursor.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_info.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_match_escalation.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_obj.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_proc.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_table_cursor.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/api/grn_user_data.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/cast.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/command.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/command/command_version.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/command/output_format.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/command/return_code.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/check.html +6 -6
- 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 +9 -9
- 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 +5 -5
- 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 +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/dump.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_level.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/log_reopen.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/normalize.html +5 -5
- 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 +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_eval.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/ruby_load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/select.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/shutdown.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/status.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_create.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_list.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/tokenize.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands/truncate.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/get.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/commands_not_implemented/set.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-benchmark.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-httpd.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-server-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga-suggest-learner.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/function.html +21 -20
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/between.html +329 -0
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/edit_distance.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_distance.html +45 -45
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_circle.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/geo_in_rectangle.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/html_untag.html +29 -29
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/now.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/query.html +41 -41
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/rand.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/snippet_html.html +27 -27
- data/vendor/local/share/doc/groonga/ja/html/reference/functions/sub_filter.html +28 -28
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/query_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/grn_expr/script_syntax.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/indexing.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/reference/log.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/normalizers.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/reference/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/query_expanders/tsv.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tokenizers.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference/tuning.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 +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/comparison.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga-httpd.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/http/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/server/package.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec/gqtp.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/mmap_cannot_allocate_memory.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +12 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +169 -14
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +15 -15
- 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 +7 -7
- 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 +33 -34
- 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 +7 -7
- 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/man/ja/man1/groonga.1 +1156 -808
- data/vendor/local/share/man/man1/groonga.1 +1682 -1337
- metadata +142 -142
- data/vendor/local/share/doc/groonga/en/html/_sources/reference/executables/grntest.txt +0 -273
- data/vendor/local/share/doc/groonga/en/html/reference/executables/grntest.html +0 -410
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference/executables/grntest.txt +0 -273
- data/vendor/local/share/doc/groonga/ja/html/reference/executables/grntest.html +0 -411
@@ -1,4 +1,4 @@
|
|
1
|
-
.TH "GROONGA" "1" "
|
1
|
+
.TH "GROONGA" "1" "December 27, 2013" "3.1.1" "Groonga"
|
2
2
|
.SH NAME
|
3
3
|
groonga \- Groonga documentation
|
4
4
|
.
|
@@ -37,23 +37,23 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
37
37
|
.SH CHARACTERISTICS OF GROONGA
|
38
38
|
.SS Groonga overview
|
39
39
|
.sp
|
40
|
-
Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of
|
40
|
+
Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of Groonga is that a newly registered document instantly appears in search results. Also, Groonga allows updates without read locks. These characteristics result in superior performance on real\-time applications.
|
41
41
|
.sp
|
42
|
-
Groonga is also a column\-oriented database management system (DBMS). Compared with well\-known row\-oriented systems, such as MySQL and PostgreSQL, column\-oriented systems are more suited for aggregate queries. Due to this advantage,
|
42
|
+
Groonga is also a column\-oriented database management system (DBMS). Compared with well\-known row\-oriented systems, such as MySQL and PostgreSQL, column\-oriented systems are more suited for aggregate queries. Due to this advantage, Groonga can cover weakness of row\-oriented systems.
|
43
43
|
.sp
|
44
|
-
The basic functions of
|
44
|
+
The basic functions of Groonga are provided in a C library. Also, libraries for using Groonga in other languages, such as Ruby, are provided by related projects. In addition, groonga\-based storage engines are provided for MySQL and PostgreSQL. These libraries and storage engines allow any application to use Groonga. See \fI\%usage examples\fP.
|
45
45
|
.SS Full text search and Instant update
|
46
46
|
.sp
|
47
47
|
In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query. In contrast, some full text search engines do not support instant updates, because it is difficult to dynamically update inverted indexes, the underlying data structure.
|
48
48
|
.sp
|
49
|
-
Groonga also uses inverted indexes but supports instant updates. In addition,
|
49
|
+
Groonga also uses inverted indexes but supports instant updates. In addition, Groonga allows you to search documents even when updating the document collection. Due to these superior characteristics, Groonga is very flexible as a full text search engine. Also, Groonga always shows good performance because it divides a large task, inverted index merging, into smaller tasks.
|
50
50
|
.SS Column store and aggregate query
|
51
51
|
.sp
|
52
52
|
People can collect more than enough data in the Internet era. However, it is difficult to extract informative knowledge from a large database, and such a task requires a many\-sided analysis through trial and error. For example, search refinement by date, time and location may reveal hidden patterns. Aggregate queries are useful to perform this kind of tasks.
|
53
53
|
.sp
|
54
54
|
An aggregate query groups search results by specified column values and then counts the number of records in each group. For example, an aggregate query in which a location column is specified counts the number of records per location. Making a graph from the result of an aggregate query against a date column is an easy way to visualize changes over time. Also, a combination of refinement by location and an aggregate query against a date column allows visualization of changes over time in specific location. Thus refinement and aggregation are important to perform data mining.
|
55
55
|
.sp
|
56
|
-
A column\-oriented architecture allows
|
56
|
+
A column\-oriented architecture allows Groonga to efficiently process aggregate queries because a column\-oriented database, which stores records by column, allows an aggregate query to access only a specified column. On the other hand, an aggregate query on a row\-oriented database, which stores records by row, has to access neighbor columns, even though those columns are not required.
|
57
57
|
.SS Inverted index and tokenizer
|
58
58
|
.sp
|
59
59
|
An inverted index is a traditional data structure used for large\-scale full text search. A search engine based on inverted index extracts index terms from a document when it is added. Then in retrieval, a query is divided into index terms to find documents containing those index terms. In this way, index terms play an important role in full text search and thus the way of extracting index terms is a key to a better search engine.
|
@@ -65,21 +65,21 @@ Groonga supports both word and n\-gram tokenizers. The simplest built\-in tokeni
|
|
65
65
|
.sp
|
66
66
|
Multi\-core processors are mainstream today and the number of cores per processor is increasing. In order to exploit multiple cores, executing multiple queries in parallel or dividing a query into sub\-queries for parallel processing is becoming more important.
|
67
67
|
.sp
|
68
|
-
A database of
|
68
|
+
A database of Groonga can be shared with multiple threads/processes. Also, multiple threads/processes can execute read queries in parallel even when another thread/process is executing an update query because Groonga uses read lock\-free data structures. This feature is suited to a real\-time application that needs to update a database while executing read queries. In addition, Groonga allows you to build flexible systems. For example, a database can receive read queries through the built\-in HTTP server of Groonga while accepting update queries through MySQL.
|
69
69
|
.SS Geo\-location (latitude and longitude) search
|
70
70
|
.sp
|
71
71
|
Location services are getting more convenient because of mobile devices with GPS. For example, if you are going to have lunch or dinner at a nearby restaurant, a local search service for restaurants may be very useful, and for such services, fast geo\-location search is becoming more important.
|
72
72
|
.sp
|
73
|
-
Groonga provides inverted index\-based fast geo\-location search, which supports a query to find points in a rectangle or circle. Groonga gives high priority to points near the center of an area. Also,
|
73
|
+
Groonga provides inverted index\-based fast geo\-location search, which supports a query to find points in a rectangle or circle. Groonga gives high priority to points near the center of an area. Also, Groonga supports distance measurement and you can sort points by distance from any point.
|
74
74
|
.SS Groonga library
|
75
75
|
.sp
|
76
|
-
The basic functions of
|
76
|
+
The basic functions of Groonga are provided in a C library and any application can use Groonga as a full text search engine or a column\-oriented database. Also, libraries for languages other than C/C++, such as Ruby, are provided in related projects. See \fI\%related projects\fP for details.
|
77
77
|
.SS Groonga server
|
78
78
|
.sp
|
79
|
-
Groonga provides a built\-in server command which supports HTTP, the memcached binary protocol and the
|
79
|
+
Groonga provides a built\-in server command which supports HTTP, the memcached binary protocol and the Groonga Query Transfer Protocol (GQTP). Also, a Groonga server supports query caching, which significantly reduces response time for repeated read queries. Using this command, Groonga is available even on a server that does not allow you to install new libraries.
|
80
80
|
.SS Groonga storage engine
|
81
81
|
.sp
|
82
|
-
Groonga works not only as an independent column\-oriented DBMS but also as storage engines of well\-known DBMSs. For example, \fI\%mroonga\fP is a MySQL pluggable storage engine using
|
82
|
+
Groonga works not only as an independent column\-oriented DBMS but also as storage engines of well\-known DBMSs. For example, \fI\%mroonga\fP is a MySQL pluggable storage engine using Groonga. By using mroonga, you can use Groonga for column\-oriented storage and full text search. A combination of a built\-in storage engine, MyISAM or InnoDB, and a groonga\-based full text search engine is also available. All the combinations have good and bad points and the best one depends on the application. See \fI\%related projects\fP for details.
|
83
83
|
.SH INSTALL
|
84
84
|
.sp
|
85
85
|
This section describes how to install groonga on each
|
@@ -110,7 +110,7 @@ packages.groonga.org:
|
|
110
110
|
.INDENT 3.5
|
111
111
|
.INDENT 0.0
|
112
112
|
.IP \(bu 2
|
113
|
-
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.
|
113
|
+
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.1\-x86.exe\fP
|
114
114
|
.UNINDENT
|
115
115
|
.UNINDENT
|
116
116
|
.UNINDENT
|
@@ -123,7 +123,7 @@ packages.goronga.org:
|
|
123
123
|
.INDENT 3.5
|
124
124
|
.INDENT 0.0
|
125
125
|
.IP \(bu 2
|
126
|
-
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.
|
126
|
+
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.1\-x64.exe\fP
|
127
127
|
.UNINDENT
|
128
128
|
.UNINDENT
|
129
129
|
.UNINDENT
|
@@ -140,7 +140,7 @@ packages.groonga.org:
|
|
140
140
|
.INDENT 3.5
|
141
141
|
.INDENT 0.0
|
142
142
|
.IP \(bu 2
|
143
|
-
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.
|
143
|
+
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.1\-x86.zip\fP
|
144
144
|
.UNINDENT
|
145
145
|
.UNINDENT
|
146
146
|
.UNINDENT
|
@@ -153,7 +153,7 @@ packages.groonga.org:
|
|
153
153
|
.INDENT 3.5
|
154
154
|
.INDENT 0.0
|
155
155
|
.IP \(bu 2
|
156
|
-
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.
|
156
|
+
\fI\%http://packages.groonga.org/windows/groonga/groonga\-3.1.1\-x64.zip\fP
|
157
157
|
.UNINDENT
|
158
158
|
.UNINDENT
|
159
159
|
.UNINDENT
|
@@ -181,7 +181,7 @@ Download zipped source from packages.groonga.org:
|
|
181
181
|
.INDENT 3.5
|
182
182
|
.INDENT 0.0
|
183
183
|
.IP \(bu 2
|
184
|
-
\fI\%http://packages.groonga.org/source/groonga/groonga\-3.1.
|
184
|
+
\fI\%http://packages.groonga.org/source/groonga/groonga\-3.1.1.zip\fP
|
185
185
|
.UNINDENT
|
186
186
|
.UNINDENT
|
187
187
|
.UNINDENT
|
@@ -194,7 +194,7 @@ Move to the Groonga\(aqs source folder:
|
|
194
194
|
.sp
|
195
195
|
.nf
|
196
196
|
.ft C
|
197
|
-
> cd c:\eUsers\e%USERNAME%\eDownloads\egroonga\-3.1.
|
197
|
+
> cd c:\eUsers\e%USERNAME%\eDownloads\egroonga\-3.1.1
|
198
198
|
.ft P
|
199
199
|
.fi
|
200
200
|
.UNINDENT
|
@@ -208,7 +208,7 @@ parameter instead:
|
|
208
208
|
.sp
|
209
209
|
.nf
|
210
210
|
.ft C
|
211
|
-
groonga\-3.1.
|
211
|
+
groonga\-3.1.1> cmake . \-G "Visual Studio 10 Win64" \-DCMAKE_INSTALL_PREFIX=C:\egroonga
|
212
212
|
.ft P
|
213
213
|
.fi
|
214
214
|
.UNINDENT
|
@@ -220,7 +220,7 @@ Build:
|
|
220
220
|
.sp
|
221
221
|
.nf
|
222
222
|
.ft C
|
223
|
-
groonga\-3.1.
|
223
|
+
groonga\-3.1.1> cmake \-\-build . \-\-config Release
|
224
224
|
.ft P
|
225
225
|
.fi
|
226
226
|
.UNINDENT
|
@@ -232,7 +232,7 @@ Install:
|
|
232
232
|
.sp
|
233
233
|
.nf
|
234
234
|
.ft C
|
235
|
-
groonga\-3.1.
|
235
|
+
groonga\-3.1.1> cmake \-\-build . \-\-config Release \-\-target Install
|
236
236
|
.ft P
|
237
237
|
.fi
|
238
238
|
.UNINDENT
|
@@ -286,9 +286,9 @@ Download source:
|
|
286
286
|
.sp
|
287
287
|
.nf
|
288
288
|
.ft C
|
289
|
-
% curl \-O http://packages.groonga.org/source/groonga/groonga\-3.1.
|
290
|
-
% tar xvzf groonga\-3.1.
|
291
|
-
% cd groonga\-3.1.
|
289
|
+
% curl \-O http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
290
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
291
|
+
% cd groonga\-3.1.1
|
292
292
|
.ft P
|
293
293
|
.fi
|
294
294
|
.UNINDENT
|
@@ -360,83 +360,6 @@ groonga\-server\-gqtp (GQTP protocol based server package)
|
|
360
360
|
See \fB/server\fP section about details.
|
361
361
|
.UNINDENT
|
362
362
|
.UNINDENT
|
363
|
-
.SS squeeze
|
364
|
-
.sp
|
365
|
-
Add the groonga apt repository.
|
366
|
-
.sp
|
367
|
-
/etc/apt/sources.list.d/groonga.list:
|
368
|
-
.INDENT 0.0
|
369
|
-
.INDENT 3.5
|
370
|
-
.sp
|
371
|
-
.nf
|
372
|
-
.ft C
|
373
|
-
deb http://packages.groonga.org/debian/ squeeze main
|
374
|
-
deb\-src http://packages.groonga.org/debian/ squeeze main
|
375
|
-
.ft P
|
376
|
-
.fi
|
377
|
-
.UNINDENT
|
378
|
-
.UNINDENT
|
379
|
-
.sp
|
380
|
-
Install:
|
381
|
-
.INDENT 0.0
|
382
|
-
.INDENT 3.5
|
383
|
-
.sp
|
384
|
-
.nf
|
385
|
-
.ft C
|
386
|
-
% sudo aptitude update
|
387
|
-
% sudo aptitude \-V \-D \-y \-\-allow\-untrusted install groonga\-keyring
|
388
|
-
% sudo aptitude update
|
389
|
-
% sudo aptitude \-V \-D \-y install groonga
|
390
|
-
.ft P
|
391
|
-
.fi
|
392
|
-
.UNINDENT
|
393
|
-
.UNINDENT
|
394
|
-
.sp
|
395
|
-
If you want to use \fI\%MeCab\fP as a
|
396
|
-
tokenizer, install groonga\-tokenizer\-mecab package.
|
397
|
-
.sp
|
398
|
-
Install groonga\-tokenizer\-mecab package:
|
399
|
-
.INDENT 0.0
|
400
|
-
.INDENT 3.5
|
401
|
-
.sp
|
402
|
-
.nf
|
403
|
-
.ft C
|
404
|
-
% sudo aptitude \-V \-D \-y install groonga\-tokenizer\-mecab
|
405
|
-
.ft P
|
406
|
-
.fi
|
407
|
-
.UNINDENT
|
408
|
-
.UNINDENT
|
409
|
-
.sp
|
410
|
-
There is a package that provides \fI\%Munin\fP plugins. If you want to monitor
|
411
|
-
groonga status by Munin, install groonga\-munin\-plugins package.
|
412
|
-
.sp
|
413
|
-
Install groonga\-munin\-plugins package:
|
414
|
-
.INDENT 0.0
|
415
|
-
.INDENT 3.5
|
416
|
-
.sp
|
417
|
-
.nf
|
418
|
-
.ft C
|
419
|
-
% sudo aptitude \-V \-D \-y install groonga\-munin\-plugins
|
420
|
-
.ft P
|
421
|
-
.fi
|
422
|
-
.UNINDENT
|
423
|
-
.UNINDENT
|
424
|
-
.sp
|
425
|
-
There is a package that provides MySQL compatible normalizer as
|
426
|
-
groonga plugins.
|
427
|
-
If you want to use that one, install groonga\-normalizer\-mysql package.
|
428
|
-
.sp
|
429
|
-
Install groonga\-normalizer\-mysql package:
|
430
|
-
.INDENT 0.0
|
431
|
-
.INDENT 3.5
|
432
|
-
.sp
|
433
|
-
.nf
|
434
|
-
.ft C
|
435
|
-
% sudo aptitude \-V \-D \-y install groonga\-normalizer\-mysql
|
436
|
-
.ft P
|
437
|
-
.fi
|
438
|
-
.UNINDENT
|
439
|
-
.UNINDENT
|
440
363
|
.SS wheezy
|
441
364
|
.sp
|
442
365
|
Add the groonga apt repository.
|
@@ -688,9 +611,9 @@ Download source:
|
|
688
611
|
.sp
|
689
612
|
.nf
|
690
613
|
.ft C
|
691
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
692
|
-
% tar xvzf groonga\-3.1.
|
693
|
-
% cd groonga\-3.1.
|
614
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
615
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
616
|
+
% cd groonga\-3.1.1
|
694
617
|
.ft P
|
695
618
|
.fi
|
696
619
|
.UNINDENT
|
@@ -762,101 +685,6 @@ groonga\-server\-gqtp (GQTP protocol based server package)
|
|
762
685
|
See \fB/server\fP section about details.
|
763
686
|
.UNINDENT
|
764
687
|
.UNINDENT
|
765
|
-
.SS 10.04 LTS Lucid Lynx
|
766
|
-
.sp
|
767
|
-
\fBNOTE:\fP
|
768
|
-
.INDENT 0.0
|
769
|
-
.INDENT 3.5
|
770
|
-
Enable the universe repository to install groonga:
|
771
|
-
.INDENT 0.0
|
772
|
-
.INDENT 3.5
|
773
|
-
.sp
|
774
|
-
.nf
|
775
|
-
.ft C
|
776
|
-
% sudo cp /etc/apt/sources.list /etc/apt/sources.list.d/universe.list
|
777
|
-
% sudo sed \-i\(aq\(aq \-e \(aqs/main/universe/\(aq /etc/apt/sources.list.d/universe.list
|
778
|
-
.ft P
|
779
|
-
.fi
|
780
|
-
.UNINDENT
|
781
|
-
.UNINDENT
|
782
|
-
.UNINDENT
|
783
|
-
.UNINDENT
|
784
|
-
.sp
|
785
|
-
Add the groonga apt repository.
|
786
|
-
.sp
|
787
|
-
/etc/apt/sources.list.d/groonga.list:
|
788
|
-
.INDENT 0.0
|
789
|
-
.INDENT 3.5
|
790
|
-
.sp
|
791
|
-
.nf
|
792
|
-
.ft C
|
793
|
-
deb http://packages.groonga.org/ubuntu/ lucid universe
|
794
|
-
deb\-src http://packages.groonga.org/ubuntu/ lucid universe
|
795
|
-
.ft P
|
796
|
-
.fi
|
797
|
-
.UNINDENT
|
798
|
-
.UNINDENT
|
799
|
-
.sp
|
800
|
-
Install:
|
801
|
-
.INDENT 0.0
|
802
|
-
.INDENT 3.5
|
803
|
-
.sp
|
804
|
-
.nf
|
805
|
-
.ft C
|
806
|
-
% sudo apt\-get update
|
807
|
-
% sudo apt\-get \-y \-\-allow\-unauthenticated install groonga\-keyring
|
808
|
-
% sudo apt\-get update
|
809
|
-
% sudo apt\-get \-y install groonga
|
810
|
-
.ft P
|
811
|
-
.fi
|
812
|
-
.UNINDENT
|
813
|
-
.UNINDENT
|
814
|
-
.sp
|
815
|
-
If you want to use \fI\%MeCab\fP as a
|
816
|
-
tokenizer, install groonga\-tokenizer\-mecab package.
|
817
|
-
.sp
|
818
|
-
Install groonga\-tokenizer\-mecab package:
|
819
|
-
.INDENT 0.0
|
820
|
-
.INDENT 3.5
|
821
|
-
.sp
|
822
|
-
.nf
|
823
|
-
.ft C
|
824
|
-
% sudo apt\-get \-y install groonga\-tokenizer\-mecab
|
825
|
-
.ft P
|
826
|
-
.fi
|
827
|
-
.UNINDENT
|
828
|
-
.UNINDENT
|
829
|
-
.sp
|
830
|
-
There is a package that provides \fI\%Munin\fP plugins. If you want to monitor
|
831
|
-
groonga status by Munin, install groonga\-munin\-plugins package.
|
832
|
-
.sp
|
833
|
-
Install groonga\-munin\-plugins package:
|
834
|
-
.INDENT 0.0
|
835
|
-
.INDENT 3.5
|
836
|
-
.sp
|
837
|
-
.nf
|
838
|
-
.ft C
|
839
|
-
% sudo apt\-get \-y install groonga\-munin\-plugins
|
840
|
-
.ft P
|
841
|
-
.fi
|
842
|
-
.UNINDENT
|
843
|
-
.UNINDENT
|
844
|
-
.sp
|
845
|
-
There is a package that provides MySQL compatible normalizer as
|
846
|
-
groonga plugins.
|
847
|
-
If you want to use that one, install groonga\-normalizer\-mysql package.
|
848
|
-
.sp
|
849
|
-
Install groonga\-normalizer\-mysql package:
|
850
|
-
.INDENT 0.0
|
851
|
-
.INDENT 3.5
|
852
|
-
.sp
|
853
|
-
.nf
|
854
|
-
.ft C
|
855
|
-
% sudo apt\-get \-y install groonga\-normalizer\-mysql
|
856
|
-
.ft P
|
857
|
-
.fi
|
858
|
-
.UNINDENT
|
859
|
-
.UNINDENT
|
860
688
|
.SS 12.04 LTS Precise Pangolin
|
861
689
|
.sp
|
862
690
|
\fBNOTE:\fP
|
@@ -1239,9 +1067,9 @@ Download source:
|
|
1239
1067
|
.sp
|
1240
1068
|
.nf
|
1241
1069
|
.ft C
|
1242
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
1243
|
-
% tar xvzf groonga\-3.1.
|
1244
|
-
% cd groonga\-3.1.
|
1070
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
1071
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
1072
|
+
% cd groonga\-3.1.1
|
1245
1073
|
.ft P
|
1246
1074
|
.fi
|
1247
1075
|
.UNINDENT
|
@@ -1579,9 +1407,9 @@ Download source:
|
|
1579
1407
|
.sp
|
1580
1408
|
.nf
|
1581
1409
|
.ft C
|
1582
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
1583
|
-
% tar xvzf groonga\-3.1.
|
1584
|
-
% cd groonga\-3.1.
|
1410
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
1411
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
1412
|
+
% cd groonga\-3.1.1
|
1585
1413
|
.ft P
|
1586
1414
|
.fi
|
1587
1415
|
.UNINDENT
|
@@ -1666,7 +1494,7 @@ groonga\-server\-gqtp (GQTP protocol based server package)
|
|
1666
1494
|
See \fB/server\fP section about details.
|
1667
1495
|
.UNINDENT
|
1668
1496
|
.UNINDENT
|
1669
|
-
.SS Fedora
|
1497
|
+
.SS Fedora 20
|
1670
1498
|
.sp
|
1671
1499
|
Install:
|
1672
1500
|
.INDENT 0.0
|
@@ -1786,9 +1614,9 @@ Download source:
|
|
1786
1614
|
.sp
|
1787
1615
|
.nf
|
1788
1616
|
.ft C
|
1789
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
1790
|
-
% tar xvzf groonga\-3.1.
|
1791
|
-
% cd groonga\-3.1.
|
1617
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
1618
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
1619
|
+
% cd groonga\-3.1.1
|
1792
1620
|
.ft P
|
1793
1621
|
.fi
|
1794
1622
|
.UNINDENT
|
@@ -1853,9 +1681,9 @@ Download source:
|
|
1853
1681
|
.sp
|
1854
1682
|
.nf
|
1855
1683
|
.ft C
|
1856
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
1857
|
-
% gtar xvzf groonga\-3.1.
|
1858
|
-
% cd groonga\-3.1.
|
1684
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
1685
|
+
% gtar xvzf groonga\-3.1.1.tar.gz
|
1686
|
+
% cd groonga\-3.1.1
|
1859
1687
|
.ft P
|
1860
1688
|
.fi
|
1861
1689
|
.UNINDENT
|
@@ -1995,9 +1823,9 @@ steps:
|
|
1995
1823
|
.sp
|
1996
1824
|
.nf
|
1997
1825
|
.ft C
|
1998
|
-
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.
|
1999
|
-
% tar xvzf groonga\-3.1.
|
2000
|
-
% cd groonga\-3.1.
|
1826
|
+
% wget http://packages.groonga.org/source/groonga/groonga\-3.1.1.tar.gz
|
1827
|
+
% tar xvzf groonga\-3.1.1.tar.gz
|
1828
|
+
% cd groonga\-3.1.1
|
2001
1829
|
% ./configure
|
2002
1830
|
% make
|
2003
1831
|
% sudo make install
|
@@ -2292,11 +2120,11 @@ install\fP:
|
|
2292
2120
|
.UNINDENT
|
2293
2121
|
.SH COMMUNITY
|
2294
2122
|
.sp
|
2295
|
-
There are some places for sharing
|
2123
|
+
There are some places for sharing Groonga information.
|
2296
2124
|
We welcome you to join our community.
|
2297
2125
|
.SS Mailing List
|
2298
2126
|
.sp
|
2299
|
-
There are mailing lists for discussion about
|
2127
|
+
There are mailing lists for discussion about Groonga.
|
2300
2128
|
.INDENT 0.0
|
2301
2129
|
.TP
|
2302
2130
|
.B For English speakers
|
@@ -2307,24 +2135,24 @@ There are mailing lists for discussion about groonga.
|
|
2307
2135
|
.UNINDENT
|
2308
2136
|
.SS Twitter
|
2309
2137
|
.sp
|
2310
|
-
\fI\%@groonga\fP tweets
|
2138
|
+
\fI\%@groonga\fP tweets Groonga related
|
2311
2139
|
information.
|
2312
2140
|
.sp
|
2313
|
-
Please follow the account to get the latest
|
2141
|
+
Please follow the account to get the latest Groonga related
|
2314
2142
|
information!
|
2315
2143
|
.SS Facebook
|
2316
2144
|
.sp
|
2317
|
-
\fI\%
|
2318
|
-
|
2145
|
+
\fI\%Groonga page on Facebook\fP shares
|
2146
|
+
Groonga related information.
|
2319
2147
|
.sp
|
2320
|
-
Please like the page to get the latest
|
2148
|
+
Please like the page to get the latest Groonga related information!
|
2321
2149
|
.SH TUTORIAL
|
2322
2150
|
.SS Basic operations
|
2323
2151
|
.sp
|
2324
|
-
A
|
2152
|
+
A Groonga package provides a C library (libgroonga) and a command line tool (groonga). This tutorial explains how to use the command line tool, with which you can create/operate databases, start a server, establish a connection with a server, etc.
|
2325
2153
|
.SS Create a database
|
2326
2154
|
.sp
|
2327
|
-
The first step to using
|
2155
|
+
The first step to using Groonga is to create a new database. The following shows how to do it.
|
2328
2156
|
.sp
|
2329
2157
|
Form:
|
2330
2158
|
.INDENT 0.0
|
@@ -2340,7 +2168,7 @@ groonga \-n DB_PATH
|
|
2340
2168
|
.sp
|
2341
2169
|
The \fI\-n\fP option specifies to create a new database and DB_PATH specifies the path of the new database. Actually, a database consists of a series of files and DB_PATH specifies the file which will be the entrance to the new database. DB_PATH also specifies the path prefix for other files. Note that database creation fails if DB_PATH points to an existing file.
|
2342
2170
|
.sp
|
2343
|
-
This command creates a new database and then enters into interactive mode in which
|
2171
|
+
This command creates a new database and then enters into interactive mode in which Groonga prompts you to enter commands for operating that database. You can terminate this mode with Ctrl\-d.
|
2344
2172
|
.sp
|
2345
2173
|
Execution example:
|
2346
2174
|
.INDENT 0.0
|
@@ -2373,7 +2201,7 @@ groonga DB_PATH [COMMAND]
|
|
2373
2201
|
.sp
|
2374
2202
|
DB_PATH specifies the path of a target database. This command fails if the specified database does not exist.
|
2375
2203
|
.sp
|
2376
|
-
If COMMAND is specified,
|
2204
|
+
If COMMAND is specified, Groonga executes COMMAND and returns the result. Otherwise, Groonga starts in interactive mode that reads commands from the standard input and executes them one by one. This tutorial focuses on the interactive mode.
|
2377
2205
|
.sp
|
2378
2206
|
Let\(aqs see the status of a groonga process by using a \fB/reference/commands/status\fP command.
|
2379
2207
|
.sp
|
@@ -2396,10 +2224,10 @@ status
|
|
2396
2224
|
# "max_command_version": 2,
|
2397
2225
|
# "n_queries": 0,
|
2398
2226
|
# "cache_hit_rate": 0.0,
|
2399
|
-
# "version": "3.1.
|
2400
|
-
# "alloc_count":
|
2227
|
+
# "version": "3.1.1",
|
2228
|
+
# "alloc_count": 160,
|
2401
2229
|
# "command_version": 1,
|
2402
|
-
# "starttime":
|
2230
|
+
# "starttime": 1387938935,
|
2403
2231
|
# "default_command_version": 1
|
2404
2232
|
# }
|
2405
2233
|
# ]
|
@@ -2438,7 +2266,7 @@ For details, see also the paragraph of "command" in \fB/reference/executables/gr
|
|
2438
2266
|
.INDENT 0.0
|
2439
2267
|
.TP
|
2440
2268
|
.B \fB/reference/commands/status\fP
|
2441
|
-
shows status of a
|
2269
|
+
shows status of a Groonga process.
|
2442
2270
|
.TP
|
2443
2271
|
.B \fB/reference/commands/table_list\fP
|
2444
2272
|
shows a list of tables in a database.
|
@@ -2526,7 +2354,7 @@ select \-\-table Site
|
|
2526
2354
|
.sp
|
2527
2355
|
When only a table name is specified with a \fItable\fP parameter, a \fB/reference/commands/select\fP command returns the first (at most) 10 records in the table. [0] in the result shows the number of records in the table. The next array is a list of columns. ["_id","Uint32"] is a column of UInt32, named _id. ["_key","ShortText"] is a column of ShortText, named _key.
|
2528
2356
|
.sp
|
2529
|
-
The above two columns, _id and _key, are the necessary columns. The _id column stores IDs those are automatically allocated by
|
2357
|
+
The above two columns, _id and _key, are the necessary columns. The _id column stores IDs those are automatically allocated by Groonga. The _key column is associated with the primary key. You are not allowed to rename these columns.
|
2530
2358
|
.SS Create a column
|
2531
2359
|
.sp
|
2532
2360
|
A \fB/reference/commands/column_create\fP command creates a new column.
|
@@ -2839,7 +2667,7 @@ The \fItable\fP parameter specifies the index table and the \fIname\fP parameter
|
|
2839
2667
|
\fBNOTE:\fP
|
2840
2668
|
.INDENT 0.0
|
2841
2669
|
.INDENT 3.5
|
2842
|
-
You can create a lexicon table and index columns before/during/after loading records. If a target column already has records,
|
2670
|
+
You can create a lexicon table and index columns before/during/after loading records. If a target column already has records, Groonga creates an inverted index in a static manner. In contrast, if you load records into an already indexed column, Groonga updates the inverted index in a dynamic manner.
|
2843
2671
|
.UNINDENT
|
2844
2672
|
.UNINDENT
|
2845
2673
|
.SS Full text search
|
@@ -3447,11 +3275,11 @@ footnote
|
|
3447
3275
|
Currently, a \fImatch_columns\fP parameter is available iff there exists an inverted index for full text search. A \fImatch_columns\fP parameter for a regular column is not supported.
|
3448
3276
|
.SS Remote access
|
3449
3277
|
.sp
|
3450
|
-
You can use
|
3451
|
-
.SS Groonga
|
3452
|
-
.SS How to run a
|
3278
|
+
You can use Groonga as a server which allows remote access. Groonga supports the original protocol (GQTP), the memcached binary protocol and HTTP.
|
3279
|
+
.SS Groonga Query Transfer Protocol (GQTP)
|
3280
|
+
.SS How to run a GQTP server
|
3453
3281
|
.sp
|
3454
|
-
Groonga has a special protocol, named
|
3282
|
+
Groonga has a special protocol, named Groonga Query Transfer Protocol (GQTP), for remote access to a database. The following form shows how to run Groonga as a GQTP server.
|
3455
3283
|
.sp
|
3456
3284
|
Form:
|
3457
3285
|
.INDENT 0.0
|
@@ -3465,7 +3293,7 @@ groonga [\-p PORT_NUMBER] \-s DB_PATH
|
|
3465
3293
|
.UNINDENT
|
3466
3294
|
.UNINDENT
|
3467
3295
|
.sp
|
3468
|
-
The \fI\-s\fP option specifies to run
|
3296
|
+
The \fI\-s\fP option specifies to run Groonga as a server. DB_PATH specifies the path of the existing database to be hosted. The \fI\-p\fP option and its argument, PORT_NUMBER, specify the port number of the server. The default port number is 10041, which is used when you don\(aqt specify PORT_NUMBER.
|
3469
3297
|
.sp
|
3470
3298
|
The following command runs a server that listens on the default port number. The server accepts operations to the specified database.
|
3471
3299
|
.sp
|
@@ -3482,9 +3310,9 @@ Ctrl\-c
|
|
3482
3310
|
.fi
|
3483
3311
|
.UNINDENT
|
3484
3312
|
.UNINDENT
|
3485
|
-
.SS How to run a
|
3313
|
+
.SS How to run a GQTP daemon
|
3486
3314
|
.sp
|
3487
|
-
You can also run a
|
3315
|
+
You can also run a GQTP server as a daemon by using the \fI\-d\fP option, instead of the \fI\-s\fP option.
|
3488
3316
|
.sp
|
3489
3317
|
Form:
|
3490
3318
|
.INDENT 0.0
|
@@ -3498,7 +3326,7 @@ groonga [\-p PORT_NUMBER] \-d DB_PATH
|
|
3498
3326
|
.UNINDENT
|
3499
3327
|
.UNINDENT
|
3500
3328
|
.sp
|
3501
|
-
A
|
3329
|
+
A Groonga daemon prints its process ID as follows. In this example, the process ID is 12345. Then, the daemon opens a specified database and accepts operations to that database.
|
3502
3330
|
.sp
|
3503
3331
|
Execution example:
|
3504
3332
|
.INDENT 0.0
|
@@ -3513,9 +3341,9 @@ Execution example:
|
|
3513
3341
|
.fi
|
3514
3342
|
.UNINDENT
|
3515
3343
|
.UNINDENT
|
3516
|
-
.SS How to run a
|
3344
|
+
.SS How to run a GQTP client
|
3517
3345
|
.sp
|
3518
|
-
You can run
|
3346
|
+
You can run Groonga as a GQTP client as follows:
|
3519
3347
|
.sp
|
3520
3348
|
Form:
|
3521
3349
|
.INDENT 0.0
|
@@ -3529,7 +3357,7 @@ groonga [\-p PORT_NUMBER] \-c [HOST_NAME_OR_IP_ADDRESS]
|
|
3529
3357
|
.UNINDENT
|
3530
3358
|
.UNINDENT
|
3531
3359
|
.sp
|
3532
|
-
This command establishes a connection with a
|
3360
|
+
This command establishes a connection with a GQTP server and then enters into interactive mode. HOST_NAME_OR_IP_ADDRESS specifies the hostname or the IP address of the server. If not specified, Groonga uses the default hostname "localhost". The \fI\-p\fP option and its argument, PORT_NUMBER, specify the port number of the server. If not specified, Groonga uses the default port number 10041.
|
3533
3361
|
.sp
|
3534
3362
|
Execution example:
|
3535
3363
|
.INDENT 0.0
|
@@ -3550,10 +3378,10 @@ status
|
|
3550
3378
|
# "max_command_version": 2,
|
3551
3379
|
# "n_queries": 0,
|
3552
3380
|
# "cache_hit_rate": 0.0,
|
3553
|
-
# "version": "3.1.
|
3554
|
-
# "alloc_count":
|
3381
|
+
# "version": "3.1.1",
|
3382
|
+
# "alloc_count": 139,
|
3555
3383
|
# "command_version": 1,
|
3556
|
-
# "starttime":
|
3384
|
+
# "starttime": 1387938957,
|
3557
3385
|
# "default_command_version": 1
|
3558
3386
|
# }
|
3559
3387
|
# ]
|
@@ -3564,10 +3392,10 @@ status
|
|
3564
3392
|
.UNINDENT
|
3565
3393
|
.UNINDENT
|
3566
3394
|
.sp
|
3567
|
-
In interactive mode,
|
3568
|
-
.SS How to terminate a
|
3395
|
+
In interactive mode, Groonga reads commands from the standard input and executes them one by one.
|
3396
|
+
.SS How to terminate a GQTP server
|
3569
3397
|
.sp
|
3570
|
-
You can terminate a
|
3398
|
+
You can terminate a GQTP server with a \fB/reference/commands/shutdown\fP command.
|
3571
3399
|
.sp
|
3572
3400
|
Execution example:
|
3573
3401
|
.INDENT 0.0
|
@@ -3584,7 +3412,7 @@ Execution example:
|
|
3584
3412
|
.UNINDENT
|
3585
3413
|
.SS Memcached binary protocol
|
3586
3414
|
.sp
|
3587
|
-
Groonga supports the memcached binary protocol. The following form shows how to run
|
3415
|
+
Groonga supports the memcached binary protocol. The following form shows how to run Groonga as a memcached binary protocol server daemon.
|
3588
3416
|
.sp
|
3589
3417
|
Form:
|
3590
3418
|
.INDENT 0.0
|
@@ -3602,7 +3430,7 @@ The \fI\-\-protocol\fP option and its argument specify the protocol of the serve
|
|
3602
3430
|
.SS Hypertext transfer protocol (HTTP)
|
3603
3431
|
.SS How to run an HTTP server
|
3604
3432
|
.sp
|
3605
|
-
Groonga supports the hypertext transfer protocol (HTTP). The following form shows how to run
|
3433
|
+
Groonga supports the hypertext transfer protocol (HTTP). The following form shows how to run Groonga as an HTTP server daemon.
|
3606
3434
|
.sp
|
3607
3435
|
Form:
|
3608
3436
|
.INDENT 0.0
|
@@ -3666,14 +3494,13 @@ status
|
|
3666
3494
|
# "max_command_version": 2,
|
3667
3495
|
# "n_queries": 0,
|
3668
3496
|
# "cache_hit_rate": 0.0,
|
3669
|
-
# "version": "3.1.
|
3670
|
-
# "alloc_count":
|
3497
|
+
# "version": "3.1.1",
|
3498
|
+
# "alloc_count": 140,
|
3671
3499
|
# "command_version": 1,
|
3672
|
-
# "starttime":
|
3500
|
+
# "starttime": 1387939627,
|
3673
3501
|
# "default_command_version": 1
|
3674
3502
|
# }
|
3675
3503
|
# ]
|
3676
|
-
|
3677
3504
|
http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/d/select?table=Site&query=title:@this
|
3678
3505
|
Executed command:
|
3679
3506
|
select \-\-table Site \-\-query title:@this
|
@@ -3745,18 +3572,18 @@ select \-\-table Site \-\-query title:@this
|
|
3745
3572
|
.UNINDENT
|
3746
3573
|
.SS Administration tool (HTTP)
|
3747
3574
|
.sp
|
3748
|
-
An HTTP server of
|
3575
|
+
An HTTP server of Groonga provides a browser based administration tool that makes database management easy. After starting an HTTP server, you can use the administration tool by accessing \fI\%http://HOST_NAME_OR_IP_ADDRESS[:PORT_NUMBER]/\fP. Note that Javascript must be enabled for the tool to work properly.
|
3749
3576
|
.SS Security issues
|
3750
3577
|
.sp
|
3751
|
-
Groonga servers don\(aqt support user authentication. Everyone can view and modify databases hosted by
|
3578
|
+
Groonga servers don\(aqt support user authentication. Everyone can view and modify databases hosted by Groonga servers. You are recommended to restrict IP addresses that can access Groonga servers. You can use iptables or similar for this purpose.
|
3752
3579
|
.SS Various data types
|
3753
3580
|
.sp
|
3754
3581
|
Groonga is a full text search engine but also serves as a column\-oriented data store. Groonga supports various data types, such as numeric types, string types, date and time type, longitude and latitude types, etc. This tutorial shows a list of data types and explains how to use them.
|
3755
3582
|
.SS Overview
|
3756
3583
|
.sp
|
3757
|
-
The basic data types of
|
3584
|
+
The basic data types of Groonga are roughly divided into 5 groups \-\-\- boolean type, numeric types, string types, date/time type and longitude/latitude types. The numeric types are further divided according to whether integer or floating point number, signed or unsigned and the number of bits allocated to each integer. The string types are further divided according to the maximum length. The longitude/latitude types are further divided according to the geographic coordinate system. For more details, see \fB/reference/types\fP.
|
3758
3585
|
.sp
|
3759
|
-
In addition,
|
3586
|
+
In addition, Groonga supports reference types and vector types. Reference types are designed for accessing other tables. Vector types are designed for storing a variable number of values in one element.
|
3760
3587
|
.sp
|
3761
3588
|
First, let\(aqs create a table for this tutorial.
|
3762
3589
|
.sp
|
@@ -3968,13 +3795,13 @@ select \-\-table ToyBox \-\-output_columns _key,name
|
|
3968
3795
|
.UNINDENT
|
3969
3796
|
.SS Date and time type
|
3970
3797
|
.sp
|
3971
|
-
The date and time type of
|
3798
|
+
The date and time type of Groonga is Time. Actually, a Time column stores a date and time as the number of microseconds since the Epoch, 1970\-01\-01 00:00:00. A Time value can represent a date and time before the Epoch because the actual data type is a signed integer. Note that \fB/reference/commands/load\fP and \fB/reference/commands/select\fP commands use a decimal number to represent a data and time in seconds. The default value is 0.0, which means the Epoch.
|
3972
3799
|
.sp
|
3973
3800
|
\fBNOTE:\fP
|
3974
3801
|
.INDENT 0.0
|
3975
3802
|
.INDENT 3.5
|
3976
3803
|
Groonga internally holds the value of Epoch as pair of integer. The first integer represents the value of seconds, on the other hand, the second integer represents the value of micro seconds.
|
3977
|
-
So,
|
3804
|
+
So, Groonga shows the value of Epoch as floating point. Integral part means the value of seconds, fraction part means the value of micro seconds.
|
3978
3805
|
.UNINDENT
|
3979
3806
|
.UNINDENT
|
3980
3807
|
.sp
|
@@ -4037,7 +3864,7 @@ select \-\-table ToyBox \-\-output_columns _key,time
|
|
4037
3864
|
.UNINDENT
|
4038
3865
|
.SS Longitude and latitude types
|
4039
3866
|
.sp
|
4040
|
-
The longitude and latitude types are divided according to the geographic coordinate system. For more details, see \fB/reference/types\fP. To represent a longitude and latitude,
|
3867
|
+
The longitude and latitude types are divided according to the geographic coordinate system. For more details, see \fB/reference/types\fP. To represent a longitude and latitude, Groonga uses a string formatted as follows:
|
4041
3868
|
.INDENT 0.0
|
4042
3869
|
.IP \(bu 2
|
4043
3870
|
"longitude x latitude" in milliseconds (e.g.: "128452975x503157902")
|
@@ -4240,7 +4067,7 @@ select \-\-table Site \-\-output_columns _key,title,links._key,links.title \-\-q
|
|
4240
4067
|
The only difference at the first step is the \fIflags\fP parameter that specifies to create a vector column. The \fItype\fP parameter of the \fB/reference/commands/column_create\fP command is the same as in the previous example. Then, the \fB/reference/commands/load\fP command registers three links from "\fI\%http://example.org/\fP" to "\fI\%http://example.net/\fP", "\fI\%http://example.org/\fP" and "\fI\%http://example.com/\fP". After that, the links are confirmed by the \fB/reference/commands/select\fP command. In this case, the primary keys and the titles are output as arrays because links._key and links.title are specified to the \fIoutput_columns\fP parameter.
|
4241
4068
|
.SS さまざまな検索条件の指定
|
4242
4069
|
.sp
|
4243
|
-
|
4070
|
+
Groongaは、JavaScriptに似た文法での条件絞込や、計算した値を用いたソートを行うことができます。また、位置情報(緯度・経度)を用いた絞込・ソートを行うことができます。
|
4244
4071
|
.SS JavaScriptに似た文法での絞込・全文検索
|
4245
4072
|
.sp
|
4246
4073
|
selectコマンドのfilterパラメータは、queryパラメータと同様に、レコードの検索条件を指定します。filterパラメータとqueryパラメータが異なる点は、filterパラメータには、JavaScriptの式に似た文法で条件を指定する点です。
|
@@ -4580,7 +4407,7 @@ _score
|
|
4580
4407
|
よって、上記のクエリは実行されるたびに検索結果の並び順がランダムに変わります。
|
4581
4408
|
.SS 位置情報を用いた絞込・ソート
|
4582
4409
|
.sp
|
4583
|
-
|
4410
|
+
Groongaでは、位置情報(経緯度)を保存することができます。また、保存した経緯度を用いて絞込やソートができます。
|
4584
4411
|
.sp
|
4585
4412
|
位置情報を保存するためのカラムの型として、TokyoGeoPoint/WGS84GeoPointの2つの型があります。前者は日本測地系、後者は世界測地系(WGS84相当)の経緯度を保存します。
|
4586
4413
|
.sp
|
@@ -4805,11 +4632,24 @@ select \-\-table Site \-\-output_columns _key,location \-\-filter \(aqgeo_in_cir
|
|
4805
4632
|
.UNINDENT
|
4806
4633
|
.sp
|
4807
4634
|
また、経緯度が指定の矩形領域内であるかどうかを判定する \fB/reference/functions/geo_in_rectangle\fP 関数も存在します。
|
4808
|
-
.SS
|
4635
|
+
.SS Drilldown
|
4636
|
+
.sp
|
4637
|
+
You learned how to filter search results and sort ones in the previous sections.
|
4638
|
+
Now that you can search as you likes, but how do you summarize the number of records which has specific value in the column?
|
4639
|
+
.sp
|
4640
|
+
As you know, there is a naive solution to execute query by every the value of column, then you can get the number of records as a result. It is a simple way, but it is not reasonable to many records.
|
4641
|
+
.sp
|
4642
|
+
If you are familiar with SQL, you will doubt with "Is there a similar SQL functionality to \fBGROUP BY\fP in Groonga?".
|
4643
|
+
.sp
|
4644
|
+
Of course, Groonga provides such a functionality. It\(aqs called as \fBdrilldown\fP.
|
4645
|
+
.sp
|
4646
|
+
\fBdrilldown\fP enables you to get the number of records which belongs to specific the value of column at once.
|
4647
|
+
.sp
|
4648
|
+
To illustrate this feature, imagine the case that classification by domain and grouping by country that domain belongs to.
|
4809
4649
|
.sp
|
4810
|
-
|
4650
|
+
Here is the concrete examples how to use this feature.
|
4811
4651
|
.sp
|
4812
|
-
|
4652
|
+
In this example, we add two columns to \fBSite\fP table. \fBdomain\fP column is used for TLD (top level domain). \fBcountry\fP column is used for country name. The type of these columns are \fBSiteDomain\fP table which uses domain name as a primary key and \fBSiteCountry\fP table which uses country name as a primary key.
|
4813
4653
|
.sp
|
4814
4654
|
Execution example:
|
4815
4655
|
.INDENT 0.0
|
@@ -4843,7 +4683,7 @@ load \-\-table Site
|
|
4843
4683
|
.UNINDENT
|
4844
4684
|
.UNINDENT
|
4845
4685
|
.sp
|
4846
|
-
|
4686
|
+
Here is a example of drilldown with \fBdomain\fP column. Three kind of values are used in \fBdomain\fP column \- ".org", ".net" and ".com".
|
4847
4687
|
.sp
|
4848
4688
|
Execution example:
|
4849
4689
|
.INDENT 0.0
|
@@ -4932,7 +4772,73 @@ select \-\-table Site \-\-limit 0 \-\-drilldown domain
|
|
4932
4772
|
.UNINDENT
|
4933
4773
|
.UNINDENT
|
4934
4774
|
.sp
|
4935
|
-
|
4775
|
+
Here is a summary of above query.
|
4776
|
+
.SS Drilldown by \fBdomain\fP column
|
4777
|
+
.TS
|
4778
|
+
center;
|
4779
|
+
|l|l|l|.
|
4780
|
+
_
|
4781
|
+
T{
|
4782
|
+
Group by
|
4783
|
+
T} T{
|
4784
|
+
The number of group records
|
4785
|
+
T} T{
|
4786
|
+
Group records means following records
|
4787
|
+
T}
|
4788
|
+
_
|
4789
|
+
T{
|
4790
|
+
.org
|
4791
|
+
T} T{
|
4792
|
+
3
|
4793
|
+
T} T{
|
4794
|
+
.INDENT 0.0
|
4795
|
+
.IP \(bu 2
|
4796
|
+
\fI\%http://example.org/\fP
|
4797
|
+
.IP \(bu 2
|
4798
|
+
\fI\%http://example.org/aba\fP
|
4799
|
+
.IP \(bu 2
|
4800
|
+
\fI\%http://example.org/gat\fP
|
4801
|
+
.UNINDENT
|
4802
|
+
T}
|
4803
|
+
_
|
4804
|
+
T{
|
4805
|
+
.net
|
4806
|
+
T} T{
|
4807
|
+
3
|
4808
|
+
T} T{
|
4809
|
+
.INDENT 0.0
|
4810
|
+
.IP \(bu 2
|
4811
|
+
\fI\%http://example.net/\fP
|
4812
|
+
.IP \(bu 2
|
4813
|
+
\fI\%http://example.net/afr\fP
|
4814
|
+
.IP \(bu 2
|
4815
|
+
\fI\%http://example.net/atv\fP
|
4816
|
+
.UNINDENT
|
4817
|
+
T}
|
4818
|
+
_
|
4819
|
+
T{
|
4820
|
+
.com
|
4821
|
+
T} T{
|
4822
|
+
3
|
4823
|
+
T} T{
|
4824
|
+
.INDENT 0.0
|
4825
|
+
.IP \(bu 2
|
4826
|
+
\fI\%http://example.com/\fP
|
4827
|
+
.IP \(bu 2
|
4828
|
+
\fI\%http://example.com/rab\fP
|
4829
|
+
.IP \(bu 2
|
4830
|
+
\fI\%http://example.com/vdw\fP
|
4831
|
+
.UNINDENT
|
4832
|
+
T}
|
4833
|
+
_
|
4834
|
+
.TE
|
4835
|
+
.sp
|
4836
|
+
The value of drilldown are returned as the value of \fB_nsubrecs\fP column. In this case, \fBSite\fP table is grouped by ".org", ".net", ".com" domain. \fB_nsubrecs\fP shows that each three domain has three records.
|
4837
|
+
.sp
|
4838
|
+
If you execute drildown to the column which has table as a type, you can get the value of column which is stored in referenced table.
|
4839
|
+
\fB_nsubrecs\fP pseudo column is added to the table which is used for drilldown. this pseudo column stores the number of records which is grouped by.
|
4840
|
+
.sp
|
4841
|
+
Then, investigate referenced table in detail. As \fBSite\fP table use \fBSiteDomain\fP table as column type of \fBdomain\fP, you can use \fB\-\-drilldown_output_columns\fP to know detail of referenced column.
|
4936
4842
|
.sp
|
4937
4843
|
Execution example:
|
4938
4844
|
.INDENT 0.0
|
@@ -5028,7 +4934,7 @@ select \-\-table Site \-\-limit 0 \-\-drilldown domain \-\-drilldown_output_colu
|
|
5028
4934
|
.UNINDENT
|
5029
4935
|
.UNINDENT
|
5030
4936
|
.sp
|
5031
|
-
|
4937
|
+
Now, you can see detail of each grouped domain, drilldown by \fBcountry\fP column which has ".org" as column value.
|
5032
4938
|
.sp
|
5033
4939
|
Execution example:
|
5034
4940
|
.INDENT 0.0
|
@@ -5036,7 +4942,7 @@ Execution example:
|
|
5036
4942
|
.sp
|
5037
4943
|
.nf
|
5038
4944
|
.ft C
|
5039
|
-
select \-\-table Site \-\-limit 0 \-\-drilldown
|
4945
|
+
select \-\-table Site \-\-limit 0 \-\-filter "domain._id == 1" \-\-drilldown country
|
5040
4946
|
# [
|
5041
4947
|
# [
|
5042
4948
|
# 0,
|
@@ -5046,7 +4952,7 @@ select \-\-table Site \-\-limit 0 \-\-drilldown domain,country
|
|
5046
4952
|
# [
|
5047
4953
|
# [
|
5048
4954
|
# [
|
5049
|
-
#
|
4955
|
+
# 3
|
5050
4956
|
# ],
|
5051
4957
|
# [
|
5052
4958
|
# [
|
@@ -5098,38 +5004,129 @@ select \-\-table Site \-\-limit 0 \-\-drilldown domain,country
|
|
5098
5004
|
# ]
|
5099
5005
|
# ],
|
5100
5006
|
# [
|
5101
|
-
# ".org",
|
5102
|
-
# 3
|
5103
|
-
# ],
|
5104
|
-
# [
|
5105
|
-
# ".net",
|
5106
|
-
# 3
|
5107
|
-
# ],
|
5108
|
-
# [
|
5109
|
-
# ".com",
|
5110
|
-
# 3
|
5111
|
-
# ]
|
5112
|
-
# ],
|
5113
|
-
# [
|
5114
|
-
# [
|
5115
|
-
# 5
|
5116
|
-
# ],
|
5117
|
-
# [
|
5118
|
-
# [
|
5119
|
-
# "_key",
|
5120
|
-
# "ShortText"
|
5121
|
-
# ],
|
5122
|
-
# [
|
5123
|
-
# "_nsubrecs",
|
5124
|
-
# "Int32"
|
5125
|
-
# ]
|
5126
|
-
# ],
|
5127
|
-
# [
|
5128
5007
|
# "japan",
|
5129
|
-
#
|
5008
|
+
# 1
|
5130
5009
|
# ],
|
5131
5010
|
# [
|
5132
|
-
# "
|
5011
|
+
# "korea",
|
5012
|
+
# 1
|
5013
|
+
# ],
|
5014
|
+
# [
|
5015
|
+
# "usa",
|
5016
|
+
# 1
|
5017
|
+
# ]
|
5018
|
+
# ]
|
5019
|
+
# ]
|
5020
|
+
# ]
|
5021
|
+
.ft P
|
5022
|
+
.fi
|
5023
|
+
.UNINDENT
|
5024
|
+
.UNINDENT
|
5025
|
+
.SS Drilldown with multiple column
|
5026
|
+
.sp
|
5027
|
+
Drilldown feature supports multiple column. Use comma separated multiple column names as \fBdrildown\fP parameter.
|
5028
|
+
You can get the each result of drilldown at once.
|
5029
|
+
.sp
|
5030
|
+
Execution example:
|
5031
|
+
.INDENT 0.0
|
5032
|
+
.INDENT 3.5
|
5033
|
+
.sp
|
5034
|
+
.nf
|
5035
|
+
.ft C
|
5036
|
+
select \-\-table Site \-\-limit 0 \-\-drilldown domain,country
|
5037
|
+
# [
|
5038
|
+
# [
|
5039
|
+
# 0,
|
5040
|
+
# 1337566253.89858,
|
5041
|
+
# 0.000355720520019531
|
5042
|
+
# ],
|
5043
|
+
# [
|
5044
|
+
# [
|
5045
|
+
# [
|
5046
|
+
# 9
|
5047
|
+
# ],
|
5048
|
+
# [
|
5049
|
+
# [
|
5050
|
+
# "_id",
|
5051
|
+
# "UInt32"
|
5052
|
+
# ],
|
5053
|
+
# [
|
5054
|
+
# "_key",
|
5055
|
+
# "ShortText"
|
5056
|
+
# ],
|
5057
|
+
# [
|
5058
|
+
# "country",
|
5059
|
+
# "SiteCountry"
|
5060
|
+
# ],
|
5061
|
+
# [
|
5062
|
+
# "domain",
|
5063
|
+
# "SiteDomain"
|
5064
|
+
# ],
|
5065
|
+
# [
|
5066
|
+
# "link",
|
5067
|
+
# "Site"
|
5068
|
+
# ],
|
5069
|
+
# [
|
5070
|
+
# "links",
|
5071
|
+
# "Site"
|
5072
|
+
# ],
|
5073
|
+
# [
|
5074
|
+
# "location",
|
5075
|
+
# "WGS84GeoPoint"
|
5076
|
+
# ],
|
5077
|
+
# [
|
5078
|
+
# "title",
|
5079
|
+
# "ShortText"
|
5080
|
+
# ]
|
5081
|
+
# ]
|
5082
|
+
# ],
|
5083
|
+
# [
|
5084
|
+
# [
|
5085
|
+
# 3
|
5086
|
+
# ],
|
5087
|
+
# [
|
5088
|
+
# [
|
5089
|
+
# "_key",
|
5090
|
+
# "ShortText"
|
5091
|
+
# ],
|
5092
|
+
# [
|
5093
|
+
# "_nsubrecs",
|
5094
|
+
# "Int32"
|
5095
|
+
# ]
|
5096
|
+
# ],
|
5097
|
+
# [
|
5098
|
+
# ".org",
|
5099
|
+
# 3
|
5100
|
+
# ],
|
5101
|
+
# [
|
5102
|
+
# ".net",
|
5103
|
+
# 3
|
5104
|
+
# ],
|
5105
|
+
# [
|
5106
|
+
# ".com",
|
5107
|
+
# 3
|
5108
|
+
# ]
|
5109
|
+
# ],
|
5110
|
+
# [
|
5111
|
+
# [
|
5112
|
+
# 5
|
5113
|
+
# ],
|
5114
|
+
# [
|
5115
|
+
# [
|
5116
|
+
# "_key",
|
5117
|
+
# "ShortText"
|
5118
|
+
# ],
|
5119
|
+
# [
|
5120
|
+
# "_nsubrecs",
|
5121
|
+
# "Int32"
|
5122
|
+
# ]
|
5123
|
+
# ],
|
5124
|
+
# [
|
5125
|
+
# "japan",
|
5126
|
+
# 3
|
5127
|
+
# ],
|
5128
|
+
# [
|
5129
|
+
# "brazil",
|
5133
5130
|
# 1
|
5134
5131
|
# ],
|
5135
5132
|
# [
|
@@ -5151,8 +5148,9 @@ select \-\-table Site \-\-limit 0 \-\-drilldown domain,country
|
|
5151
5148
|
.fi
|
5152
5149
|
.UNINDENT
|
5153
5150
|
.UNINDENT
|
5151
|
+
.SS Sorting drildown results
|
5154
5152
|
.sp
|
5155
|
-
|
5153
|
+
Use \fB\-\-drilldown_sortby\fP if you want to sort the result of drilldown. For example, specify \fB_nsubrecs\fP as ascending order.
|
5156
5154
|
.sp
|
5157
5155
|
Execution example:
|
5158
5156
|
.INDENT 0.0
|
@@ -5248,8 +5246,9 @@ select \-\-table Site \-\-limit 0 \-\-drilldown country \-\-drilldown_sortby _ns
|
|
5248
5246
|
.fi
|
5249
5247
|
.UNINDENT
|
5250
5248
|
.UNINDENT
|
5249
|
+
.SS limits drildown results
|
5251
5250
|
.sp
|
5252
|
-
|
5251
|
+
The number of drilldown results is limited to 10 as a default. Use \fBdrilldown_limits\fP and \fBdrilldown_offset\fP parameter to customize orilldown results.
|
5253
5252
|
.sp
|
5254
5253
|
Execution example:
|
5255
5254
|
.INDENT 0.0
|
@@ -5337,9 +5336,9 @@ select \-\-table Site \-\-limit 0 \-\-drilldown country \-\-drilldown_sortby _ns
|
|
5337
5336
|
文字列型のカラムに対するドリルダウンは、他の型でのドリルダウンに比べて低速です。文字列でのドリルダウンを行いたい場合には、このチュートリアルのように、文字列型を主キーとするテーブルを別途作成し、そのテーブルを型とするカラムを作成します。
|
5338
5337
|
.SS タグ検索・参照関係の逆引き
|
5339
5338
|
.sp
|
5340
|
-
本チュートリアルで、
|
5339
|
+
本チュートリアルで、Groongaはカラム値として他のテーブルへの参照の配列を持つことができることを紹介いたしました。実は、テーブルへの参照の配列データを用いることによって、いわゆるタグ検索を行うことが可能となります。
|
5341
5340
|
.sp
|
5342
|
-
タグ検索は
|
5341
|
+
タグ検索はGroongaの転置インデックスというデータ構造を用いて高速に行われます。
|
5343
5342
|
.SS タグ検索
|
5344
5343
|
.sp
|
5345
5344
|
動画共有サイトの検索エンジンを作ることを想定します。1つの動画には、その動画の特徴を表す、複数の語句が付与されています。「ある語句が付与されている動画の一覧を取得する」検索を行いたいとします。
|
@@ -5503,7 +5502,7 @@ select \-\-table Video \-\-query tags:@Animation \-\-output_columns _key,title
|
|
5503
5502
|
このように、「Variety」、「Sports」、「Animation」のようなタグで検索を行うことができました。
|
5504
5503
|
.SS 参照関係の逆引き
|
5505
5504
|
.sp
|
5506
|
-
|
5505
|
+
Groongaはテーブル間の参照関係の逆引きを高速に行うためのインデックスを付与することができます。タグ検索は、その1例にすぎません。
|
5507
5506
|
.sp
|
5508
5507
|
例えば、ソーシャルネットワーキングサイトにおける友人関係を逆引き検索することができます。
|
5509
5508
|
.sp
|
@@ -5831,9 +5830,9 @@ select \-\-table Site \-\-filter \(aqgeo_in_circle(location, "128515259x50318718
|
|
5831
5830
|
.SS match_columnsパラメータ
|
5832
5831
|
.SS 複数のカラムを対象とした全文検索
|
5833
5832
|
.sp
|
5834
|
-
|
5833
|
+
Groongaでは、複数のカラムを対象とした全文検索を行うことができます。例えば、ブログのテーブルで、タイトルと内容とがそれぞれ別のカラムに入ったものがあるとしましょう。「タイトルもしくは内容に特定の単語を含む」検索を行いたいとします。
|
5835
5834
|
.sp
|
5836
|
-
この場合、2つのインデックス作成方式があります。1つは、それぞれのカラムに1つずつインデックスを付与する方式です。もう1つは、複数のカラムに対して1つのインデックスを付与する方式です。
|
5835
|
+
この場合、2つのインデックス作成方式があります。1つは、それぞれのカラムに1つずつインデックスを付与する方式です。もう1つは、複数のカラムに対して1つのインデックスを付与する方式です。Groongaでは、どちらの形式のインデックスが存在している場合でも、同一の記法で全文検索を行うことができます。
|
5837
5836
|
.SS カラムごとにインデックスを付与する場合
|
5838
5837
|
.sp
|
5839
5838
|
Blog1テーブルを作り、タイトル文字列のtitleカラム、本文のmessageカラムを追加しています。
|
@@ -6557,7 +6556,7 @@ On the other hand, the second one matches one article only because of Replies2 t
|
|
6557
6556
|
執筆中です。
|
6558
6557
|
.SS パトリシア木による前方一致検索
|
6559
6558
|
.sp
|
6560
|
-
|
6559
|
+
Groongaのテーブルは、テーブル作成時にパトリシア木オプションを指定すると、前方一致検索を行うことができます。また、追加のオプションを指定することにより、主キーの後方一致検索をも行うことができます。
|
6561
6560
|
.SS 主キーによる前方一致検索
|
6562
6561
|
.sp
|
6563
6562
|
table_createコマンドのflagsオプションにTABLE_PAT_KEYを指定することで、主キーによる前方一致検索ができるようになります。
|
@@ -6735,12 +6734,12 @@ select \-\-table PatSuffix \-\-filter \(aq_key @$ "ゆき" && original == true\(
|
|
6735
6734
|
.UNINDENT
|
6736
6735
|
.SS 全文検索の語彙表に対する追加情報
|
6737
6736
|
.sp
|
6738
|
-
|
6737
|
+
Groongaでは、全文検索に用いるための語意表がテーブルとして扱えます。よって、語彙ごとに複数の情報を保持することができます。例えば、語彙の出現数や検索ストップワードのフラグ、単語の重要度などを保持することができます。
|
6739
6738
|
.sp
|
6740
6739
|
この項目については、現在執筆中です。
|
6741
6740
|
.SS マイクロブログ検索システムの作成
|
6742
6741
|
.sp
|
6743
|
-
これまで学んだ
|
6742
|
+
これまで学んだGroongaの機能を用いて、マイクロブログの検索システムを作成してみましょう。マイクロブログとは、Twitterのような短いメッセージを投稿するブログです。
|
6744
6743
|
.SS テーブルの作成
|
6745
6744
|
.sp
|
6746
6745
|
まずは、テーブルを作成します。
|
@@ -7725,7 +7724,7 @@ select Comments \-\-filter \(aqlast_modified<=1268802000\(aq \-\-output_columns
|
|
7725
7724
|
2010/03/17 14:00:00以前に書かれたコメント5件がヒットしました。また、ドリルダウンの結果も返ってきており、「hsiomaneki」が2件、「グニャラくん」が3件ヒットしていることがわかります。
|
7726
7725
|
.SS クエリ拡張
|
7727
7726
|
.sp
|
7728
|
-
|
7727
|
+
Groongaでは、 \fB/reference/commands/select\fP コマンドにquery_expanderパラメータを指定することによって、ユーザが指定した検索文字列を適宜拡張することが可能です。
|
7729
7728
|
.sp
|
7730
7729
|
たとえば、ユーザが\(aqシークヮーサー\(aqという文字列で検索した場合に、\(aqシークヮーサー OR シークァーサー\(aqで検索した場合と同一の結果を返すことによって、本来ユーザが必要とする結果をよりもれなく検索できるようになります。
|
7731
7730
|
.SS 準備
|
@@ -10857,14 +10856,14 @@ Execution example:
|
|
10857
10856
|
0.000355720520019531
|
10858
10857
|
],
|
10859
10858
|
{
|
10860
|
-
"uptime":
|
10859
|
+
"uptime": 0,
|
10861
10860
|
"max_command_version": 2,
|
10862
10861
|
"n_queries": 0,
|
10863
10862
|
"cache_hit_rate": 0.0,
|
10864
|
-
"version": "3.1.
|
10865
|
-
"alloc_count":
|
10863
|
+
"version": "3.1.1",
|
10864
|
+
"alloc_count": 160,
|
10866
10865
|
"command_version": 1,
|
10867
|
-
"starttime":
|
10866
|
+
"starttime": 1387938911,
|
10868
10867
|
"default_command_version": 1
|
10869
10868
|
}
|
10870
10869
|
]
|
@@ -11899,15 +11898,15 @@ This section describes about command and built\-in commands.
|
|
11899
11898
|
.SS コマンドバージョン
|
11900
11899
|
.SS 概要
|
11901
11900
|
.sp
|
11902
|
-
|
11901
|
+
Groonga1.1からコマンドバージョンという概念が導入されます。コマンドバージョンは、selectやloadなどのGroongaのコマンドの仕様の互換性を表します。Groongaパッケージのバージョンが新しくなったとしても、同一のコマンドバージョンが使用可能であるなら、すべてのコマンドについて互換性が保証されます。コマンドバージョンが異なれば、同じ名前のコマンドであっても、動作に互換性がない可能性があります。
|
11903
11902
|
.sp
|
11904
|
-
あるバージョンの
|
11903
|
+
あるバージョンのGroongaは、二つのコマンドバージョンを同時にサポートするようになります。
|
11905
11904
|
使用するコマンドバージョンは、groongaを起動する際のコマンドラインオプションないしコンフィグファイルにdefault\-commnad\-versionパラメータを与えることによって指定できます。また、個々のコマンドを実行する際に、command_versionパラメータを与えることによっても指定することができます。
|
11906
11905
|
.sp
|
11907
|
-
コマンドバージョンは1からはじまり、更新されるたびに1ずつ大きくなります。現状の
|
11906
|
+
コマンドバージョンは1からはじまり、更新されるたびに1ずつ大きくなります。現状のGroongaのコマンドの仕様はcommand\-version 1という扱いになります。次回提供するGroongaは、command\-version 1とcommand\-version 2の二つをサポートすることになります。
|
11908
11907
|
.SS バージョンの位置づけ
|
11909
11908
|
.sp
|
11910
|
-
あるバージョンの
|
11909
|
+
あるバージョンのGroongaにおいてサポートされるコマンドバージョンは、develop, stable,deprecatedのいずれかの位置づけとなります。
|
11911
11910
|
.INDENT 0.0
|
11912
11911
|
.TP
|
11913
11912
|
.B develop
|
@@ -11920,9 +11919,9 @@ groonga1.1からコマンドバージョンという概念が導入されます
|
|
11920
11919
|
使用可能であり仕様も安定していますが、廃止予定であり使用が推奨されません。
|
11921
11920
|
.UNINDENT
|
11922
11921
|
.sp
|
11923
|
-
あるバージョンの
|
11922
|
+
あるバージョンのGroongaがサポートする二つのコマンドバージョンのうち、いずれか一つが必ずstableの位置づけとなります。残りの一つは、developないしdeprecatedとなります。
|
11924
11923
|
.sp
|
11925
|
-
たとえば下記のように
|
11924
|
+
たとえば下記のようにGroongaのサポートするコマンドバージョンは推移します。:
|
11926
11925
|
.INDENT 0.0
|
11927
11926
|
.INDENT 3.5
|
11928
11927
|
.sp
|
@@ -12559,7 +12558,7 @@ check obj
|
|
12559
12558
|
.UNINDENT
|
12560
12559
|
.SS 説明
|
12561
12560
|
.sp
|
12562
|
-
|
12561
|
+
Groonga組込コマンドの一つであるcheckについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
12563
12562
|
.sp
|
12564
12563
|
checkコマンドは、groongaプロセス内の指定したオブジェクトの状態を表示します。主にデータベースが壊れた場合など異常時の問題解決のために使用することを想定しています。デバッグ用のため、返値のフォーマットが安定しているということは保証されません。(フォーマットが変更される可能性が高い)
|
12565
12564
|
.SS 引数
|
@@ -12798,7 +12797,7 @@ clearlock objname
|
|
12798
12797
|
.UNINDENT
|
12799
12798
|
.SS 説明
|
12800
12799
|
.sp
|
12801
|
-
|
12800
|
+
Groonga組込コマンドの一つであるclearlockについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
12802
12801
|
.sp
|
12803
12802
|
clearlockは、対象となるオブジェクト(データベース,テーブル,インデックス等)を指定し、オブジェクトにかけられたロックを再帰的に解除します。
|
12804
12803
|
.SS 引数
|
@@ -12863,7 +12862,7 @@ clearlock Entry.body
|
|
12863
12862
|
.sp
|
12864
12863
|
column_create \- カラムの追加
|
12865
12864
|
.sp
|
12866
|
-
|
12865
|
+
Groonga組込コマンドの一つであるcolumn_createについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
12867
12866
|
.sp
|
12868
12867
|
column_createは、使用しているデータベースのテーブルに対してカラムを追加します。
|
12869
12868
|
.SS Syntax
|
@@ -12967,7 +12966,7 @@ Reserved. Compress the value of column by using lzo. This flag is disabled featu
|
|
12967
12966
|
\fBtype\fP
|
12968
12967
|
.INDENT 0.0
|
12969
12968
|
.INDENT 3.5
|
12970
|
-
値の型を指定します。
|
12969
|
+
値の型を指定します。Groongaの組込型か、同一データベースに定義済みのユーザ定義型、定義済みのテーブルを指定することができます。
|
12971
12970
|
.UNINDENT
|
12972
12971
|
.UNINDENT
|
12973
12972
|
.sp
|
@@ -13020,7 +13019,7 @@ column_list table
|
|
13020
13019
|
.UNINDENT
|
13021
13020
|
.SS 説明
|
13022
13021
|
.sp
|
13023
|
-
|
13022
|
+
Groonga組込コマンドの一つであるcolumn_listについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
13024
13023
|
.sp
|
13025
13024
|
column_listはテーブルに定義されているカラムをリスト表示します。
|
13026
13025
|
.SS 引数
|
@@ -13169,7 +13168,7 @@ column_remove table name
|
|
13169
13168
|
.UNINDENT
|
13170
13169
|
.SS 説明
|
13171
13170
|
.sp
|
13172
|
-
|
13171
|
+
Groonga組込コマンドの一つであるcolumn_removeについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
13173
13172
|
.sp
|
13174
13173
|
column_removeはテーブルに定義されているカラムを削除します。
|
13175
13174
|
また、付随するインデックスも削除されます。[1]
|
@@ -13428,7 +13427,7 @@ define_selector name table [match_columns [query [filter [scorer [sortby
|
|
13428
13427
|
.UNINDENT
|
13429
13428
|
.SS 説明
|
13430
13429
|
.sp
|
13431
|
-
|
13430
|
+
Groonga組込コマンドの一つであるdefine_selectorについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
13432
13431
|
.sp
|
13433
13432
|
define_selectorは、検索条件をカスタマイズした新たな検索コマンドを定義します。
|
13434
13433
|
.SS 引数
|
@@ -13590,7 +13589,7 @@ defrag objname threshold
|
|
13590
13589
|
.UNINDENT
|
13591
13590
|
.SS 説明
|
13592
13591
|
.sp
|
13593
|
-
|
13592
|
+
Groonga組込コマンドの一つであるdefragについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
13594
13593
|
.sp
|
13595
13594
|
defragは、対象となるオブジェクト(データベースか可変長サイズカラム)を指定し、オブジェクトのフラグメンテーションを解消します。
|
13596
13595
|
.SS 引数
|
@@ -13923,11 +13922,11 @@ dump [tables]
|
|
13923
13922
|
.UNINDENT
|
13924
13923
|
.SS 説明
|
13925
13924
|
.sp
|
13926
|
-
|
13925
|
+
Groonga組込コマンドの一つであるdumpについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
13927
13926
|
.sp
|
13928
13927
|
dumpはデータベースのスキーマとデータを後から読み込めるフォーマットで出力します。dumpの結果は大きくなるため、主にコマンドラインから使うことを想定しています。データベースのバックアップが主な利用方法です。
|
13929
13928
|
.sp
|
13930
|
-
dumpが出力するフォーマットは直接
|
13929
|
+
dumpが出力するフォーマットは直接Groongaが解釈できるフォーマットです。そのため、以下のようにしてデータベースをコピーすることができます。:
|
13931
13930
|
.INDENT 0.0
|
13932
13931
|
.INDENT 3.5
|
13933
13932
|
.sp
|
@@ -13950,7 +13949,7 @@ dumpが出力するフォーマットは直接groongaが解釈できるフォー
|
|
13950
13949
|
.UNINDENT
|
13951
13950
|
.SS 返値
|
13952
13951
|
.sp
|
13953
|
-
データベースのスキーマとデータを
|
13952
|
+
データベースのスキーマとデータをGroongaの組み込みコマンド呼び出し形式で出力します。output_type指定は無視されます。
|
13954
13953
|
.SS 例
|
13955
13954
|
.sp
|
13956
13955
|
データベース内のすべてのデータを出力:
|
@@ -14154,7 +14153,7 @@ log_level level
|
|
14154
14153
|
.UNINDENT
|
14155
14154
|
.SS 説明
|
14156
14155
|
.sp
|
14157
|
-
|
14156
|
+
Groonga組込コマンドの一つであるlog_levelについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
14158
14157
|
.sp
|
14159
14158
|
log_levelは、ログ出力レベルを設定します。
|
14160
14159
|
.SS 引数
|
@@ -14311,7 +14310,7 @@ log_reopen
|
|
14311
14310
|
.UNINDENT
|
14312
14311
|
.SS 説明
|
14313
14312
|
.sp
|
14314
|
-
|
14313
|
+
Groonga組込コマンドの一つであるlog_reopenについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
14315
14314
|
.sp
|
14316
14315
|
log_reopenは、ログファイルを再読み込みします。
|
14317
14316
|
.sp
|
@@ -14380,7 +14379,7 @@ This command may be changed in the future.
|
|
14380
14379
|
\fBnormalize\fP command normalizes text by the specified normalizer.
|
14381
14380
|
.sp
|
14382
14381
|
There is no need to create table to use \fBnormalize\fP command.
|
14383
|
-
It is
|
14382
|
+
It is useful for you to check the results of normalizer.
|
14384
14383
|
.SS Syntax
|
14385
14384
|
.sp
|
14386
14385
|
\fBnormalize\fP commands has two required parameters. They are
|
@@ -14588,7 +14587,7 @@ quit
|
|
14588
14587
|
.UNINDENT
|
14589
14588
|
.SS 説明
|
14590
14589
|
.sp
|
14591
|
-
|
14590
|
+
Groonga組込コマンドの一つであるquitについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
14592
14591
|
.sp
|
14593
14592
|
quitは、groongaプロセスとのセッションを終了します。クライアントプロセスならばgroongaプロセスとの接続を切ります。
|
14594
14593
|
.SS 引数
|
@@ -16451,7 +16450,7 @@ load \-\-table Thesaurus
|
|
16451
16450
|
\fBThesaurus\fP substitution table has two synonyms, \fB"mroonga"\fP and
|
16452
16451
|
\fB"groonga"\fP. If an user searches with \fB"mroonga"\fP, groonga
|
16453
16452
|
searches with \fB"((mroonga) OR (tritonn) OR (groonga mysql))"\fP. If an
|
16454
|
-
user searches with \fB"groonga"\fP, groonga
|
16453
|
+
user searches with \fB"groonga"\fP, groonga searches with \fB"((groonga)
|
16455
16454
|
OR (senna))"\fP. Nomrally, it\(aqs good idea that substitution table has
|
16456
16455
|
\fBKEY_NORMALIZE\fP flag. If the flag is used, substitute target word is
|
16457
16456
|
matched in case insensitive manner.
|
@@ -17439,7 +17438,7 @@ shutdown
|
|
17439
17438
|
.UNINDENT
|
17440
17439
|
.SS 説明
|
17441
17440
|
.sp
|
17442
|
-
|
17441
|
+
Groonga組込コマンドの一つであるshutdownについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
17443
17442
|
.sp
|
17444
17443
|
shutdownは、接続しているgroongaサーバプロセスを停止します。
|
17445
17444
|
.SS 引数
|
@@ -17476,7 +17475,7 @@ status
|
|
17476
17475
|
.UNINDENT
|
17477
17476
|
.SS 説明
|
17478
17477
|
.sp
|
17479
|
-
|
17478
|
+
Groonga組込コマンドの一つであるstatusについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
17480
17479
|
.sp
|
17481
17480
|
statusコマンドは、groongaプロセスの状態を表示します。主にgroongaサーバプロセスに対して使用することを想定しています。
|
17482
17481
|
.SS 引数
|
@@ -17498,7 +17497,7 @@ statusコマンドは、groongaプロセスの状態を表示します。主にg
|
|
17498
17497
|
\fBalloc_count\fP
|
17499
17498
|
.INDENT 0.0
|
17500
17499
|
.INDENT 3.5
|
17501
|
-
groongaプロセスの内部でアロケートされ、まだ解放されてないメモリブロックの数を示します。
|
17500
|
+
groongaプロセスの内部でアロケートされ、まだ解放されてないメモリブロックの数を示します。Groongaをbuildする際に、configureオプションで \-\-enable\-exact\-alloc\-countが指定されていたならば、正確な値を返します。それ以外の場合は不正確な値を返す場合があります。
|
17502
17501
|
.UNINDENT
|
17503
17502
|
.UNINDENT
|
17504
17503
|
.sp
|
@@ -17531,14 +17530,14 @@ status
|
|
17531
17530
|
# 0.000355720520019531
|
17532
17531
|
# ],
|
17533
17532
|
# {
|
17534
|
-
# "uptime":
|
17533
|
+
# "uptime": 1,
|
17535
17534
|
# "max_command_version": 2,
|
17536
17535
|
# "n_queries": 0,
|
17537
17536
|
# "cache_hit_rate": 0.0,
|
17538
|
-
# "version": "3.1.
|
17539
|
-
# "alloc_count":
|
17537
|
+
# "version": "3.1.1",
|
17538
|
+
# "alloc_count": 291,
|
17540
17539
|
# "command_version": 1,
|
17541
|
-
# "starttime":
|
17540
|
+
# "starttime": 1387938926,
|
17542
17541
|
# "default_command_version": 1
|
17543
17542
|
# }
|
17544
17543
|
# ]
|
@@ -18172,7 +18171,7 @@ and is \fBTABLE_NO_KEY\fP type.
|
|
18172
18171
|
.sp
|
18173
18172
|
If your records aren\(aqt searched by key, \fBTABLE_NO_KEY\fP type table is
|
18174
18173
|
suitable. Because \fBTABLE_NO_KEY\fP doesn\(aqt support key but it is fast
|
18175
|
-
and small table. Storing logs into
|
18174
|
+
and small table. Storing logs into Groonga database is the case.
|
18176
18175
|
.sp
|
18177
18176
|
If your records are searched by key or referenced by one or more
|
18178
18177
|
columns, \fBTABLE_NO_KEY\fP type isn\(aqt suitable. Lexicon for fulltext
|
@@ -18323,7 +18322,7 @@ character.)
|
|
18323
18322
|
.UNINDENT
|
18324
18323
|
.sp
|
18325
18324
|
You need to create a name with one or more the above chracters. Note
|
18326
|
-
that you cannot use \fB_\fP as the first
|
18325
|
+
that you cannot use \fB_\fP as the first character such as
|
18327
18326
|
\fB_name\fP.
|
18328
18327
|
.SS \fBflags\fP
|
18329
18328
|
.sp
|
@@ -18376,7 +18375,7 @@ _
|
|
18376
18375
|
\fBNOTE:\fP
|
18377
18376
|
.INDENT 0.0
|
18378
18377
|
.INDENT 3.5
|
18379
|
-
Since
|
18378
|
+
Since Groonga 2.1.0 \fBKEY_NORMALIZE\fP flag is deprecated. Use
|
18380
18379
|
\fBnormalizer\fP option with \fBNormalizerAuto\fP instead.
|
18381
18380
|
.UNINDENT
|
18382
18381
|
.UNINDENT
|
@@ -18483,7 +18482,7 @@ table_list
|
|
18483
18482
|
.UNINDENT
|
18484
18483
|
.SS 説明
|
18485
18484
|
.sp
|
18486
|
-
|
18485
|
+
Groonga組込コマンドの一つであるtable_listについて説明します。組込コマンドは、groonga実行ファイルの引数、標準入力、またはソケット経由でgroongaサーバにリクエストを送信することによって実行します。
|
18487
18486
|
.sp
|
18488
18487
|
table_listは、DBに定義されているテーブルのリストを表示します。
|
18489
18488
|
.SS 引数
|
@@ -19615,14 +19614,14 @@ If command succeeded, it returns true, otherwise it returns false on error.
|
|
19615
19614
|
.SS データ型
|
19616
19615
|
.SS 名前
|
19617
19616
|
.sp
|
19618
|
-
|
19617
|
+
Groonga データ型
|
19619
19618
|
.SS 説明
|
19620
19619
|
.sp
|
19621
|
-
|
19620
|
+
Groonga は、格納するデータの型を区別します。
|
19622
19621
|
.sp
|
19623
|
-
|
19622
|
+
Groongaのデータベースでは、テーブルの主キーや、カラムの値はいずれも何らかの型に属します。また通常は、一つのテーブルの中の全てのレコードについて、カラムの値は共通となります。
|
19624
19623
|
.sp
|
19625
|
-
主キーの型とカラムの型には、
|
19624
|
+
主キーの型とカラムの型には、Groongaで予め定義済みの型か、ユーザが定義する型、またはユーザが定義したテーブルを指定することができます。
|
19626
19625
|
.sp
|
19627
19626
|
主キーの型に他のテーブルを指定する場合は、そのテーブルは、主キーの型となるテーブルのサブセットとなります。
|
19628
19627
|
.sp
|
@@ -19768,7 +19767,7 @@ IEEE 754形式の詳細については、 \fI\%IEEE 754 \- Wikipedia\fP や \fI\
|
|
19768
19767
|
Text型とLongText型については、テーブルの主キーに指定することはできません。
|
19769
19768
|
.SS ベクターとして格納できない型
|
19770
19769
|
.sp
|
19771
|
-
|
19770
|
+
Groongaのカラムは、ある型のベクターを保存することができます。しかし、ShortText, Text, LongTextの3つの型についてはベクターとして保存したり出力したりすることはできますが、検索条件やドリルダウン条件に指定することができません。
|
19772
19771
|
.sp
|
19773
19772
|
テーブル型は、ベクターとして格納することができます。よって、ShortTextのベクターを検索条件やドリルダウン条件に使用したい場合には、主キーがShortText型のテーブルを別途作成し、そのテーブルを型として利用します。
|
19774
19773
|
脚注
|
@@ -20053,7 +20052,7 @@ tokenizing text and storing table key. For example, \fBA\fP and \fBa\fP
|
|
20053
20052
|
are processed as the same character after normalization.
|
20054
20053
|
.sp
|
20055
20054
|
Normalizer module can be added as a plugin. You can customize text
|
20056
|
-
normalization by registering your normalizer plugins to
|
20055
|
+
normalization by registering your normalizer plugins to Groonga.
|
20057
20056
|
.sp
|
20058
20057
|
A normalizer module is attached to a table. A table can have zero or
|
20059
20058
|
one normalizer module. You can attach a normalizer module to a table
|
@@ -20082,12 +20081,12 @@ table_create Dictionary TABLE_HASH_KEY ShortText \-\-normalizer NormalizerAuto
|
|
20082
20081
|
Groonga 2.0.9 or earlier doesn\(aqt have \fB\-\-normalizer\fP option in
|
20083
20082
|
\fBtable_create\fP. \fBKEY_NORMALIZE\fP flag was used instead.
|
20084
20083
|
.sp
|
20085
|
-
You can open an old database by
|
20086
|
-
database means that the database is created by
|
20087
|
-
earlier. But you cannot open the opened old database by
|
20088
|
-
2.0.9 or earlier. Once you open the old database by
|
20084
|
+
You can open an old database by Groonga 2.1.0 or later. An old
|
20085
|
+
database means that the database is created by Groonga 2.0.9 or
|
20086
|
+
earlier. But you cannot open the opened old database by Groonga
|
20087
|
+
2.0.9 or earlier. Once you open the old database by Groonga 2.1.0
|
20089
20088
|
or later, \fBKEY_NORMALIZE\fP flag information in the old database is
|
20090
|
-
converted to normalizer information. So
|
20089
|
+
converted to normalizer information. So Groonga 2.0.9 or earlier
|
20091
20090
|
cannot find \fBKEY_NORMALIZE\fP flag information in the opened old
|
20092
20091
|
database.
|
20093
20092
|
.UNINDENT
|
@@ -20174,10 +20173,10 @@ Here is a list of built\-in normalizers:
|
|
20174
20173
|
.SS \fBNormalizerAuto\fP
|
20175
20174
|
.sp
|
20176
20175
|
Normally you should use \fBNormalizerAuto\fP
|
20177
|
-
normalizer. \fBNormalizerAuto\fP was the normalizer for
|
20178
|
-
earlier. \fBKEY_NORMALIZE\fP flag in \fBtable_create\fP on
|
20176
|
+
normalizer. \fBNormalizerAuto\fP was the normalizer for Groonga 2.0.9 or
|
20177
|
+
earlier. \fBKEY_NORMALIZE\fP flag in \fBtable_create\fP on Groonga 2.0.9
|
20179
20178
|
or earlier equals to \fB\-\-normalizer NormalizerAuto\fP option in
|
20180
|
-
\fBtable_create\fP on
|
20179
|
+
\fBtable_create\fP on Groonga 2.1.0 or later.
|
20181
20180
|
.sp
|
20182
20181
|
\fBNormalizerAuto\fP supports all encoding. It uses Unicode NFKC
|
20183
20182
|
(Normalization Form Compatibility Composition) for UTF\-8 encoding
|
@@ -20244,8 +20243,8 @@ Here is a list of additional normalizers provided by \fBgroonga\-normalizer\-mys
|
|
20244
20243
|
.UNINDENT
|
20245
20244
|
.UNINDENT
|
20246
20245
|
.sp
|
20247
|
-
\fBgroonga\-normalizer\-mysql\fP is a
|
20248
|
-
It provides MySQL compatible normalizers to
|
20246
|
+
\fBgroonga\-normalizer\-mysql\fP is a Groonga plugin.
|
20247
|
+
It provides MySQL compatible normalizers to Groonga.
|
20249
20248
|
\fBNormalizerMySQLGeneralCI\fP corresponds to \fButf8mb4_general_ci\fP.
|
20250
20249
|
.sp
|
20251
20250
|
You need to register \fBnormalizers/mysql\fP plugin in advance.
|
@@ -24817,7 +24816,7 @@ registered as keys of the table of \fB_key\fP.
|
|
24817
24816
|
.sp
|
24818
24817
|
Note that the table must be patricia trie (\fBTABLE_PAT_KEY\fP) or
|
24819
24818
|
double array trie (\fBTABLE_DAT_KEY\fP). You can\(aqt use hash table
|
24820
|
-
(\fBTABLE_HASH_KEY\fP) and array (\fBTABLE_NO_KEY\fP)
|
24819
|
+
(\fBTABLE_HASH_KEY\fP) and array (\fBTABLE_NO_KEY\fP) because they don\(aqt
|
24821
24820
|
support longest common prefix search. Longest common prefix search is
|
24822
24821
|
used to implement the operator.
|
24823
24822
|
.sp
|
@@ -24894,163 +24893,51 @@ options of \fBcommands/select\fP.
|
|
24894
24893
|
This section describes about function and built\-in functions.
|
24895
24894
|
.sp
|
24896
24895
|
TODO: Add documentations about function.
|
24897
|
-
.SS
|
24898
|
-
.SS 名前
|
24899
|
-
.sp
|
24900
|
-
edit_distance \- 指定した2つの文字列の編集距離を計算する
|
24901
|
-
.SS 書式
|
24902
|
-
.INDENT 0.0
|
24903
|
-
.INDENT 3.5
|
24904
|
-
.sp
|
24905
|
-
.nf
|
24906
|
-
.ft C
|
24907
|
-
edit_distance(string1, string2)
|
24908
|
-
.ft P
|
24909
|
-
.fi
|
24910
|
-
.UNINDENT
|
24911
|
-
.UNINDENT
|
24912
|
-
.SS 説明
|
24913
|
-
.sp
|
24914
|
-
groonga組込関数の一つであるedit_distanceについて説明します。組込関数は、script形式のgrn_expr中で呼び出すことができます。
|
24915
|
-
.sp
|
24916
|
-
edit_distance() 関数は、string1に指定した文字列とstring2に指定した文字列の間の編集距離を求めます。
|
24917
|
-
.SS 引数
|
24918
|
-
.sp
|
24919
|
-
\fBstring1\fP
|
24920
|
-
.INDENT 0.0
|
24921
|
-
.INDENT 3.5
|
24922
|
-
文字列を指定します
|
24923
|
-
.UNINDENT
|
24924
|
-
.UNINDENT
|
24925
|
-
.sp
|
24926
|
-
\fBstring2\fP
|
24927
|
-
.INDENT 0.0
|
24928
|
-
.INDENT 3.5
|
24929
|
-
もうひとつの文字列を指定します
|
24930
|
-
.UNINDENT
|
24931
|
-
.UNINDENT
|
24932
|
-
.SS 返値
|
24933
|
-
.sp
|
24934
|
-
指定した2つ文字列の編集距離をUint32型の値として返します。
|
24935
|
-
.SS 例
|
24936
|
-
.INDENT 0.0
|
24937
|
-
.INDENT 3.5
|
24938
|
-
.sp
|
24939
|
-
.nf
|
24940
|
-
.ft C
|
24941
|
-
edit_distance(title, "hoge")
|
24942
|
-
1
|
24943
|
-
.ft P
|
24944
|
-
.fi
|
24945
|
-
.UNINDENT
|
24946
|
-
.UNINDENT
|
24947
|
-
.SS geo_distance
|
24896
|
+
.SS between
|
24948
24897
|
.SS Summary
|
24949
24898
|
.sp
|
24950
|
-
\
|
24899
|
+
\fBbetween\fP is used for checking the specified value exists in the specific range.
|
24900
|
+
It is often used for combination with \fIselect\-filter\fP option in \fB/reference/commands/select\fP.
|
24951
24901
|
.SS Syntax
|
24952
24902
|
.sp
|
24953
|
-
\
|
24954
|
-
The parameter \fBapproximate_type\fP is optional:
|
24903
|
+
\fBbetween\fP has five parameters:
|
24955
24904
|
.INDENT 0.0
|
24956
24905
|
.INDENT 3.5
|
24957
24906
|
.sp
|
24958
24907
|
.nf
|
24959
24908
|
.ft C
|
24960
|
-
|
24961
|
-
geo_distance(point1, point2, approximate_type)
|
24909
|
+
between(column_or_value, min, min_border, max, max_border)
|
24962
24910
|
.ft P
|
24963
24911
|
.fi
|
24964
24912
|
.UNINDENT
|
24965
24913
|
.UNINDENT
|
24966
|
-
.sp
|
24967
|
-
The default value of \fBapproximate_type\fP is \fB"rectangle"\fP.
|
24968
|
-
If you omit \fBapproximate_type\fP, \fBgeo_distance\fP calculates the value of
|
24969
|
-
distance as if \fB"rectangle"\fP was specified.
|
24970
24914
|
.SS Usage
|
24971
24915
|
.sp
|
24972
|
-
|
24973
|
-
.sp
|
24974
|
-
You can call a builtin function in \fB/reference/grn_expr\fP
|
24975
|
-
.sp
|
24976
|
-
\fBgeo_distance\fP function calculates the value of distance (approximate value)
|
24977
|
-
between the coordinate of \fBpoint1\fP and the coordinate of \fBpoint2\fP.
|
24978
|
-
.sp
|
24979
|
-
\fBNOTE:\fP
|
24980
|
-
.INDENT 0.0
|
24981
|
-
.INDENT 3.5
|
24982
|
-
groonga provides three built in functions for calculating the value of distance.
|
24983
|
-
There are \fBgeo_distance()\fP, \fBgeo_distance2()\fP and \fBgeo_distance3()\fP.
|
24984
|
-
The difference of them is the algorithm of calculating distance.
|
24985
|
-
\fBgeo_distance2()\fP and \fBgeo_distance3()\fP were deprecated since version 1.2.9.
|
24986
|
-
Use \fBgeo_distance(point1, point2, "sphere")\fP instead of \fBgeo_distance2(point1, point2)\fP.
|
24987
|
-
Use \fBgeo_distance(point1, point2, "ellipsoid")\fP instead of \fBgeo_distance3(point1, point2)\fP.
|
24988
|
-
.UNINDENT
|
24989
|
-
.UNINDENT
|
24990
|
-
.sp
|
24991
|
-
Lets\(aqs learn about \fBgeo_distance\fP usage with examples.
|
24992
|
-
This section shows simple usages.
|
24993
|
-
.sp
|
24994
|
-
Here are two schema definition and sample data to show the difference according to the usage.
|
24995
|
-
Those samples show how to calculate the value of distance between New York City and London.
|
24996
|
-
.INDENT 0.0
|
24997
|
-
.IP 1. 3
|
24998
|
-
Using the column value of location for calculating the distance (\fBCities\fP table)
|
24999
|
-
.IP 2. 3
|
25000
|
-
Using the explicitly specified coordinates for calculating the distance (\fBGeo\fP table)
|
25001
|
-
.UNINDENT
|
25002
|
-
.SS Using the column value of location
|
25003
|
-
.sp
|
25004
|
-
Here are a schema definition of \fBCities\fP table and sample data to show usage.
|
25005
|
-
.INDENT 0.0
|
25006
|
-
.INDENT 3.5
|
25007
|
-
.sp
|
25008
|
-
.nf
|
25009
|
-
.ft C
|
25010
|
-
table_create Cities TABLE_HASH_KEY ShortText
|
25011
|
-
column_create Cities location COLUMN_SCALAR WGS84GeoPoint
|
25012
|
-
load \-\-table Cities
|
25013
|
-
[
|
25014
|
-
{
|
25015
|
-
"_key", "location"
|
25016
|
-
},
|
25017
|
-
{
|
25018
|
-
"New York City", "146566000x\-266422000",
|
25019
|
-
},
|
25020
|
-
]
|
25021
|
-
.ft P
|
25022
|
-
.fi
|
25023
|
-
.UNINDENT
|
25024
|
-
.UNINDENT
|
25025
|
-
.sp
|
25026
|
-
Execution example:
|
24916
|
+
Here are a schema definition and sample data to show usage.:
|
25027
24917
|
.INDENT 0.0
|
25028
24918
|
.INDENT 3.5
|
25029
24919
|
.sp
|
25030
24920
|
.nf
|
25031
24921
|
.ft C
|
25032
|
-
table_create
|
25033
|
-
|
25034
|
-
|
25035
|
-
|
25036
|
-
load \-\-table
|
24922
|
+
table_create Users TABLE_HASH_KEY ShortText
|
24923
|
+
column_create Users age COLUMN_SCALAR Int32
|
24924
|
+
table_create Ages TABLE_HASH_KEY Int32
|
24925
|
+
column_create Ages user_age COLUMN_INDEX Users age
|
24926
|
+
load \-\-table Users
|
25037
24927
|
[
|
25038
|
-
|
25039
|
-
|
25040
|
-
|
25041
|
-
|
25042
|
-
|
25043
|
-
}
|
24928
|
+
{"_key": "Alice", "age": 12},
|
24929
|
+
{"_key": "Bob", "age": 13},
|
24930
|
+
{"_key": "Calros", "age": 15},
|
24931
|
+
{"_key": "Dave", "age": 16},
|
24932
|
+
{"_key": "Eric", "age": 20}
|
24933
|
+
{"_key": "Frank", "age": 21}
|
25044
24934
|
]
|
25045
|
-
# [[0, 1337566253.89858, 0.000355720520019531], 1]
|
25046
24935
|
.ft P
|
25047
24936
|
.fi
|
25048
24937
|
.UNINDENT
|
25049
24938
|
.UNINDENT
|
25050
24939
|
.sp
|
25051
|
-
|
25052
|
-
\fBlocation\fP column stores the value of coordinate.
|
25053
|
-
The coordinate of Tokyo is stored as sample data.
|
24940
|
+
Here is the query to show the persons to match PG\-13 rating (MPAA).
|
25054
24941
|
.sp
|
25055
24942
|
Execution example:
|
25056
24943
|
.INDENT 0.0
|
@@ -25058,7 +24945,7 @@ Execution example:
|
|
25058
24945
|
.sp
|
25059
24946
|
.nf
|
25060
24947
|
.ft C
|
25061
|
-
select
|
24948
|
+
select Users \-\-filter \(aqbetween(age, 13, "include", 16, "include")\(aq
|
25062
24949
|
# [
|
25063
24950
|
# [
|
25064
24951
|
# 0,
|
@@ -25068,16 +24955,36 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25068
24955
|
# [
|
25069
24956
|
# [
|
25070
24957
|
# [
|
25071
|
-
#
|
24958
|
+
# 3
|
25072
24959
|
# ],
|
25073
24960
|
# [
|
25074
24961
|
# [
|
25075
|
-
# "
|
25076
|
-
# "
|
25077
|
-
# ]
|
25078
|
-
#
|
25079
|
-
#
|
25080
|
-
#
|
24962
|
+
# "_id",
|
24963
|
+
# "UInt32"
|
24964
|
+
# ],
|
24965
|
+
# [
|
24966
|
+
# "_key",
|
24967
|
+
# "ShortText"
|
24968
|
+
# ],
|
24969
|
+
# [
|
24970
|
+
# "age",
|
24971
|
+
# "Int32"
|
24972
|
+
# ]
|
24973
|
+
# ],
|
24974
|
+
# [
|
24975
|
+
# 2,
|
24976
|
+
# "Bob",
|
24977
|
+
# 13
|
24978
|
+
# ],
|
24979
|
+
# [
|
24980
|
+
# 3,
|
24981
|
+
# "Calros",
|
24982
|
+
# 15
|
24983
|
+
# ],
|
24984
|
+
# [
|
24985
|
+
# 4,
|
24986
|
+
# "Dave",
|
24987
|
+
# 16
|
25081
24988
|
# ]
|
25082
24989
|
# ]
|
25083
24990
|
# ]
|
@@ -25087,56 +24994,13 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25087
24994
|
.UNINDENT
|
25088
24995
|
.UNINDENT
|
25089
24996
|
.sp
|
25090
|
-
|
25091
|
-
and the value of coordinate to calculate distance.
|
25092
|
-
.sp
|
25093
|
-
The value ("185428000x\-461000") passed to \fBgeo_distance\fP as the second argument is
|
25094
|
-
the coordinate of London.
|
25095
|
-
.SS Using the explicitly specified value of location
|
25096
|
-
.sp
|
25097
|
-
Here are a schema definition of \fBGeo\fP table and sample data to show usage.
|
25098
|
-
.INDENT 0.0
|
25099
|
-
.INDENT 3.5
|
25100
|
-
.sp
|
25101
|
-
.nf
|
25102
|
-
.ft C
|
25103
|
-
table_create Geo TABLE_HASH_KEY ShortText
|
25104
|
-
column_create Geo distance COLUMN_SCALAR Int32
|
25105
|
-
load \-\-table Geo
|
25106
|
-
[
|
25107
|
-
{
|
25108
|
-
"_key": "the record for geo_distance() result"
|
25109
|
-
}
|
25110
|
-
]
|
25111
|
-
.ft P
|
25112
|
-
.fi
|
25113
|
-
.UNINDENT
|
25114
|
-
.UNINDENT
|
24997
|
+
It returns 13, 14, 15 and 16 years old users.
|
25115
24998
|
.sp
|
25116
|
-
|
25117
|
-
.INDENT 0.0
|
25118
|
-
.INDENT 3.5
|
24999
|
+
\fBbetween\fP function accepts not only a column of table, but also the value.
|
25119
25000
|
.sp
|
25120
|
-
.
|
25121
|
-
.ft C
|
25122
|
-
table_create Geo TABLE_HASH_KEY ShortText
|
25123
|
-
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25124
|
-
column_create Geo distance COLUMN_SCALAR Int32
|
25125
|
-
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25126
|
-
load \-\-table Geo
|
25127
|
-
[
|
25128
|
-
{
|
25129
|
-
"_key": "the record for geo_distance() result"
|
25130
|
-
}
|
25131
|
-
]
|
25132
|
-
# [[0, 1337566253.89858, 0.000355720520019531], 1]
|
25133
|
-
.ft P
|
25134
|
-
.fi
|
25135
|
-
.UNINDENT
|
25136
|
-
.UNINDENT
|
25001
|
+
If you specify the value as 1st parameter, it is checked whether the value is included or not. if it matches to the specified range, it returns the all records because \fBbetween\fP function returns true.
|
25137
25002
|
.sp
|
25138
|
-
|
25139
|
-
\fBdistance\fP column stores the value of distance.
|
25003
|
+
If it doesn\(aqt match to the specified range, it returns no records because \fBbetween\fP function returns false.
|
25140
25004
|
.sp
|
25141
25005
|
Execution example:
|
25142
25006
|
.INDENT 0.0
|
@@ -25144,7 +25008,7 @@ Execution example:
|
|
25144
25008
|
.sp
|
25145
25009
|
.nf
|
25146
25010
|
.ft C
|
25147
|
-
select
|
25011
|
+
select Users \-\-filter \(aqbetween(14, 13, "include", 16, "include")\(aq
|
25148
25012
|
# [
|
25149
25013
|
# [
|
25150
25014
|
# 0,
|
@@ -25154,16 +25018,51 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25154
25018
|
# [
|
25155
25019
|
# [
|
25156
25020
|
# [
|
25157
|
-
#
|
25021
|
+
# 6
|
25158
25022
|
# ],
|
25159
25023
|
# [
|
25160
25024
|
# [
|
25161
|
-
# "
|
25025
|
+
# "_id",
|
25026
|
+
# "UInt32"
|
25027
|
+
# ],
|
25028
|
+
# [
|
25029
|
+
# "_key",
|
25030
|
+
# "ShortText"
|
25031
|
+
# ],
|
25032
|
+
# [
|
25033
|
+
# "age",
|
25162
25034
|
# "Int32"
|
25163
25035
|
# ]
|
25164
25036
|
# ],
|
25165
25037
|
# [
|
25166
|
-
#
|
25038
|
+
# 1,
|
25039
|
+
# "Alice",
|
25040
|
+
# 12
|
25041
|
+
# ],
|
25042
|
+
# [
|
25043
|
+
# 2,
|
25044
|
+
# "Bob",
|
25045
|
+
# 13
|
25046
|
+
# ],
|
25047
|
+
# [
|
25048
|
+
# 3,
|
25049
|
+
# "Calros",
|
25050
|
+
# 15
|
25051
|
+
# ],
|
25052
|
+
# [
|
25053
|
+
# 4,
|
25054
|
+
# "Dave",
|
25055
|
+
# 16
|
25056
|
+
# ],
|
25057
|
+
# [
|
25058
|
+
# 5,
|
25059
|
+
# "Eric",
|
25060
|
+
# 20
|
25061
|
+
# ],
|
25062
|
+
# [
|
25063
|
+
# 6,
|
25064
|
+
# "Frank",
|
25065
|
+
# 21
|
25167
25066
|
# ]
|
25168
25067
|
# ]
|
25169
25068
|
# ]
|
@@ -25173,186 +25072,190 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25173
25072
|
.UNINDENT
|
25174
25073
|
.UNINDENT
|
25175
25074
|
.sp
|
25176
|
-
|
25177
|
-
|
25075
|
+
In the above case, it returns all the records, because 14 exists in between 13 and 16.
|
25076
|
+
This behavior is used for checking the specified value exists or not in the table.
|
25178
25077
|
.SS Parameters
|
25179
|
-
.SS Required parameter
|
25180
25078
|
.sp
|
25181
|
-
There are
|
25182
|
-
.SS \
|
25079
|
+
There are five required parameters, \fBcolumn_or_value\fP, and \fBmin\fP, \fBmin_border\fP, \fBmax\fP and \fBmax_border\fP.
|
25080
|
+
.SS \fBcolumn_or_value\fP
|
25183
25081
|
.sp
|
25184
|
-
It specifies the
|
25185
|
-
|
25082
|
+
It specifies a column of the table or the value.
|
25083
|
+
.SS \fBmin\fP
|
25186
25084
|
.sp
|
25187
|
-
|
25085
|
+
It specifies the minimal border value of the range.
|
25086
|
+
You can control the behavior that the value of \fBmax\fP is included or excluded by \fBmax_border\fP parameter.
|
25087
|
+
.SS \fBmin_border\fP
|
25188
25088
|
.sp
|
25189
|
-
|
25190
|
-
.
|
25089
|
+
It specifies whether the specified range contains the value of \fBmin\fP or not.
|
25090
|
+
The value of \fBmin_border\fP are either "include" or "exclude". If it is "include", \fBmin\fP value is included. If it is "exclude", \fBmin\fP value is not included.
|
25091
|
+
.SS \fBmax\fP
|
25191
25092
|
.sp
|
25192
|
-
It specifies the
|
25193
|
-
|
25093
|
+
It specifies the maximum border value of the range.
|
25094
|
+
You can control the behavior that the value of \fBmax\fP is included or excluded by \fBmax_border\fP parameter.
|
25095
|
+
.SS \fBmax_border\fP
|
25194
25096
|
.sp
|
25195
|
-
|
25196
|
-
|
25097
|
+
It specifies whether the specified range contains the value of \fBmax\fP or not.
|
25098
|
+
The value of \fBmax_border\fP are either "include" or "exclude". If it is "include", \fBmax\fP value is included. If it is "exclude", \fBmax\fP value is not included.
|
25099
|
+
.SS Return value
|
25197
25100
|
.sp
|
25198
|
-
|
25199
|
-
.SS
|
25101
|
+
\fBbetween\fP returns whether the value of column exists in specified the value of range or not. If record is matched to specified the value of range, it returns true. Otherwise, it returns false.
|
25102
|
+
.SS edit_distance
|
25103
|
+
.SS 名前
|
25200
25104
|
.sp
|
25201
|
-
|
25202
|
-
.SS
|
25105
|
+
edit_distance \- 指定した2つの文字列の編集距離を計算する
|
25106
|
+
.SS 書式
|
25107
|
+
.INDENT 0.0
|
25108
|
+
.INDENT 3.5
|
25203
25109
|
.sp
|
25204
|
-
|
25205
|
-
|
25110
|
+
.nf
|
25111
|
+
.ft C
|
25112
|
+
edit_distance(string1, string2)
|
25113
|
+
.ft P
|
25114
|
+
.fi
|
25115
|
+
.UNINDENT
|
25116
|
+
.UNINDENT
|
25117
|
+
.SS 説明
|
25206
25118
|
.sp
|
25207
|
-
|
25119
|
+
groonga組込関数の一つであるedit_distanceについて説明します。組込関数は、script形式のgrn_expr中で呼び出すことができます。
|
25120
|
+
.sp
|
25121
|
+
edit_distance() 関数は、string1に指定した文字列とstring2に指定した文字列の間の編集距離を求めます。
|
25122
|
+
.SS 引数
|
25123
|
+
.sp
|
25124
|
+
\fBstring1\fP
|
25208
25125
|
.INDENT 0.0
|
25209
25126
|
.INDENT 3.5
|
25210
|
-
|
25211
|
-
.IP \(bu 2
|
25212
|
-
\fBrectangle\fP
|
25213
|
-
.IP \(bu 2
|
25214
|
-
\fBsphere\fP
|
25215
|
-
.IP \(bu 2
|
25216
|
-
\fBellipsoid\fP
|
25217
|
-
.UNINDENT
|
25127
|
+
文字列を指定します
|
25218
25128
|
.UNINDENT
|
25219
25129
|
.UNINDENT
|
25220
25130
|
.sp
|
25221
|
-
\
|
25131
|
+
\fBstring2\fP
|
25222
25132
|
.INDENT 0.0
|
25223
25133
|
.INDENT 3.5
|
25224
|
-
|
25225
|
-
calculate the value of distance between two points across meridian,
|
25226
|
-
equator or the date line if you use \fBsphere\fP or \fBellipsoid\fP as
|
25227
|
-
approximate type. There is not such a limitation for \fBrectangle\fP.
|
25228
|
-
This is temporary limitation according to the implementation of groonga,
|
25229
|
-
but it will be fixed in the future release.
|
25134
|
+
もうひとつの文字列を指定します
|
25230
25135
|
.UNINDENT
|
25231
25136
|
.UNINDENT
|
25232
|
-
.SS
|
25233
|
-
.sp
|
25234
|
-
This parameter require to approximate the geographical features
|
25235
|
-
by square approximation for calculating the distance.
|
25236
|
-
.sp
|
25237
|
-
Since the value of distance is calculated by simple formula,
|
25238
|
-
you can calculate the value of distance fast.
|
25239
|
-
But, the error of distance increases as it approaches the pole.
|
25240
|
-
.sp
|
25241
|
-
You can also specify \fBrect\fP as abbrev expression.
|
25242
|
-
.sp
|
25243
|
-
Here is a sample about calculating the value of distance with column value.
|
25137
|
+
.SS 返値
|
25244
25138
|
.sp
|
25245
|
-
|
25139
|
+
指定した2つ文字列の編集距離をUint32型の値として返します。
|
25140
|
+
.SS 例
|
25246
25141
|
.INDENT 0.0
|
25247
25142
|
.INDENT 3.5
|
25248
25143
|
.sp
|
25249
25144
|
.nf
|
25250
25145
|
.ft C
|
25251
|
-
|
25252
|
-
|
25253
|
-
# [
|
25254
|
-
# 0,
|
25255
|
-
# 1337566253.89858,
|
25256
|
-
# 0.000355720520019531
|
25257
|
-
# ],
|
25258
|
-
# [
|
25259
|
-
# [
|
25260
|
-
# [
|
25261
|
-
# 1
|
25262
|
-
# ],
|
25263
|
-
# [
|
25264
|
-
# [
|
25265
|
-
# "_score",
|
25266
|
-
# "Int32"
|
25267
|
-
# ]
|
25268
|
-
# ],
|
25269
|
-
# [
|
25270
|
-
# 5715104
|
25271
|
-
# ]
|
25272
|
-
# ]
|
25273
|
-
# ]
|
25274
|
-
# ]
|
25146
|
+
edit_distance(title, "hoge")
|
25147
|
+
1
|
25275
25148
|
.ft P
|
25276
25149
|
.fi
|
25277
25150
|
.UNINDENT
|
25278
25151
|
.UNINDENT
|
25152
|
+
.SS geo_distance
|
25153
|
+
.SS Summary
|
25279
25154
|
.sp
|
25280
|
-
|
25155
|
+
\fBgeo_distance\fP calculates the value of distance between specified two points.
|
25156
|
+
.SS Syntax
|
25281
25157
|
.sp
|
25282
|
-
|
25158
|
+
\fBgeo_distance\fP requires two point.
|
25159
|
+
The parameter \fBapproximate_type\fP is optional:
|
25283
25160
|
.INDENT 0.0
|
25284
25161
|
.INDENT 3.5
|
25285
25162
|
.sp
|
25286
25163
|
.nf
|
25287
25164
|
.ft C
|
25288
|
-
|
25289
|
-
|
25290
|
-
# [
|
25291
|
-
# 0,
|
25292
|
-
# 1337566253.89858,
|
25293
|
-
# 0.000355720520019531
|
25294
|
-
# ],
|
25295
|
-
# [
|
25296
|
-
# [
|
25297
|
-
# [
|
25298
|
-
# 1
|
25299
|
-
# ],
|
25300
|
-
# [
|
25301
|
-
# [
|
25302
|
-
# "distance",
|
25303
|
-
# "Int32"
|
25304
|
-
# ]
|
25305
|
-
# ],
|
25306
|
-
# [
|
25307
|
-
# 5807750
|
25308
|
-
# ]
|
25309
|
-
# ]
|
25310
|
-
# ]
|
25311
|
-
# ]
|
25165
|
+
geo_distance(point1, point2)
|
25166
|
+
geo_distance(point1, point2, approximate_type)
|
25312
25167
|
.ft P
|
25313
25168
|
.fi
|
25314
25169
|
.UNINDENT
|
25315
25170
|
.UNINDENT
|
25316
25171
|
.sp
|
25317
|
-
|
25172
|
+
The default value of \fBapproximate_type\fP is \fB"rectangle"\fP.
|
25173
|
+
If you omit \fBapproximate_type\fP, \fBgeo_distance\fP calculates the value of
|
25174
|
+
distance as if \fB"rectangle"\fP was specified.
|
25175
|
+
.SS Usage
|
25318
25176
|
.sp
|
25319
|
-
|
25320
|
-
.INDENT 0.0
|
25321
|
-
.INDENT 3.5
|
25177
|
+
\fBgeo_distance\fP is one of the groonga builtin functions.
|
25322
25178
|
.sp
|
25323
|
-
|
25324
|
-
.
|
25325
|
-
|
25326
|
-
|
25327
|
-
|
25328
|
-
|
25329
|
-
|
25330
|
-
|
25331
|
-
|
25332
|
-
|
25333
|
-
|
25334
|
-
|
25335
|
-
|
25336
|
-
|
25337
|
-
|
25338
|
-
|
25339
|
-
|
25340
|
-
|
25341
|
-
|
25342
|
-
|
25343
|
-
|
25344
|
-
|
25345
|
-
|
25346
|
-
|
25347
|
-
|
25348
|
-
|
25179
|
+
You can call a builtin function in \fB/reference/grn_expr\fP
|
25180
|
+
.sp
|
25181
|
+
\fBgeo_distance\fP function calculates the value of distance (approximate value)
|
25182
|
+
between the coordinate of \fBpoint1\fP and the coordinate of \fBpoint2\fP.
|
25183
|
+
.sp
|
25184
|
+
\fBNOTE:\fP
|
25185
|
+
.INDENT 0.0
|
25186
|
+
.INDENT 3.5
|
25187
|
+
groonga provides three built in functions for calculating the value of distance.
|
25188
|
+
There are \fBgeo_distance()\fP, \fBgeo_distance2()\fP and \fBgeo_distance3()\fP.
|
25189
|
+
The difference of them is the algorithm of calculating distance.
|
25190
|
+
\fBgeo_distance2()\fP and \fBgeo_distance3()\fP were deprecated since version 1.2.9.
|
25191
|
+
Use \fBgeo_distance(point1, point2, "sphere")\fP instead of \fBgeo_distance2(point1, point2)\fP.
|
25192
|
+
Use \fBgeo_distance(point1, point2, "ellipsoid")\fP instead of \fBgeo_distance3(point1, point2)\fP.
|
25193
|
+
.UNINDENT
|
25194
|
+
.UNINDENT
|
25195
|
+
.sp
|
25196
|
+
Lets\(aqs learn about \fBgeo_distance\fP usage with examples.
|
25197
|
+
This section shows simple usages.
|
25198
|
+
.sp
|
25199
|
+
Here are two schema definition and sample data to show the difference according to the usage.
|
25200
|
+
Those samples show how to calculate the value of distance between New York City and London.
|
25201
|
+
.INDENT 0.0
|
25202
|
+
.IP 1. 3
|
25203
|
+
Using the column value of location for calculating the distance (\fBCities\fP table)
|
25204
|
+
.IP 2. 3
|
25205
|
+
Using the explicitly specified coordinates for calculating the distance (\fBGeo\fP table)
|
25206
|
+
.UNINDENT
|
25207
|
+
.SS Using the column value of location
|
25208
|
+
.sp
|
25209
|
+
Here are a schema definition of \fBCities\fP table and sample data to show usage.
|
25210
|
+
.INDENT 0.0
|
25211
|
+
.INDENT 3.5
|
25212
|
+
.sp
|
25213
|
+
.nf
|
25214
|
+
.ft C
|
25215
|
+
table_create Cities TABLE_HASH_KEY ShortText
|
25216
|
+
column_create Cities location COLUMN_SCALAR WGS84GeoPoint
|
25217
|
+
load \-\-table Cities
|
25218
|
+
[
|
25219
|
+
{
|
25220
|
+
"_key", "location"
|
25221
|
+
},
|
25222
|
+
{
|
25223
|
+
"New York City", "146566000x\-266422000",
|
25224
|
+
},
|
25225
|
+
]
|
25349
25226
|
.ft P
|
25350
25227
|
.fi
|
25351
25228
|
.UNINDENT
|
25352
25229
|
.UNINDENT
|
25353
25230
|
.sp
|
25354
|
-
|
25355
|
-
|
25231
|
+
Execution example:
|
25232
|
+
.INDENT 0.0
|
25233
|
+
.INDENT 3.5
|
25234
|
+
.sp
|
25235
|
+
.nf
|
25236
|
+
.ft C
|
25237
|
+
table_create Cities TABLE_HASH_KEY ShortText
|
25238
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25239
|
+
column_create Cities location COLUMN_SCALAR WGS84GeoPoint
|
25240
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25241
|
+
load \-\-table Cities
|
25242
|
+
[
|
25243
|
+
{
|
25244
|
+
"_key", "location"
|
25245
|
+
},
|
25246
|
+
{
|
25247
|
+
"New York City", "146566000x\-266422000",
|
25248
|
+
},
|
25249
|
+
]
|
25250
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 1]
|
25251
|
+
.ft P
|
25252
|
+
.fi
|
25253
|
+
.UNINDENT
|
25254
|
+
.UNINDENT
|
25255
|
+
.sp
|
25256
|
+
This execution example creates a table named \fBCities\fP which has one column named \fBlocation\fP.
|
25257
|
+
\fBlocation\fP column stores the value of coordinate.
|
25258
|
+
The coordinate of Tokyo is stored as sample data.
|
25356
25259
|
.sp
|
25357
25260
|
Execution example:
|
25358
25261
|
.INDENT 0.0
|
@@ -25360,7 +25263,7 @@ Execution example:
|
|
25360
25263
|
.sp
|
25361
25264
|
.nf
|
25362
25265
|
.ft C
|
25363
|
-
select
|
25266
|
+
select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo_distance(location, "185428000x\-461000", "rectangle")\(aq
|
25364
25267
|
# [
|
25365
25268
|
# [
|
25366
25269
|
# 0,
|
@@ -25374,12 +25277,12 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25374
25277
|
# ],
|
25375
25278
|
# [
|
25376
25279
|
# [
|
25377
|
-
# "
|
25280
|
+
# "_score",
|
25378
25281
|
# "Int32"
|
25379
25282
|
# ]
|
25380
25283
|
# ],
|
25381
25284
|
# [
|
25382
|
-
#
|
25285
|
+
# 5715104
|
25383
25286
|
# ]
|
25384
25287
|
# ]
|
25385
25288
|
# ]
|
@@ -25389,8 +25292,31 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25389
25292
|
.UNINDENT
|
25390
25293
|
.UNINDENT
|
25391
25294
|
.sp
|
25392
|
-
This sample shows the value of
|
25393
|
-
|
25295
|
+
This sample shows that \fBgeo_distance\fP use the value of \fBlocation\fP column
|
25296
|
+
and the value of coordinate to calculate distance.
|
25297
|
+
.sp
|
25298
|
+
The value ("185428000x\-461000") passed to \fBgeo_distance\fP as the second argument is
|
25299
|
+
the coordinate of London.
|
25300
|
+
.SS Using the explicitly specified value of location
|
25301
|
+
.sp
|
25302
|
+
Here are a schema definition of \fBGeo\fP table and sample data to show usage.
|
25303
|
+
.INDENT 0.0
|
25304
|
+
.INDENT 3.5
|
25305
|
+
.sp
|
25306
|
+
.nf
|
25307
|
+
.ft C
|
25308
|
+
table_create Geo TABLE_HASH_KEY ShortText
|
25309
|
+
column_create Geo distance COLUMN_SCALAR Int32
|
25310
|
+
load \-\-table Geo
|
25311
|
+
[
|
25312
|
+
{
|
25313
|
+
"_key": "the record for geo_distance() result"
|
25314
|
+
}
|
25315
|
+
]
|
25316
|
+
.ft P
|
25317
|
+
.fi
|
25318
|
+
.UNINDENT
|
25319
|
+
.UNINDENT
|
25394
25320
|
.sp
|
25395
25321
|
Execution example:
|
25396
25322
|
.INDENT 0.0
|
@@ -25398,7 +25324,32 @@ Execution example:
|
|
25398
25324
|
.sp
|
25399
25325
|
.nf
|
25400
25326
|
.ft C
|
25401
|
-
|
25327
|
+
table_create Geo TABLE_HASH_KEY ShortText
|
25328
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25329
|
+
column_create Geo distance COLUMN_SCALAR Int32
|
25330
|
+
# [[0, 1337566253.89858, 0.000355720520019531], true]
|
25331
|
+
load \-\-table Geo
|
25332
|
+
[
|
25333
|
+
{
|
25334
|
+
"_key": "the record for geo_distance() result"
|
25335
|
+
}
|
25336
|
+
]
|
25337
|
+
# [[0, 1337566253.89858, 0.000355720520019531], 1]
|
25338
|
+
.ft P
|
25339
|
+
.fi
|
25340
|
+
.UNINDENT
|
25341
|
+
.UNINDENT
|
25342
|
+
.sp
|
25343
|
+
This execution example creates a table named \fBGeo\fP which has one column named \fBdistance\fP.
|
25344
|
+
\fBdistance\fP column stores the value of distance.
|
25345
|
+
.sp
|
25346
|
+
Execution example:
|
25347
|
+
.INDENT 0.0
|
25348
|
+
.INDENT 3.5
|
25349
|
+
.sp
|
25350
|
+
.nf
|
25351
|
+
.ft C
|
25352
|
+
select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("146566000x\-266422000", "185428000x\-461000", "rectangle")\(aq
|
25402
25353
|
# [
|
25403
25354
|
# [
|
25404
25355
|
# 0,
|
@@ -25417,7 +25368,7 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25417
25368
|
# ]
|
25418
25369
|
# ],
|
25419
25370
|
# [
|
25420
|
-
#
|
25371
|
+
# 5807750
|
25421
25372
|
# ]
|
25422
25373
|
# ]
|
25423
25374
|
# ]
|
@@ -25427,36 +25378,72 @@ select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("1
|
|
25427
25378
|
.UNINDENT
|
25428
25379
|
.UNINDENT
|
25429
25380
|
.sp
|
25430
|
-
This sample shows
|
25431
|
-
|
25381
|
+
This sample shows that \fBgeo_distance\fP use the coordinate of London
|
25382
|
+
and the coordinate of New York to calculate distance.
|
25383
|
+
.SS Parameters
|
25384
|
+
.SS Required parameter
|
25432
25385
|
.sp
|
25433
|
-
\
|
25386
|
+
There are two required parameter, \fBpoint1\fP and \fBpoint2\fP.
|
25387
|
+
.SS \fBpoint1\fP
|
25388
|
+
.sp
|
25389
|
+
It specifies the start point that
|
25390
|
+
you want to calculate the value of distance between two points.
|
25391
|
+
.sp
|
25392
|
+
You can specify the value of GeoPoint type. [1]
|
25393
|
+
.sp
|
25394
|
+
See \fB/reference/types\fP about GeoPoint.
|
25395
|
+
.SS \fBpoint2\fP
|
25396
|
+
.sp
|
25397
|
+
It specifies the end point that
|
25398
|
+
you want to calculate the value of distance between two points.
|
25399
|
+
.sp
|
25400
|
+
You can specify the value of GeoPoint type or
|
25401
|
+
the string indicating the coordinate.
|
25402
|
+
.sp
|
25403
|
+
See \fB/reference/types\fP about GeoPoint and the coordinate.
|
25404
|
+
.SS Optional parameter
|
25405
|
+
.sp
|
25406
|
+
There is a optional parameter, \fBapproximate_type\fP.
|
25407
|
+
.SS \fBapproximate_type\fP
|
25408
|
+
.sp
|
25409
|
+
It specifies how to approximate the geographical features for calculating
|
25410
|
+
the value of distance.
|
25411
|
+
.sp
|
25412
|
+
You can specify the value of \fBapproximate_type\fP by one of the followings.
|
25434
25413
|
.INDENT 0.0
|
25435
25414
|
.INDENT 3.5
|
25436
|
-
|
25415
|
+
.INDENT 0.0
|
25416
|
+
.IP \(bu 2
|
25417
|
+
\fBrectangle\fP
|
25418
|
+
.IP \(bu 2
|
25419
|
+
\fBsphere\fP
|
25420
|
+
.IP \(bu 2
|
25421
|
+
\fBellipsoid\fP
|
25422
|
+
.UNINDENT
|
25437
25423
|
.UNINDENT
|
25438
25424
|
.UNINDENT
|
25439
25425
|
.sp
|
25440
25426
|
\fBNOTE:\fP
|
25441
25427
|
.INDENT 0.0
|
25442
25428
|
.INDENT 3.5
|
25443
|
-
\fBgeo_distance\fP
|
25444
|
-
the value of
|
25445
|
-
\
|
25446
|
-
|
25447
|
-
|
25448
|
-
|
25429
|
+
There is a limitation about \fBgeo_distance\fP. \fBgeo_distance\fP can not
|
25430
|
+
calculate the value of distance between two points across meridian,
|
25431
|
+
equator or the date line if you use \fBsphere\fP or \fBellipsoid\fP as
|
25432
|
+
approximate type. There is not such a limitation for \fBrectangle\fP.
|
25433
|
+
This is temporary limitation according to the implementation of groonga,
|
25434
|
+
but it will be fixed in the future release.
|
25449
25435
|
.UNINDENT
|
25450
25436
|
.UNINDENT
|
25451
|
-
.SS \
|
25437
|
+
.SS \fBrectangle\fP
|
25452
25438
|
.sp
|
25453
25439
|
This parameter require to approximate the geographical features
|
25454
|
-
by
|
25440
|
+
by square approximation for calculating the distance.
|
25455
25441
|
.sp
|
25456
|
-
|
25457
|
-
|
25442
|
+
Since the value of distance is calculated by simple formula,
|
25443
|
+
you can calculate the value of distance fast.
|
25444
|
+
But, the error of distance increases as it approaches the pole.
|
25458
25445
|
.sp
|
25459
|
-
You can also specify \
|
25446
|
+
You can also specify \fBrect\fP as abbrev expression.
|
25460
25447
|
.sp
|
25461
25448
|
Here is a sample about calculating the value of distance with column value.
|
25462
25449
|
.sp
|
@@ -25466,7 +25453,7 @@ Execution example:
|
|
25466
25453
|
.sp
|
25467
25454
|
.nf
|
25468
25455
|
.ft C
|
25469
|
-
select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo_distance(location, "185428000x\-461000", "
|
25456
|
+
select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo_distance(location, "185428000x\-461000", "rectangle")\(aq
|
25470
25457
|
# [
|
25471
25458
|
# [
|
25472
25459
|
# 0,
|
@@ -25485,7 +25472,7 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25485
25472
|
# ]
|
25486
25473
|
# ],
|
25487
25474
|
# [
|
25488
|
-
#
|
25475
|
+
# 5715104
|
25489
25476
|
# ]
|
25490
25477
|
# ]
|
25491
25478
|
# ]
|
@@ -25494,18 +25481,8 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25494
25481
|
.fi
|
25495
25482
|
.UNINDENT
|
25496
25483
|
.UNINDENT
|
25497
|
-
.SS \fBellipsoid\fP
|
25498
|
-
.sp
|
25499
|
-
This parameter require to approximate the geographical features
|
25500
|
-
by ellipsoid approximation for calculating the distance.
|
25501
|
-
.sp
|
25502
|
-
It uses the calculation of distance by the formula of Hubeny.
|
25503
|
-
It is slower than \fBsphere\fP, but the error of distance becomes
|
25504
|
-
smaller than \fBsphere\fP.
|
25505
|
-
.sp
|
25506
|
-
You can also specify \fBellip\fP as abbrev expression.
|
25507
25484
|
.sp
|
25508
|
-
Here is a sample about calculating the value of distance with
|
25485
|
+
Here is a sample about calculating the value of distance with explicitly specified point.
|
25509
25486
|
.sp
|
25510
25487
|
Execution example:
|
25511
25488
|
.INDENT 0.0
|
@@ -25513,7 +25490,7 @@ Execution example:
|
|
25513
25490
|
.sp
|
25514
25491
|
.nf
|
25515
25492
|
.ft C
|
25516
|
-
select
|
25493
|
+
select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("146566000x\-266422000", "185428000x\-461000", "rectangle")\(aq
|
25517
25494
|
# [
|
25518
25495
|
# [
|
25519
25496
|
# 0,
|
@@ -25527,12 +25504,12 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25527
25504
|
# ],
|
25528
25505
|
# [
|
25529
25506
|
# [
|
25530
|
-
# "
|
25507
|
+
# "distance",
|
25531
25508
|
# "Int32"
|
25532
25509
|
# ]
|
25533
25510
|
# ],
|
25534
25511
|
# [
|
25535
|
-
#
|
25512
|
+
# 5807750
|
25536
25513
|
# ]
|
25537
25514
|
# ]
|
25538
25515
|
# ]
|
@@ -25541,14 +25518,242 @@ select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo
|
|
25541
25518
|
.fi
|
25542
25519
|
.UNINDENT
|
25543
25520
|
.UNINDENT
|
25544
|
-
.SS Return value
|
25545
25521
|
.sp
|
25546
|
-
|
25547
|
-
|
25548
|
-
|
25549
|
-
.
|
25550
|
-
|
25551
|
-
.
|
25522
|
+
Here are samples about calculating the value of distance with explicitly specified point across meridian, equator, the date line.
|
25523
|
+
.sp
|
25524
|
+
Execution example:
|
25525
|
+
.INDENT 0.0
|
25526
|
+
.INDENT 3.5
|
25527
|
+
.sp
|
25528
|
+
.nf
|
25529
|
+
.ft C
|
25530
|
+
select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("175904000x8464000", "145508000x\-13291000", "rectangle")\(aq
|
25531
|
+
# [
|
25532
|
+
# [
|
25533
|
+
# 0,
|
25534
|
+
# 1337566253.89858,
|
25535
|
+
# 0.000355720520019531
|
25536
|
+
# ],
|
25537
|
+
# [
|
25538
|
+
# [
|
25539
|
+
# [
|
25540
|
+
# 1
|
25541
|
+
# ],
|
25542
|
+
# [
|
25543
|
+
# [
|
25544
|
+
# "distance",
|
25545
|
+
# "Int32"
|
25546
|
+
# ]
|
25547
|
+
# ],
|
25548
|
+
# [
|
25549
|
+
# 1051293
|
25550
|
+
# ]
|
25551
|
+
# ]
|
25552
|
+
# ]
|
25553
|
+
# ]
|
25554
|
+
.ft P
|
25555
|
+
.fi
|
25556
|
+
.UNINDENT
|
25557
|
+
.UNINDENT
|
25558
|
+
.sp
|
25559
|
+
This sample shows the value of distance across meridian.
|
25560
|
+
The return value of \fBgeo_distance("175904000x8464000", "145508000x\-13291000", "rectangle")\fP is the value of distance from Paris, Flance to Madrid, Spain.
|
25561
|
+
.sp
|
25562
|
+
Execution example:
|
25563
|
+
.INDENT 0.0
|
25564
|
+
.INDENT 3.5
|
25565
|
+
.sp
|
25566
|
+
.nf
|
25567
|
+
.ft C
|
25568
|
+
select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("146566000x\-266422000", "\-56880000x\-172310000", "rectangle")\(aq
|
25569
|
+
# [
|
25570
|
+
# [
|
25571
|
+
# 0,
|
25572
|
+
# 1337566253.89858,
|
25573
|
+
# 0.000355720520019531
|
25574
|
+
# ],
|
25575
|
+
# [
|
25576
|
+
# [
|
25577
|
+
# [
|
25578
|
+
# 1
|
25579
|
+
# ],
|
25580
|
+
# [
|
25581
|
+
# [
|
25582
|
+
# "distance",
|
25583
|
+
# "Int32"
|
25584
|
+
# ]
|
25585
|
+
# ],
|
25586
|
+
# [
|
25587
|
+
# 6880439
|
25588
|
+
# ]
|
25589
|
+
# ]
|
25590
|
+
# ]
|
25591
|
+
# ]
|
25592
|
+
.ft P
|
25593
|
+
.fi
|
25594
|
+
.UNINDENT
|
25595
|
+
.UNINDENT
|
25596
|
+
.sp
|
25597
|
+
This sample shows the value of distance across equator.
|
25598
|
+
The return value of \fBgeo_distance("146566000x\-266422000", "\-56880000x\-172310000", "rectangle")\fP is the value of distance from New York, The United Status to Brasillia, Brasil.
|
25599
|
+
.sp
|
25600
|
+
Execution example:
|
25601
|
+
.INDENT 0.0
|
25602
|
+
.INDENT 3.5
|
25603
|
+
.sp
|
25604
|
+
.nf
|
25605
|
+
.ft C
|
25606
|
+
select Geo \-\-output_columns distance \-\-scorer \(aqdistance = geo_distance("143660000x419009000", "135960000x\-440760000", "rectangle")\(aq
|
25607
|
+
# [
|
25608
|
+
# [
|
25609
|
+
# 0,
|
25610
|
+
# 1337566253.89858,
|
25611
|
+
# 0.000355720520019531
|
25612
|
+
# ],
|
25613
|
+
# [
|
25614
|
+
# [
|
25615
|
+
# [
|
25616
|
+
# 1
|
25617
|
+
# ],
|
25618
|
+
# [
|
25619
|
+
# [
|
25620
|
+
# "distance",
|
25621
|
+
# "Int32"
|
25622
|
+
# ]
|
25623
|
+
# ],
|
25624
|
+
# [
|
25625
|
+
# 10475205
|
25626
|
+
# ]
|
25627
|
+
# ]
|
25628
|
+
# ]
|
25629
|
+
# ]
|
25630
|
+
.ft P
|
25631
|
+
.fi
|
25632
|
+
.UNINDENT
|
25633
|
+
.UNINDENT
|
25634
|
+
.sp
|
25635
|
+
This sample shows the value of distance across the date line.
|
25636
|
+
The return value of \fBgeo_distance("143660000x419009000", "135960000x\-440760000", "rectangle")\fP is the value of distance from Beijin, China to San Francisco, The United States.
|
25637
|
+
.sp
|
25638
|
+
\fBNOTE:\fP
|
25639
|
+
.INDENT 0.0
|
25640
|
+
.INDENT 3.5
|
25641
|
+
\fBgeo_distance\fP uses square approximation as default. If you omit \fBapproximate_type\fP, \fBgeo_distance\fP behaves like \fBrectangle\fP was specified.
|
25642
|
+
.UNINDENT
|
25643
|
+
.UNINDENT
|
25644
|
+
.sp
|
25645
|
+
\fBNOTE:\fP
|
25646
|
+
.INDENT 0.0
|
25647
|
+
.INDENT 3.5
|
25648
|
+
\fBgeo_distance\fP accepts the string indicating the coordinate as
|
25649
|
+
the value of \fBpoint1\fP when the value of \fBapproximate_type\fP is
|
25650
|
+
\fB"rectangle"\fP.
|
25651
|
+
If you specified the string indicating the coordinate as the value
|
25652
|
+
of \fBpoint1\fP with \fBsphere\fP or \fBellipsoid\fP, \fBgeo_distance\fP
|
25653
|
+
returns 0 as the value of distance.
|
25654
|
+
.UNINDENT
|
25655
|
+
.UNINDENT
|
25656
|
+
.SS \fBsphere\fP
|
25657
|
+
.sp
|
25658
|
+
This parameter require to approximate the geographical features
|
25659
|
+
by spherical approximation for calculating the distance.
|
25660
|
+
.sp
|
25661
|
+
It is slower than \fBrectangle\fP, but the error of distance becomes
|
25662
|
+
smaller than \fBrectangle\fP.
|
25663
|
+
.sp
|
25664
|
+
You can also specify \fBsphr\fP as abbrev expression.
|
25665
|
+
.sp
|
25666
|
+
Here is a sample about calculating the value of distance with column value.
|
25667
|
+
.sp
|
25668
|
+
Execution example:
|
25669
|
+
.INDENT 0.0
|
25670
|
+
.INDENT 3.5
|
25671
|
+
.sp
|
25672
|
+
.nf
|
25673
|
+
.ft C
|
25674
|
+
select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo_distance(location, "185428000x\-461000", "sphere")\(aq
|
25675
|
+
# [
|
25676
|
+
# [
|
25677
|
+
# 0,
|
25678
|
+
# 1337566253.89858,
|
25679
|
+
# 0.000355720520019531
|
25680
|
+
# ],
|
25681
|
+
# [
|
25682
|
+
# [
|
25683
|
+
# [
|
25684
|
+
# 1
|
25685
|
+
# ],
|
25686
|
+
# [
|
25687
|
+
# [
|
25688
|
+
# "_score",
|
25689
|
+
# "Int32"
|
25690
|
+
# ]
|
25691
|
+
# ],
|
25692
|
+
# [
|
25693
|
+
# 5715102
|
25694
|
+
# ]
|
25695
|
+
# ]
|
25696
|
+
# ]
|
25697
|
+
# ]
|
25698
|
+
.ft P
|
25699
|
+
.fi
|
25700
|
+
.UNINDENT
|
25701
|
+
.UNINDENT
|
25702
|
+
.SS \fBellipsoid\fP
|
25703
|
+
.sp
|
25704
|
+
This parameter require to approximate the geographical features
|
25705
|
+
by ellipsoid approximation for calculating the distance.
|
25706
|
+
.sp
|
25707
|
+
It uses the calculation of distance by the formula of Hubeny.
|
25708
|
+
It is slower than \fBsphere\fP, but the error of distance becomes
|
25709
|
+
smaller than \fBsphere\fP.
|
25710
|
+
.sp
|
25711
|
+
You can also specify \fBellip\fP as abbrev expression.
|
25712
|
+
.sp
|
25713
|
+
Here is a sample about calculating the value of distance with column value.
|
25714
|
+
.sp
|
25715
|
+
Execution example:
|
25716
|
+
.INDENT 0.0
|
25717
|
+
.INDENT 3.5
|
25718
|
+
.sp
|
25719
|
+
.nf
|
25720
|
+
.ft C
|
25721
|
+
select Cities \-\-output_columns _score \-\-filter 1 \-\-scorer \(aq_score = geo_distance(location, "185428000x\-461000", "ellipsoid")\(aq
|
25722
|
+
# [
|
25723
|
+
# [
|
25724
|
+
# 0,
|
25725
|
+
# 1337566253.89858,
|
25726
|
+
# 0.000355720520019531
|
25727
|
+
# ],
|
25728
|
+
# [
|
25729
|
+
# [
|
25730
|
+
# [
|
25731
|
+
# 1
|
25732
|
+
# ],
|
25733
|
+
# [
|
25734
|
+
# [
|
25735
|
+
# "_score",
|
25736
|
+
# "Int32"
|
25737
|
+
# ]
|
25738
|
+
# ],
|
25739
|
+
# [
|
25740
|
+
# 5706263
|
25741
|
+
# ]
|
25742
|
+
# ]
|
25743
|
+
# ]
|
25744
|
+
# ]
|
25745
|
+
.ft P
|
25746
|
+
.fi
|
25747
|
+
.UNINDENT
|
25748
|
+
.UNINDENT
|
25749
|
+
.SS Return value
|
25750
|
+
.sp
|
25751
|
+
\fBgeo_distance\fP returns the value of distance in float type.
|
25752
|
+
The unit of return value is meter.
|
25753
|
+
Footnote
|
25754
|
+
.IP [1] 5
|
25755
|
+
You can specify whether TokyoGeoPoint or WGS84GeoPoint.
|
25756
|
+
.SS geo_in_circle
|
25552
25757
|
.SS 名前
|
25553
25758
|
.sp
|
25554
25759
|
geo_in_circle \- 座標が円の範囲内に存在するかどうかを調べます。
|
@@ -27370,7 +27575,7 @@ can always map database files onto memory. It is no problem until
|
|
27370
27575
|
groonga touch mapped database files that their size is larger than
|
27371
27576
|
memory and swap. Groonga recommends the configuration.
|
27372
27577
|
.sp
|
27373
|
-
See \fI\%Linux kernel
|
27578
|
+
See \fI\%Linux kernel documentation about overcommit\fP
|
27374
27579
|
about \fBvm.overcommit_memory\fP parameter details.
|
27375
27580
|
.sp
|
27376
27581
|
You can set the configuration by putting a configuration file
|
@@ -27640,13 +27845,153 @@ TODO...
|
|
27640
27845
|
.SS Reference
|
27641
27846
|
.INDENT 0.0
|
27642
27847
|
.TP
|
27643
|
-
.B
|
27644
|
-
|
27848
|
+
.B GRN_COLUMN_NAME_ID
|
27849
|
+
It returns the name of \fB/reference/pseudo_column\fP \fB_id\fP.
|
27850
|
+
.sp
|
27851
|
+
It is useful to use with \fBGRN_COLUMN_NAME_ID_LEN\fP like
|
27852
|
+
the following:
|
27645
27853
|
.INDENT 7.0
|
27854
|
+
.INDENT 3.5
|
27855
|
+
.sp
|
27856
|
+
.nf
|
27857
|
+
.ft C
|
27858
|
+
grn_obj *id_column;
|
27859
|
+
id_column = grn_ctx_get(ctx, GRN_COLUMN_NAME_ID, GRN_COLUMN_NAME_ID_LEN);
|
27860
|
+
.ft P
|
27861
|
+
.fi
|
27862
|
+
.UNINDENT
|
27863
|
+
.UNINDENT
|
27864
|
+
.sp
|
27865
|
+
Since 3.1.1.
|
27866
|
+
.UNINDENT
|
27867
|
+
.INDENT 0.0
|
27646
27868
|
.TP
|
27647
|
-
.B
|
27869
|
+
.B GRN_COLUMN_NAME_ID_LEN
|
27870
|
+
It returns the byte size of \fBGRN_COLUMN_NAME_ID\fP.
|
27871
|
+
.sp
|
27872
|
+
Since 3.1.1.
|
27873
|
+
.UNINDENT
|
27874
|
+
.INDENT 0.0
|
27875
|
+
.TP
|
27876
|
+
.B GRN_COLUMN_NAME_KEY
|
27877
|
+
It returns the name of \fB/reference/pseudo_column\fP \fB_key\fP.
|
27878
|
+
.sp
|
27879
|
+
It is useful to use with \fBGRN_COLUMN_NAME_KEY_LEN\fP like
|
27880
|
+
the following:
|
27648
27881
|
.INDENT 7.0
|
27649
|
-
.
|
27882
|
+
.INDENT 3.5
|
27883
|
+
.sp
|
27884
|
+
.nf
|
27885
|
+
.ft C
|
27886
|
+
grn_obj *key_column;
|
27887
|
+
key_column = grn_ctx_get(ctx, GRN_COLUMN_NAME_KEY, GRN_COLUMN_NAME_KEY_LEN);
|
27888
|
+
.ft P
|
27889
|
+
.fi
|
27890
|
+
.UNINDENT
|
27891
|
+
.UNINDENT
|
27892
|
+
.sp
|
27893
|
+
Since 3.1.1.
|
27894
|
+
.UNINDENT
|
27895
|
+
.INDENT 0.0
|
27896
|
+
.TP
|
27897
|
+
.B GRN_COLUMN_NAME_KEY_LEN
|
27898
|
+
It returns the byte size of \fBGRN_COLUMN_NAME_KEY\fP.
|
27899
|
+
.sp
|
27900
|
+
Since 3.1.1.
|
27901
|
+
.UNINDENT
|
27902
|
+
.INDENT 0.0
|
27903
|
+
.TP
|
27904
|
+
.B GRN_COLUMN_NAME_VALUE
|
27905
|
+
It returns the name of \fB/reference/pseudo_column\fP \fB_value\fP.
|
27906
|
+
.sp
|
27907
|
+
It is useful to use with \fBGRN_COLUMN_NAME_VALUE_LEN\fP like
|
27908
|
+
the following:
|
27909
|
+
.INDENT 7.0
|
27910
|
+
.INDENT 3.5
|
27911
|
+
.sp
|
27912
|
+
.nf
|
27913
|
+
.ft C
|
27914
|
+
grn_obj *value_column;
|
27915
|
+
value_column = grn_ctx_get(ctx, GRN_COLUMN_NAME_VALUE, GRN_COLUMN_NAME_VALUE_LEN);
|
27916
|
+
.ft P
|
27917
|
+
.fi
|
27918
|
+
.UNINDENT
|
27919
|
+
.UNINDENT
|
27920
|
+
.sp
|
27921
|
+
Since 3.1.1.
|
27922
|
+
.UNINDENT
|
27923
|
+
.INDENT 0.0
|
27924
|
+
.TP
|
27925
|
+
.B GRN_COLUMN_NAME_VALUE_LEN
|
27926
|
+
It returns the byte size of \fBGRN_COLUMN_NAME_VALUE\fP.
|
27927
|
+
.sp
|
27928
|
+
Since 3.1.1.
|
27929
|
+
.UNINDENT
|
27930
|
+
.INDENT 0.0
|
27931
|
+
.TP
|
27932
|
+
.B GRN_COLUMN_NAME_SCORE
|
27933
|
+
It returns the name of \fB/reference/pseudo_column\fP \fB_score\fP.
|
27934
|
+
.sp
|
27935
|
+
It is useful to use with \fBGRN_COLUMN_NAME_SCORE_LEN\fP like
|
27936
|
+
the following:
|
27937
|
+
.INDENT 7.0
|
27938
|
+
.INDENT 3.5
|
27939
|
+
.sp
|
27940
|
+
.nf
|
27941
|
+
.ft C
|
27942
|
+
grn_obj *score_column;
|
27943
|
+
score_column = grn_ctx_get(ctx, GRN_COLUMN_NAME_SCORE, GRN_COLUMN_NAME_SCORE_LEN);
|
27944
|
+
.ft P
|
27945
|
+
.fi
|
27946
|
+
.UNINDENT
|
27947
|
+
.UNINDENT
|
27948
|
+
.sp
|
27949
|
+
Since 3.1.1.
|
27950
|
+
.UNINDENT
|
27951
|
+
.INDENT 0.0
|
27952
|
+
.TP
|
27953
|
+
.B GRN_COLUMN_NAME_SCORE_LEN
|
27954
|
+
It returns the byte size of \fBGRN_COLUMN_NAME_SCORE\fP.
|
27955
|
+
.sp
|
27956
|
+
Since 3.1.1.
|
27957
|
+
.UNINDENT
|
27958
|
+
.INDENT 0.0
|
27959
|
+
.TP
|
27960
|
+
.B GRN_COLUMN_NAME_NSUBRECS
|
27961
|
+
It returns the name of \fB/reference/pseudo_column\fP \fB_nsubrecs\fP.
|
27962
|
+
.sp
|
27963
|
+
It is useful to use with \fBGRN_COLUMN_NAME_NSUBRECS_LEN\fP like
|
27964
|
+
the following:
|
27965
|
+
.INDENT 7.0
|
27966
|
+
.INDENT 3.5
|
27967
|
+
.sp
|
27968
|
+
.nf
|
27969
|
+
.ft C
|
27970
|
+
grn_obj *nsubrecs_column;
|
27971
|
+
nsubrecs_column = grn_ctx_get(ctx, GRN_COLUMN_NAME_NSUBRECS, GRN_COLUMN_NAME_NSUBRECS_LEN);
|
27972
|
+
.ft P
|
27973
|
+
.fi
|
27974
|
+
.UNINDENT
|
27975
|
+
.UNINDENT
|
27976
|
+
.sp
|
27977
|
+
Since 3.1.1.
|
27978
|
+
.UNINDENT
|
27979
|
+
.INDENT 0.0
|
27980
|
+
.TP
|
27981
|
+
.B GRN_COLUMN_NAME_NSUBRECS_LEN
|
27982
|
+
It returns the byte size of \fBGRN_COLUMN_NAME_NSUBRECS\fP.
|
27983
|
+
.sp
|
27984
|
+
Since 3.1.1.
|
27985
|
+
.UNINDENT
|
27986
|
+
.INDENT 0.0
|
27987
|
+
.TP
|
27988
|
+
.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)
|
27989
|
+
tableに新たなカラムを定義します。nameは省略できません。一つのtableに同一のnameのcolumnを複数定義することはできません。
|
27990
|
+
.INDENT 7.0
|
27991
|
+
.TP
|
27992
|
+
.B Parameters
|
27993
|
+
.INDENT 7.0
|
27994
|
+
.IP \(bu 2
|
27650
27995
|
\fBtable\fP \-\- 対象tableを指定します。
|
27651
27996
|
.IP \(bu 2
|
27652
27997
|
\fBname\fP \-\- カラム名を指定します。
|
@@ -27893,7 +28238,7 @@ If \fBctx\fP is initialized by \fBgrn_ctx_open()\fP not \fBgrn_ctx_init()\fP. Yo
|
|
27893
28238
|
.B grn_ctx *grn_ctx_open(int\fI\ flags\fP)
|
27894
28239
|
初期化された \fBgrn_ctx\fP オブジェクトを返します。
|
27895
28240
|
.sp
|
27896
|
-
\fBgrn_ctx_init()\fP で初期化された \fBgrn_ctx\fP オブジェクトは構造体の実体をAPIの呼び元で確保するのに対して、 \fBgrn_ctx_open()\fP では
|
28241
|
+
\fBgrn_ctx_init()\fP で初期化された \fBgrn_ctx\fP オブジェクトは構造体の実体をAPIの呼び元で確保するのに対して、 \fBgrn_ctx_open()\fP ではGroongaライブラリの内部で、実体を確保します。
|
27897
28242
|
どちらで初期化された \fBgrn_ctx\fP も、 \fBgrn_ctx_fin()\fP で解放できます。
|
27898
28243
|
\fBgrn_ctx_open()\fP で確保した \fBgrn_ctx\fP 構造体に関しては、\fBgrn_ctx_fin()\fP で解放した後に、その \fBgrn_ctx\fP で作成した \fBgrn_obj\fP を \fBgrn_obj_close()\fP によって解放しても問題ありません。
|
27899
28244
|
.INDENT 7.0
|
@@ -28740,7 +29085,7 @@ nameはアクセサ文字列の場合、それに対応するaccessorを返し
|
|
28740
29085
|
.INDENT 0.0
|
28741
29086
|
.TP
|
28742
29087
|
.B grn_bool grn_obj_is_builtin(grn_ctx\fI\ *ctx\fP, grn_obj\fI\ *obj\fP)
|
28743
|
-
Check whether
|
29088
|
+
Check whether Groonga built\-in object.
|
28744
29089
|
.INDENT 7.0
|
28745
29090
|
.TP
|
28746
29091
|
.B Parameters
|
@@ -30565,294 +30910,576 @@ groongaは基本的に完全一致検索のみを行います。上記の例で
|
|
30565
30910
|
.UNINDENT
|
30566
30911
|
.UNINDENT
|
30567
30912
|
.sp
|
30568
|
-
とトークナイズされるため、完全一致しません。
|
30569
|
-
.sp
|
30570
|
-
groongaは完全一致検索した結果のヒット件数が所定の閾値を超えない場合に限り、非わかち書き検索を行い、それでもヒット件数が閾値を超えない場合は部分一致検索を行います(閾値は1がデフォルト値となっています)。このケースのデータは部分一致検索ではヒットするので、「東京都」クエリのみを指定するとヒットします。
|
30571
|
-
.sp
|
30572
|
-
しかし、以下のように全文検索前にすでに閾値が越えている場合(「updated_at < 1285858800」で1件ヒットし、閾値を越える)は、たとえ完全一致検索で1件もヒットしない場合でも部分一致検索などを行いません。:
|
30913
|
+
とトークナイズされるため、完全一致しません。
|
30914
|
+
.sp
|
30915
|
+
groongaは完全一致検索した結果のヒット件数が所定の閾値を超えない場合に限り、非わかち書き検索を行い、それでもヒット件数が閾値を超えない場合は部分一致検索を行います(閾値は1がデフォルト値となっています)。このケースのデータは部分一致検索ではヒットするので、「東京都」クエリのみを指定するとヒットします。
|
30916
|
+
.sp
|
30917
|
+
しかし、以下のように全文検索前にすでに閾値が越えている場合(「updated_at < 1285858800」で1件ヒットし、閾値を越える)は、たとえ完全一致検索で1件もヒットしない場合でも部分一致検索などを行いません。:
|
30918
|
+
.INDENT 0.0
|
30919
|
+
.INDENT 3.5
|
30920
|
+
.sp
|
30921
|
+
.nf
|
30922
|
+
.ft C
|
30923
|
+
select Blogs \-\-filter \(aqupdated_at < 1285858800 && body @ "東京都"\(aq
|
30924
|
+
.ft P
|
30925
|
+
.fi
|
30926
|
+
.UNINDENT
|
30927
|
+
.UNINDENT
|
30928
|
+
.sp
|
30929
|
+
そのため、条件の順序を変えると検索結果が変わるという状況が発生します。以下で、この情報を回避する方法を2種類紹介しますが、それぞれトレードオフとなる条件があるので採用するかどうかを十分検討してください。
|
30930
|
+
.SS 対策方法1: トークナイザーを変更する
|
30931
|
+
.sp
|
30932
|
+
TokenMecabトークナイザーは事前に準備した辞書を用いてトークナイズするため、再現率よりも適合率を重視したトークナイザーと言えます。一方、TokenBigramなど、N\-gram系のトークナイザーは適合率を重視したトークナイザーと言えます。例えば、TokenMecabの場合「東京都」で「京都」に完全一致することはありませんが、TokenBigramでは完全一致します。一方、TokenMecabでは「東京都民」に完全一致しませんが、TokenBigramでは完全一致します。
|
30933
|
+
.sp
|
30934
|
+
このようにN\-gram系のトークナイザーを指定することにより再現率をあげることができますが、適合率が下がり検索ノイズが含まれる可能性が高くなります。この度合いを調整するためには \fB/reference/commands/select\fP のmatch_columnsで使用する索引毎に重み付けを指定します。
|
30935
|
+
.sp
|
30936
|
+
ここでも、前述の例を使って具体例を示します。まず、TokenBigramを用いた索引を追加します。:
|
30937
|
+
.INDENT 0.0
|
30938
|
+
.INDENT 3.5
|
30939
|
+
.sp
|
30940
|
+
.nf
|
30941
|
+
.ft C
|
30942
|
+
table_create Bigram TABLE_PAT_KEY|KEY_NORMALIZE ShortText \-\-default_tokenizer TokenBigram
|
30943
|
+
column_create Bigram blog_body COLUMN_INDEX|WITH_POSITION Blogs body
|
30944
|
+
.ft P
|
30945
|
+
.fi
|
30946
|
+
.UNINDENT
|
30947
|
+
.UNINDENT
|
30948
|
+
.sp
|
30949
|
+
この状態でも以前はマッチしなかったレコードがヒットするようになります。:
|
30950
|
+
.INDENT 0.0
|
30951
|
+
.INDENT 3.5
|
30952
|
+
.sp
|
30953
|
+
.nf
|
30954
|
+
.ft C
|
30955
|
+
> select Blogs \-\-filter \(aqupdated_at < 1285858800 && body @ "東京都"\(aq
|
30956
|
+
[[0,7163.448064902,0.000418127],[[[1],[["_id","UInt32"],["updated_at","Time"],["body","ShortText"]],[1,1285031914.0,"東京都民に深刻なダメージを与えました。"]]]]
|
30957
|
+
.ft P
|
30958
|
+
.fi
|
30959
|
+
.UNINDENT
|
30960
|
+
.UNINDENT
|
30961
|
+
.sp
|
30962
|
+
しかし、N\-gram系のトークナイザーの方がTokenMecabトークナイザーよりも語のヒット数が多いため、N\-gram系のヒットスコアの方が重く扱われてしまいます。N\-gram系のトークナイザーの方がTokenMecabトークナイザーよりも適合率の低い場合が多いので、このままでは検索ノイズが上位に表示される可能性が高くなります。
|
30963
|
+
.sp
|
30964
|
+
そこで、TokenMecabトークナイザーを使って作った索引の方をTokenBigramトークナイザーを使って作った索引よりも重視するように重み付けを指定します。これは、match_columnsオプションで指定できます。:
|
30965
|
+
.INDENT 0.0
|
30966
|
+
.INDENT 3.5
|
30967
|
+
.sp
|
30968
|
+
.nf
|
30969
|
+
.ft C
|
30970
|
+
> select Blogs \-\-match_columns \(aqTerms.blog_body * 10 || Bigram.blog_body * 3\(aq \-\-query \(aq東京都\(aq \-\-output_columns \(aq_score, body\(aq
|
30971
|
+
[[0,8167.364602632,0.000647003],[[[1],[["_score","Int32"],["body","ShortText"]],[13,"東京都民に深刻なダメージを与えました。"]]]]
|
30972
|
+
.ft P
|
30973
|
+
.fi
|
30974
|
+
.UNINDENT
|
30975
|
+
.UNINDENT
|
30976
|
+
.sp
|
30977
|
+
この場合はスコアが11になっています。内訳は、Terms.blog_body索引(TokenMecabトークナイザーを使用)でマッチしたので10、Bigram.blog_body索引(TokenBigramトークナイザーを使用)でマッチしたので3、これらを合計して13になっています。このようにTokenMecabトークナイザーの重みを高くすることにより、検索ノイズが上位にくることを抑えつつ再現率を上げることができます。
|
30978
|
+
.sp
|
30979
|
+
この例は日本語だったのでTokenBigramトークナイザーでよかったのですが、アルファベットの場合はTokenBigramSplitSymbolAlphaトークナイザーなども利用する必要があります。例えば、「楽しいbilliard」はTokenBigramトークナイザーでは
|
30980
|
+
.INDENT 0.0
|
30981
|
+
.INDENT 3.5
|
30982
|
+
楽し / しい / billiard
|
30983
|
+
.UNINDENT
|
30984
|
+
.UNINDENT
|
30985
|
+
.sp
|
30986
|
+
となり、「bill」では完全一致しません。一方、TokenBigramSplitSymbolAlphaトークナイザーを使うと
|
30987
|
+
.INDENT 0.0
|
30988
|
+
.INDENT 3.5
|
30989
|
+
楽し / しい / いb / bi / il / ll / li / ia / ar / rd / d
|
30990
|
+
.UNINDENT
|
30991
|
+
.UNINDENT
|
30992
|
+
.sp
|
30993
|
+
となり、「bill」でも完全一致します。
|
30994
|
+
.sp
|
30995
|
+
TokenBigramSplitSymbolAlphaトークナイザーを使う場合も重み付けを考慮する必要があることはかわりありません。
|
30996
|
+
.sp
|
30997
|
+
利用できるバイグラム系のトークナイザーの一覧は以下の通りです。
|
30998
|
+
.INDENT 0.0
|
30999
|
+
.IP \(bu 2
|
31000
|
+
TokenBigram: バイグラムでトークナイズする。連続する記号・アルファベット・数字は一語として扱う。
|
31001
|
+
.IP \(bu 2
|
31002
|
+
TokenBigramSplitSymbol: 記号もバイグラムでトークナイズする。連続するアルファベット・数字は一語として扱う。
|
31003
|
+
.IP \(bu 2
|
31004
|
+
TokenBigramSplitSymbolAlpha: 記号とアルファベットもバイグラムでトークナイズする。連続する数字は一語として扱う。
|
31005
|
+
.IP \(bu 2
|
31006
|
+
TokenBigramSplitSymbolAlphaDigit: 記号・アルファベット・数字もバイグラムでトークナイズする。
|
31007
|
+
.IP \(bu 2
|
31008
|
+
TokenBigramIgnoreBlank: バイグラムでトークナイズする。連続する記号・アルファベット・数字は一語として扱う。空白は無視する。
|
31009
|
+
.IP \(bu 2
|
31010
|
+
TokenBigramIgnoreBlankSplitSymbol: 記号もバイグラムでトークナイズする。連続するアルファベット・数字は一語として扱う。空白は無視する。
|
31011
|
+
.IP \(bu 2
|
31012
|
+
TokenBigramIgnoreBlankSplitSymbolAlpha: 記号とアルファベットもバイグラムでトークナイズする。連続する数字は一語として扱う。空白は無視する。
|
31013
|
+
.IP \(bu 2
|
31014
|
+
TokenBigramIgnoreBlankSplitSymbolAlphaDigit: 記号・アルファベット・数字もバイグラムでトークナイズする。空白は無視する。
|
31015
|
+
.UNINDENT
|
31016
|
+
.SS 対策方法2: 閾値をあげる
|
31017
|
+
.sp
|
31018
|
+
非わかち書き検索・部分一致検索を利用するかどうかの閾値は\-\-with\-match\-escalation\-threshold configureオプションで変更することができます。以下のように指定すると、100件以下のヒット数であれば、たとえ完全一致検索でヒットしても、非わかち書き検索・部分一致検索を行います。:
|
31019
|
+
.INDENT 0.0
|
31020
|
+
.INDENT 3.5
|
31021
|
+
.sp
|
31022
|
+
.nf
|
31023
|
+
.ft C
|
31024
|
+
% ./configure \-\-with\-match\-escalation\-threashold=100
|
31025
|
+
.ft P
|
31026
|
+
.fi
|
31027
|
+
.UNINDENT
|
31028
|
+
.UNINDENT
|
31029
|
+
.sp
|
31030
|
+
この場合も対策方法1同様、検索ノイズが上位に現れる可能性が高くなることに注意してください。検索ノイズが多くなった場合は指定する値を低くする必要があります。
|
31031
|
+
.SS How to avoid mmap Cannot allocate memory error
|
31032
|
+
.SS Example
|
31033
|
+
.sp
|
31034
|
+
There is a case following mmap error in log file:
|
31035
|
+
.INDENT 0.0
|
31036
|
+
.INDENT 3.5
|
31037
|
+
2013\-06\-04 08:19:34.835218|A|4e86e700|mmap(4194304,551,432017408)=Cannot allocate memory <13036498944>
|
31038
|
+
.UNINDENT
|
31039
|
+
.UNINDENT
|
31040
|
+
.sp
|
31041
|
+
Note that <13036498944> means total size of mmap (almost 12GB) in this case.
|
31042
|
+
.SS Solution
|
31043
|
+
.sp
|
31044
|
+
So you need to confirm following point of views.
|
31045
|
+
.INDENT 0.0
|
31046
|
+
.IP \(bu 2
|
31047
|
+
Are there enough free memory?
|
31048
|
+
.IP \(bu 2
|
31049
|
+
Are maximum number of mappings exceeded?
|
31050
|
+
.UNINDENT
|
31051
|
+
.sp
|
31052
|
+
To check there are enough free memory, you can use vmstat command.
|
31053
|
+
.sp
|
31054
|
+
To check whether maximum number of mappings are exceeded, you can investigate the value of vm.max_map_count.
|
31055
|
+
.sp
|
31056
|
+
If this issue is fixed by modifying the value of vm.max_map_count, it\(aqs exactly the reason.
|
31057
|
+
.sp
|
31058
|
+
As groonga allocates memory chunks each 256KB, you can estimate the size of database you can handle by following formula:
|
31059
|
+
.INDENT 0.0
|
31060
|
+
.INDENT 3.5
|
31061
|
+
(database size) = vm.max_map_count * (memory chunks)
|
31062
|
+
.UNINDENT
|
31063
|
+
.UNINDENT
|
31064
|
+
.sp
|
31065
|
+
If you want to handle over 16GB groonga database, you must specify at least 65536 as the value of vm.max_map_count:
|
31066
|
+
.INDENT 0.0
|
31067
|
+
.INDENT 3.5
|
31068
|
+
database size (16GB) = vm.max_map_count (65536) * memory chunks (256KB)
|
31069
|
+
.UNINDENT
|
31070
|
+
.UNINDENT
|
31071
|
+
.sp
|
31072
|
+
You can modify vm.max_map_count temporary by sudo sysctl \-w vm.max_map_count=65536.
|
31073
|
+
.sp
|
31074
|
+
Then save the configuration value to /etc/sysctl.conf or /etc/sysctl.d/
|
31075
|
+
.nf
|
31076
|
+
*
|
31077
|
+
.fi
|
31078
|
+
.conf.
|
31079
|
+
.sp
|
31080
|
+
See \fB/reference/tuning\fP documentation about tuning related parameters.
|
31081
|
+
.SH DEVELOPMENT
|
31082
|
+
.sp
|
31083
|
+
This section describes about developing with groonga. You may develop
|
31084
|
+
an application that uses groonga as its database, a library that uses
|
31085
|
+
libgroonga, language bindings of libgroonga and so on.
|
31086
|
+
.SS Travis CI
|
31087
|
+
.sp
|
31088
|
+
This section describes about using groonga on \fI\%Travis CI\fP. Travis CI is a hosted continuous
|
31089
|
+
integration service for the open source community.
|
31090
|
+
.sp
|
31091
|
+
You can use Travis CI for your open source software. This section only
|
31092
|
+
describes about groonga related configuration. See \fI\%Travis CI:
|
31093
|
+
Documentation\fP about general
|
31094
|
+
Travis CI.
|
31095
|
+
.SS Configuration
|
31096
|
+
.sp
|
31097
|
+
Travis CI is running on 64\-bit Ubuntu 12.04 LTS Server Edition. (See \fI\%Travis CI: About
|
31098
|
+
Travis CI Environment\fP.) You can
|
31099
|
+
use apt\-line for Ubuntu 12.04 LTS provided by groonga project to install
|
31100
|
+
groonga on Travis CI.
|
31101
|
+
.sp
|
31102
|
+
You can custom build lifecycle by \fB.travis.yml\fP. (See \fI\%Travis CI:
|
31103
|
+
Conifugration your Travis CI build with .travis.yml\fP.) You
|
31104
|
+
can use \fBbefore_install\fP hook or \fBinstall\fP hook. You should use
|
31105
|
+
\fBbefore_install\fP if your software uses a language that is supported
|
31106
|
+
by Travis CI such as Ruby. You should use \fBinstall\fP otherwise.
|
31107
|
+
.sp
|
31108
|
+
Add the following \fBbefore_install\fP configuration to \fB.travis.yml\fP:
|
31109
|
+
.INDENT 0.0
|
31110
|
+
.INDENT 3.5
|
31111
|
+
.sp
|
31112
|
+
.nf
|
31113
|
+
.ft C
|
31114
|
+
before_install:
|
31115
|
+
\- curl https://raw.github.com/groonga/groonga/master/data/travis/setup.sh | sh
|
31116
|
+
.ft P
|
31117
|
+
.fi
|
31118
|
+
.UNINDENT
|
31119
|
+
.UNINDENT
|
31120
|
+
.sp
|
31121
|
+
If you need to use \fBinstall\fP hook instead of \fBbefore_install\fP, you
|
31122
|
+
just substitute \fBbefore_install:\fP with \fBinstall:\fP.
|
31123
|
+
.sp
|
31124
|
+
With the above configuration, you can use groonga for your build.
|
31125
|
+
.SS Examples
|
31126
|
+
.sp
|
31127
|
+
Here are open source softwares that use groonga on Travis CI:
|
31128
|
+
.INDENT 0.0
|
31129
|
+
.INDENT 3.5
|
31130
|
+
.INDENT 0.0
|
31131
|
+
.IP \(bu 2
|
31132
|
+
\fI\%rroonga\fP (Ruby bindings)
|
31133
|
+
.INDENT 2.0
|
31134
|
+
.IP \(bu 2
|
31135
|
+
\fI\%rroonga on Travis CI\fP
|
31136
|
+
.IP \(bu 2
|
31137
|
+
\fI\%.travis.yml for rroonga\fP
|
31138
|
+
.UNINDENT
|
31139
|
+
.IP \(bu 2
|
31140
|
+
\fI\%nroonga\fP (node.js bindings)
|
31141
|
+
.INDENT 2.0
|
31142
|
+
.IP \(bu 2
|
31143
|
+
\fI\%nroonga on Travis CI\fP
|
31144
|
+
.IP \(bu 2
|
31145
|
+
\fI\%.travis.yml for nroonga\fP
|
31146
|
+
.UNINDENT
|
31147
|
+
.IP \(bu 2
|
31148
|
+
\fI\%logaling\-command\fP (A glossary management command line tool)
|
31149
|
+
.INDENT 2.0
|
31150
|
+
.IP \(bu 2
|
31151
|
+
\fI\%logaling\-command on Travis CI\fP
|
31152
|
+
.IP \(bu 2
|
31153
|
+
\fI\%.travis.yml for logaling\-command\fP
|
31154
|
+
.UNINDENT
|
31155
|
+
.UNINDENT
|
31156
|
+
.UNINDENT
|
31157
|
+
.UNINDENT
|
31158
|
+
.SH HOW TO CONTRIBUTE TO GROONGA
|
31159
|
+
.sp
|
31160
|
+
We welcome your contributions to the groonga project. There are many ways
|
31161
|
+
to contribute, such as using groonga, introduction to others, etc.
|
31162
|
+
For example, if you find a bug when using groonga, you are welcome to
|
31163
|
+
report the bug. Coding and documentation are also welcome for groonga and
|
31164
|
+
its related projects.
|
31165
|
+
.INDENT 0.0
|
31166
|
+
.TP
|
31167
|
+
.B As a user:
|
31168
|
+
If you are interested in groonga, please read this document and try it.
|
31169
|
+
.TP
|
31170
|
+
.B As a spokesman:
|
31171
|
+
Please introduce groonga to your friends and colleagues.
|
31172
|
+
.TP
|
31173
|
+
.B As a developer: Bug report, development and documentation
|
31174
|
+
This section describes the details.
|
31175
|
+
.UNINDENT
|
31176
|
+
.SS How to report a bug
|
31177
|
+
.sp
|
31178
|
+
There are two ways to report a bug:
|
31179
|
+
.INDENT 0.0
|
31180
|
+
.INDENT 3.5
|
31181
|
+
.INDENT 0.0
|
31182
|
+
.IP \(bu 2
|
31183
|
+
Submit a bug to the issue tracker
|
31184
|
+
.IP \(bu 2
|
31185
|
+
Report a bug to the mailing list
|
31186
|
+
.UNINDENT
|
31187
|
+
.UNINDENT
|
31188
|
+
.UNINDENT
|
31189
|
+
.sp
|
31190
|
+
You can use either way It makes no difference to us.
|
31191
|
+
.SS Submit a bug to the issue tracker
|
31192
|
+
.sp
|
31193
|
+
Groonga project has two issue tracking systems, \fI\%Redmine\fP and \fI\%GitHub
|
31194
|
+
issue tracker\fP. Redmine
|
31195
|
+
is for Japanese and GitHub issue tracker is for English. You can use
|
31196
|
+
one of them to report a bug.
|
31197
|
+
.SS Report a bug to the mailing list
|
31198
|
+
.sp
|
31199
|
+
Groonga project has \fB/community\fP for discussing about groonga.
|
31200
|
+
Please send a mail that describes a bug.
|
31201
|
+
.SS How to contribute in documentation topics
|
31202
|
+
.sp
|
31203
|
+
We use \fI\%Sphinx\fP for documentation tool.
|
31204
|
+
.SS C API
|
31205
|
+
.sp
|
31206
|
+
We still have C API documentation in include/groonga.h. But
|
31207
|
+
we want to move them into doc/source/c\-api/*.txt. We welcome
|
31208
|
+
to you help us by moving C API documentation.
|
31209
|
+
.sp
|
31210
|
+
We will use \fI\%the C domain markup\fP of Sphinx.
|
31211
|
+
.SS I18N
|
31212
|
+
.sp
|
31213
|
+
We only had documentation in Japanese. We start to support
|
31214
|
+
I18N documentation by gettext based \fI\%Sphinx I18N feature\fP.
|
31215
|
+
We\(aqll use English as base language and translate
|
31216
|
+
English into other languages such as Japanese. We\(aqll put
|
31217
|
+
all documentations into doc/source/ and process them by
|
31218
|
+
Sphinx.
|
31219
|
+
.sp
|
31220
|
+
But we still use Japanese in doc/source/ for now. We need to
|
31221
|
+
translate Japanese documentation in doc/source/ into
|
31222
|
+
English. We welcome to you help us by translating
|
31223
|
+
documentation.
|
31224
|
+
.SS Translation flow
|
31225
|
+
.sp
|
31226
|
+
After doc/source/*.txt are updated, we can start translation.
|
31227
|
+
.sp
|
31228
|
+
Here is a translation flow:
|
31229
|
+
.INDENT 0.0
|
31230
|
+
.IP 1. 3
|
31231
|
+
Clone groonga repository.
|
31232
|
+
.IP 2. 3
|
31233
|
+
Update .po files.
|
31234
|
+
.IP 3. 3
|
31235
|
+
Edit .po files.
|
31236
|
+
.IP 4. 3
|
31237
|
+
Generate HTML files.
|
31238
|
+
.IP 5. 3
|
31239
|
+
Confirm HTML output.
|
31240
|
+
.IP 6. 3
|
31241
|
+
Repeat 2.\-4. until you get good result.
|
31242
|
+
.IP 7. 3
|
31243
|
+
Send your works to us!
|
31244
|
+
.UNINDENT
|
31245
|
+
.sp
|
31246
|
+
Here are command lines to do the above flow. Following
|
31247
|
+
sections describes details.
|
30573
31248
|
.INDENT 0.0
|
30574
31249
|
.INDENT 3.5
|
30575
31250
|
.sp
|
30576
31251
|
.nf
|
30577
31252
|
.ft C
|
30578
|
-
|
31253
|
+
# Please fork https://github.com/groonga/groonga on GitHub
|
31254
|
+
% git clone https://github.com/${YOUR_GITHUB_ACCOUNT}/groonga.git
|
31255
|
+
% ./autogen.sh
|
31256
|
+
% ./configure
|
31257
|
+
% cd doc/locale/${LANGUAGE}/LC_MESSAGES # ${LANGUAGE} is language code such as \(aqja\(aq.
|
31258
|
+
% make update # *.po are updated
|
31259
|
+
% editor *.po # translate *.po # you can use your favorite editor
|
31260
|
+
% cd ..
|
31261
|
+
% make html
|
31262
|
+
% browser html/index.html # confirm translation
|
31263
|
+
% git add LC_MESSAGES/*.po
|
31264
|
+
% git commit
|
31265
|
+
% git push
|
30579
31266
|
.ft P
|
30580
31267
|
.fi
|
30581
31268
|
.UNINDENT
|
30582
31269
|
.UNINDENT
|
31270
|
+
.SS How to clone groonga repository
|
30583
31271
|
.sp
|
30584
|
-
|
30585
|
-
.
|
30586
|
-
.
|
30587
|
-
TokenMecabトークナイザーは事前に準備した辞書を用いてトークナイズするため、再現率よりも適合率を重視したトークナイザーと言えます。一方、TokenBigramなど、N\-gram系のトークナイザーは適合率を重視したトークナイザーと言えます。例えば、TokenMecabの場合「東京都」で「京都」に完全一致することはありませんが、TokenBigramでは完全一致します。一方、TokenMecabでは「東京都民」に完全一致しませんが、TokenBigramでは完全一致します。
|
30588
|
-
.sp
|
30589
|
-
このようにN\-gram系のトークナイザーを指定することにより再現率をあげることができますが、適合率が下がり検索ノイズが含まれる可能性が高くなります。この度合いを調整するためには \fB/reference/commands/select\fP のmatch_columnsで使用する索引毎に重み付けを指定します。
|
30590
|
-
.sp
|
30591
|
-
ここでも、前述の例を使って具体例を示します。まず、TokenBigramを用いた索引を追加します。:
|
31272
|
+
First, please fork groonga repository on GitHub. You
|
31273
|
+
just access \fI\%https://github.com/groonga/groonga\fP and press
|
31274
|
+
\fIFork\fP button. Now you can clone your groonga repository:
|
30592
31275
|
.INDENT 0.0
|
30593
31276
|
.INDENT 3.5
|
30594
31277
|
.sp
|
30595
31278
|
.nf
|
30596
31279
|
.ft C
|
30597
|
-
|
30598
|
-
column_create Bigram blog_body COLUMN_INDEX|WITH_POSITION Blogs body
|
31280
|
+
% git clone https://github.com/${YOUR_GITHUB_ACCOUNT}/groonga.git
|
30599
31281
|
.ft P
|
30600
31282
|
.fi
|
30601
31283
|
.UNINDENT
|
30602
31284
|
.UNINDENT
|
30603
31285
|
.sp
|
30604
|
-
|
31286
|
+
Then you need to configure your cloned repository:
|
30605
31287
|
.INDENT 0.0
|
30606
31288
|
.INDENT 3.5
|
30607
31289
|
.sp
|
30608
31290
|
.nf
|
30609
31291
|
.ft C
|
30610
|
-
|
30611
|
-
|
31292
|
+
% cd groonga
|
31293
|
+
% ./autogen.sh
|
31294
|
+
% ./configure
|
30612
31295
|
.ft P
|
30613
31296
|
.fi
|
30614
31297
|
.UNINDENT
|
30615
31298
|
.UNINDENT
|
30616
31299
|
.sp
|
30617
|
-
|
31300
|
+
The above steps are just needed at the first setup.
|
30618
31301
|
.sp
|
30619
|
-
|
31302
|
+
If you have troubles on the above steps, you can use source
|
31303
|
+
files available on \fI\%http://packages.groonga.org/source/groonga/\fP .
|
31304
|
+
.SS How to update .po files
|
31305
|
+
.sp
|
31306
|
+
You can update .po files by running \fImake update\fP on
|
31307
|
+
doc/locale/${LANGUAGE}/LC_MESSAGES. (Please substitute
|
31308
|
+
\fI${LANGUAGE}\fP with your language code such as \(aqja\(aq.):
|
30620
31309
|
.INDENT 0.0
|
30621
31310
|
.INDENT 3.5
|
30622
31311
|
.sp
|
30623
31312
|
.nf
|
30624
31313
|
.ft C
|
30625
|
-
|
30626
|
-
|
31314
|
+
% cd doc/locale/ja/LC_MESSAGES
|
31315
|
+
% make update
|
30627
31316
|
.ft P
|
30628
31317
|
.fi
|
30629
31318
|
.UNINDENT
|
30630
31319
|
.UNINDENT
|
31320
|
+
.SS How to edit .po
|
30631
31321
|
.sp
|
30632
|
-
|
30633
|
-
.
|
30634
|
-
|
30635
|
-
.INDENT 0.0
|
30636
|
-
.INDENT 3.5
|
30637
|
-
楽し / しい / billiard
|
30638
|
-
.UNINDENT
|
30639
|
-
.UNINDENT
|
30640
|
-
.sp
|
30641
|
-
となり、「bill」では完全一致しません。一方、TokenBigramSplitSymbolAlphaトークナイザーを使うと
|
30642
|
-
.INDENT 0.0
|
30643
|
-
.INDENT 3.5
|
30644
|
-
楽し / しい / いb / bi / il / ll / li / ia / ar / rd / d
|
30645
|
-
.UNINDENT
|
30646
|
-
.UNINDENT
|
30647
|
-
.sp
|
30648
|
-
となり、「bill」でも完全一致します。
|
30649
|
-
.sp
|
30650
|
-
TokenBigramSplitSymbolAlphaトークナイザーを使う場合も重み付けを考慮する必要があることはかわりありません。
|
30651
|
-
.sp
|
30652
|
-
利用できるバイグラム系のトークナイザーの一覧は以下の通りです。
|
31322
|
+
There are some tools to edit .po files. .po files are just
|
31323
|
+
text. So you can use your favorite editor. Here is a
|
31324
|
+
specialized editor for .po file edit list.
|
30653
31325
|
.INDENT 0.0
|
30654
|
-
.
|
30655
|
-
|
30656
|
-
|
30657
|
-
|
30658
|
-
.
|
30659
|
-
|
30660
|
-
.
|
30661
|
-
|
30662
|
-
.
|
30663
|
-
TokenBigramIgnoreBlank: バイグラムでトークナイズする。連続する記号・アルファベット・数字は一語として扱う。空白は無視する。
|
30664
|
-
.IP \(bu 2
|
30665
|
-
TokenBigramIgnoreBlankSplitSymbol: 記号もバイグラムでトークナイズする。連続するアルファベット・数字は一語として扱う。空白は無視する。
|
30666
|
-
.IP \(bu 2
|
30667
|
-
TokenBigramIgnoreBlankSplitSymbolAlpha: 記号とアルファベットもバイグラムでトークナイズする。連続する数字は一語として扱う。空白は無視する。
|
30668
|
-
.IP \(bu 2
|
30669
|
-
TokenBigramIgnoreBlankSplitSymbolAlphaDigit: 記号・アルファベット・数字もバイグラムでトークナイズする。空白は無視する。
|
31326
|
+
.TP
|
31327
|
+
.B Emacs\(aqs \fI\%po\-mode\fP
|
31328
|
+
It is bundled in gettext.
|
31329
|
+
.TP
|
31330
|
+
.B \fI\%Poedit\fP
|
31331
|
+
It is a .po editor and works on many platform.
|
31332
|
+
.TP
|
31333
|
+
.B gted
|
31334
|
+
It is also a .po editor and is implemented as Eclipse plugin.
|
30670
31335
|
.UNINDENT
|
30671
|
-
.SS
|
31336
|
+
.SS How to generate HTML files
|
30672
31337
|
.sp
|
30673
|
-
|
31338
|
+
You can generate HTML files with updated .po files by
|
31339
|
+
running \fImake html\fP on doc/locale/${LANGUAGE}. (Please
|
31340
|
+
substitute \fI${LANGUAGE}\fP with your language code such as
|
31341
|
+
\(aqja\(aq.):
|
30674
31342
|
.INDENT 0.0
|
30675
31343
|
.INDENT 3.5
|
30676
31344
|
.sp
|
30677
31345
|
.nf
|
30678
31346
|
.ft C
|
30679
|
-
%
|
31347
|
+
% cd doc/locale/ja/
|
31348
|
+
% make html
|
30680
31349
|
.ft P
|
30681
31350
|
.fi
|
30682
31351
|
.UNINDENT
|
30683
31352
|
.UNINDENT
|
30684
31353
|
.sp
|
30685
|
-
|
30686
|
-
|
30687
|
-
.SS Example
|
30688
|
-
.sp
|
30689
|
-
There is a case following mmap error in log file:
|
31354
|
+
You can also generate HTML files for all languages by
|
31355
|
+
running \fImake html\fP on doc/locale:
|
30690
31356
|
.INDENT 0.0
|
30691
31357
|
.INDENT 3.5
|
30692
|
-
2013\-06\-04 08:19:34.835218|A|4e86e700|mmap(4194304,551,432017408)=Cannot allocate memory <13036498944>
|
30693
|
-
.UNINDENT
|
30694
|
-
.UNINDENT
|
30695
|
-
.sp
|
30696
|
-
Note that <13036498944> means total size of mmap (almost 12GB) in this case.
|
30697
|
-
.SS Solution
|
30698
31358
|
.sp
|
30699
|
-
|
30700
|
-
.
|
30701
|
-
|
30702
|
-
|
30703
|
-
.
|
30704
|
-
|
31359
|
+
.nf
|
31360
|
+
.ft C
|
31361
|
+
% cd doc/locale
|
31362
|
+
% make html
|
31363
|
+
.ft P
|
31364
|
+
.fi
|
31365
|
+
.UNINDENT
|
30705
31366
|
.UNINDENT
|
30706
31367
|
.sp
|
30707
|
-
|
30708
|
-
.sp
|
30709
|
-
To check whether maximum number of mappings are exceeded, you can investigate the value of vm.max_map_count.
|
30710
|
-
.sp
|
30711
|
-
If this issue is fixed by modifying the value of vm.max_map_count, it\(aqs exactly the reason.
|
30712
|
-
.sp
|
30713
|
-
As groonga allocates memory chunks each 256KB, you can estimate the size of database you can handle by following formula:
|
31368
|
+
\fBNOTE:\fP
|
30714
31369
|
.INDENT 0.0
|
30715
31370
|
.INDENT 3.5
|
30716
|
-
|
31371
|
+
.mo files are updated automatically by \fImake html\fP. So
|
31372
|
+
you don\(aqt care about .mo files.
|
30717
31373
|
.UNINDENT
|
30718
31374
|
.UNINDENT
|
31375
|
+
.SS How to confirm HTML output
|
30719
31376
|
.sp
|
30720
|
-
|
31377
|
+
HTML files are generated in
|
31378
|
+
doc/locale/${LANGUAGE}/html/. (Please substitute
|
31379
|
+
\fI${LANGUAGE}\fP with your language code such as \(aqja\(aq.) You can
|
31380
|
+
confirm HTML output by your favorite browser:
|
30721
31381
|
.INDENT 0.0
|
30722
31382
|
.INDENT 3.5
|
30723
|
-
database size (16GB) = vm.max_map_count (65536) * memory chunks (256KB)
|
30724
|
-
.UNINDENT
|
30725
|
-
.UNINDENT
|
30726
|
-
.sp
|
30727
|
-
You can modify vm.max_map_count temporary by sudo sysctl \-w vm.max_map_count=65536.
|
30728
31383
|
.sp
|
30729
|
-
Then save the configuration value to /etc/sysctl.conf or /etc/sysctl.d/
|
30730
31384
|
.nf
|
30731
|
-
|
31385
|
+
.ft C
|
31386
|
+
% firefox doc/locale/ja/html/index.html
|
31387
|
+
.ft P
|
30732
31388
|
.fi
|
30733
|
-
.
|
30734
|
-
.
|
30735
|
-
|
30736
|
-
.SH DEVELOPMENT
|
30737
|
-
.sp
|
30738
|
-
This section describes about developing with groonga. You may develop
|
30739
|
-
an application that uses groonga as its detabase, a library that uses
|
30740
|
-
libgroonga, language bindings of libgroonga and so on.
|
30741
|
-
.SS Travis CI
|
30742
|
-
.sp
|
30743
|
-
This section describes about using groonga on \fI\%Travis CI\fP. Travis CI is a hosted continuous
|
30744
|
-
integration service for the open source community.
|
30745
|
-
.sp
|
30746
|
-
You can use Travis CI for your open source software. This section only
|
30747
|
-
describes about groonga related configuration. See \fI\%Travis CI:
|
30748
|
-
Documentation\fP about general
|
30749
|
-
Travis CI.
|
30750
|
-
.SS Configuration
|
30751
|
-
.sp
|
30752
|
-
Travis CI is running on 32\-bit Ubuntu 11.10. (See \fI\%Travis CI: About
|
30753
|
-
Travis CI Environment\fP.) You can
|
30754
|
-
use apt\-line for Ubuntu 11.10 provided by groonga project to install
|
30755
|
-
groonga on Travis CI.
|
31389
|
+
.UNINDENT
|
31390
|
+
.UNINDENT
|
31391
|
+
.SS How to send your works
|
30756
31392
|
.sp
|
30757
|
-
|
30758
|
-
|
30759
|
-
|
30760
|
-
\fBbefore_install\fP if your software uses a language that is supported
|
30761
|
-
by Travis CI such as Ruby. You should use \fBinstall\fP otherwise.
|
31393
|
+
We can receive your works via pull request on GitHub or
|
31394
|
+
E\-mail attachment patch or .po files themselves.
|
31395
|
+
.SS How to send pull request
|
30762
31396
|
.sp
|
30763
|
-
|
31397
|
+
Here are command lines to send pull request:
|
30764
31398
|
.INDENT 0.0
|
30765
31399
|
.INDENT 3.5
|
30766
31400
|
.sp
|
30767
31401
|
.nf
|
30768
31402
|
.ft C
|
30769
|
-
|
30770
|
-
|
31403
|
+
% git add doc/locale/ja/LC_MESSAGES/*.po
|
31404
|
+
% git commit
|
31405
|
+
% git push
|
30771
31406
|
.ft P
|
30772
31407
|
.fi
|
30773
31408
|
.UNINDENT
|
30774
31409
|
.UNINDENT
|
30775
31410
|
.sp
|
30776
|
-
|
30777
|
-
|
30778
|
-
.
|
30779
|
-
With the above configuration, you can use groonga for your build.
|
30780
|
-
.SS Examples
|
31411
|
+
Now you can send pull request on GitHub. You just access
|
31412
|
+
your repository page on GitHub and press \fIPull Request\fP
|
31413
|
+
button.
|
30781
31414
|
.sp
|
30782
|
-
|
31415
|
+
\fBSEE ALSO:\fP
|
30783
31416
|
.INDENT 0.0
|
30784
31417
|
.INDENT 3.5
|
30785
|
-
.
|
30786
|
-
.IP \(bu 2
|
30787
|
-
\fI\%rroonga\fP (Ruby bindings)
|
30788
|
-
.INDENT 2.0
|
30789
|
-
.IP \(bu 2
|
30790
|
-
\fI\%rroonga on Travis CI\fP
|
30791
|
-
.IP \(bu 2
|
30792
|
-
\fI\%.travis.yml for rroonga\fP
|
31418
|
+
\fI\%Help.GitHub \- Sending pull requests\fP.
|
30793
31419
|
.UNINDENT
|
30794
|
-
.IP \(bu 2
|
30795
|
-
\fI\%nroonga\fP (node.js bindings)
|
30796
|
-
.INDENT 2.0
|
30797
|
-
.IP \(bu 2
|
30798
|
-
\fI\%nroonga on Travis CI\fP
|
30799
|
-
.IP \(bu 2
|
30800
|
-
\fI\%.travis.yml for nroonga\fP
|
30801
31420
|
.UNINDENT
|
30802
|
-
.
|
30803
|
-
|
30804
|
-
|
30805
|
-
.
|
30806
|
-
|
30807
|
-
.
|
30808
|
-
|
31421
|
+
.SS How to send patch
|
31422
|
+
.sp
|
31423
|
+
Here are command lines to create patch:
|
31424
|
+
.INDENT 0.0
|
31425
|
+
.INDENT 3.5
|
31426
|
+
.sp
|
31427
|
+
.nf
|
31428
|
+
.ft C
|
31429
|
+
% git add doc/locale/ja/LC_MESSAGES/*.po
|
31430
|
+
% git commit
|
31431
|
+
% git format\-patch origin/master
|
31432
|
+
.ft P
|
31433
|
+
.fi
|
30809
31434
|
.UNINDENT
|
30810
31435
|
.UNINDENT
|
31436
|
+
.sp
|
31437
|
+
You can find 000X\-YYY.patch files in the current
|
31438
|
+
directory. Please send those files to us!
|
31439
|
+
.sp
|
31440
|
+
\fBSEE ALSO:\fP
|
31441
|
+
.INDENT 0.0
|
31442
|
+
.INDENT 3.5
|
31443
|
+
\fB/community\fP describes our contact information.
|
30811
31444
|
.UNINDENT
|
30812
31445
|
.UNINDENT
|
30813
|
-
.
|
31446
|
+
.SS How to send .po files
|
30814
31447
|
.sp
|
30815
|
-
|
30816
|
-
|
30817
|
-
|
30818
|
-
|
30819
|
-
|
31448
|
+
Please archive doc/locale/${LANGUAGE}/LC_MESSAGES/ (Please
|
31449
|
+
substitute \fI${LANGUAGE}\fP with your language code such as
|
31450
|
+
\(aqja\(aq.) and send it to us! We extract and merge them to the
|
31451
|
+
groonga repository.
|
31452
|
+
.sp
|
31453
|
+
\fBSEE ALSO:\fP
|
30820
31454
|
.INDENT 0.0
|
30821
|
-
.
|
30822
|
-
|
30823
|
-
If you are interested in groonga, please read this document and try it.
|
30824
|
-
.TP
|
30825
|
-
.B As a spokesman:
|
30826
|
-
Please introduce groonga to your friends and colleagues.
|
30827
|
-
.TP
|
30828
|
-
.B As a developer: Bug report, development and documentation
|
30829
|
-
This section describes the details.
|
31455
|
+
.INDENT 3.5
|
31456
|
+
\fB/community\fP describes our contact information.
|
30830
31457
|
.UNINDENT
|
30831
|
-
.
|
31458
|
+
.UNINDENT
|
31459
|
+
.SS How to add new language
|
30832
31460
|
.sp
|
30833
|
-
|
31461
|
+
Here are command lines to add new translation language:
|
30834
31462
|
.INDENT 0.0
|
30835
31463
|
.INDENT 3.5
|
30836
|
-
.
|
30837
|
-
.
|
30838
|
-
|
30839
|
-
|
30840
|
-
|
30841
|
-
.
|
31464
|
+
.sp
|
31465
|
+
.nf
|
31466
|
+
.ft C
|
31467
|
+
% cd doc/locale
|
31468
|
+
% make add LOCALE=${LANGUAGE} # specify your language code such as \(aqde\(aq.
|
31469
|
+
.ft P
|
31470
|
+
.fi
|
30842
31471
|
.UNINDENT
|
30843
31472
|
.UNINDENT
|
30844
31473
|
.sp
|
30845
|
-
|
30846
|
-
.
|
30847
|
-
.sp
|
30848
|
-
Groonga project has two issue tracking systems, \fI\%Redmine\fP and \fI\%GitHub
|
30849
|
-
issue tracker\fP. Redmine
|
30850
|
-
is for Japanese and GitHub issue tracker is for English. You can use
|
30851
|
-
one of them to report a bug.
|
30852
|
-
.SS Report a bug to the mailing list
|
31474
|
+
Please substitute \fI${LANGUAGE}\fP with your language code such
|
31475
|
+
as \(aqja\(aq.
|
30853
31476
|
.sp
|
30854
|
-
|
30855
|
-
|
31477
|
+
\fBSEE ALSO:\fP
|
31478
|
+
.INDENT 0.0
|
31479
|
+
.INDENT 3.5
|
31480
|
+
\fI\%Codes for the Representation of Names of Languages\fP.
|
31481
|
+
.UNINDENT
|
31482
|
+
.UNINDENT
|
30856
31483
|
.SS groonga開発者向け情報
|
30857
31484
|
.SS Repository
|
30858
31485
|
.sp
|
@@ -30869,8 +31496,8 @@ There is \fI\%the repository of groonga on GitHub\fP. If you want to check\-out
|
|
30869
31496
|
.UNINDENT
|
30870
31497
|
.sp
|
30871
31498
|
There is \fI\%the list of related projects of groonga\fP (grntest, fluent\-plugin\-groonga and so on).
|
30872
|
-
.SS
|
30873
|
-
.SS
|
31499
|
+
.SS Groonga 通信アーキテクチャ
|
31500
|
+
.SS GQTPでのアーキテクチャ
|
30874
31501
|
.INDENT 0.0
|
30875
31502
|
.IP \(bu 2
|
30876
31503
|
comが外部からの接続を受け付ける。
|
@@ -30896,20 +31523,20 @@ edgeがworkerに結びついていないときは、同時に、ctx_newという
|
|
30896
31523
|
.UNINDENT
|
30897
31524
|
.SS ユーザーと協力して開発をうまく進めていくための指針
|
30898
31525
|
.sp
|
30899
|
-
|
31526
|
+
Groongaを使ってくれているユーザーと協力して
|
30900
31527
|
開発をうまく進めていくためにこうするといい、という事柄をまとめました。
|
30901
31528
|
まとめておくと、新しく開発に加わる人とも共有することができます。
|
30902
31529
|
.SS twitter編
|
30903
31530
|
.sp
|
30904
|
-
|
31531
|
+
Groongaを使ってもらえるようにtwitterのアカウントGroongaを取得して
|
30905
31532
|
日々、リリースの案内をしたり、ユーザーサポートをしたりしています。
|
30906
31533
|
.sp
|
30907
31534
|
リリースの案内に利用する場合には、やりとりを考えなくて良いですが、
|
30908
|
-
複数人によるサポートを
|
31535
|
+
複数人によるサポートをGroongaで行う場合に、どうサポートするのが
|
30909
31536
|
良いのか/どうしてそうするのかという共通認識を持っていないと一貫性のないサポートとなってしま
|
30910
31537
|
います。
|
30911
31538
|
.sp
|
30912
|
-
twitterでサポートされている安心感から
|
31539
|
+
twitterでサポートされている安心感からGroongaユーザーの拡大に繋げる
|
30913
31540
|
ことができるようにサポートの際に気をつけることをまとめます。
|
30914
31541
|
.SS 過去のツイートはおさらいしておく
|
30915
31542
|
.SS 理由
|
@@ -30964,7 +31591,7 @@ twitterは気軽につぶやけることが重要なので、気軽にできな
|
|
30964
31591
|
.UNINDENT
|
30965
31592
|
.UNINDENT
|
30966
31593
|
.sp
|
30967
|
-
|
31594
|
+
Groonga関連で気軽につぶやけないとなると開発者は困っている人を見つけられないし、利用者は困ったままとなるので、双方にとって嬉しくない状態になっ
|
30968
31595
|
てしまいます。
|
30969
31596
|
.SS 対応
|
30970
31597
|
.sp
|
@@ -30972,7 +31599,7 @@ twitterでやりとりを完結できるようにします。
|
|
30972
31599
|
.SS ドキュメント作成
|
30973
31600
|
.SS Sphinxのインストール
|
30974
31601
|
.sp
|
30975
|
-
|
31602
|
+
Groongaのドキュメントは、Sphinxというツールを用いて作成されています。Sphinxは以下のように導入します。:
|
30976
31603
|
.INDENT 0.0
|
30977
31604
|
.INDENT 3.5
|
30978
31605
|
.sp
|
@@ -31002,7 +31629,7 @@ This document is also ditributed in forms of release source archive and updated
|
|
31002
31629
|
If you want to refer latest documentation in source form, you can view such files via GitHub repository browser (\fI\%https://github.com/groonga/groonga/tree/master/doc/source\fP).
|
31003
31630
|
.SS pdfの作成
|
31004
31631
|
.sp
|
31005
|
-
|
31632
|
+
Groongaのドキュメントは、pdf出力することもできます。rst2pdfと、IPAフォント(IPA Gothic/IPAexGothic)が必要となります。
|
31006
31633
|
.SS rst2pdfのインストール
|
31007
31634
|
.sp
|
31008
31635
|
以下のようにしてインストールできます。:
|
@@ -31031,21 +31658,21 @@ groongaのドキュメントは、pdf出力することもできます。rst2pdf
|
|
31031
31658
|
.UNINDENT
|
31032
31659
|
.SS クエリの実現
|
31033
31660
|
.sp
|
31034
|
-
|
31661
|
+
Groongaのデータベースには大量のデータを格納し、その中から必要な部分を高速に取り出すことができます。必要な部分をGroongaのデータベースに問い合わせるためのクエリの表現と実行に関して、Groongaは複数の手段を用意しています。
|
31035
31662
|
.SS クエリ実行のためのインタフェース
|
31036
31663
|
.sp
|
31037
|
-
|
31664
|
+
Groongaは低機能で単純なライブラリインタフェースから、高機能で複雑なコマンドインタフェースまでいくつかの階層的なインタフェースをユーザプログラムに提供しています。
|
31038
31665
|
.sp
|
31039
31666
|
クエリ実行のためのインタフェースも階層的なインタフェースのそれぞれに対応する形で用意されています。以下に低レイヤなインタフェースから順に説明します。
|
31040
31667
|
.SS DB_API
|
31041
31668
|
.sp
|
31042
|
-
DB_APIは、
|
31669
|
+
DB_APIは、Groongaデータベースを操作するための一群のC言語向けAPI関数を提供します。DB_APIはデータベースを構成する個々の部分に対する単純な操作関数を提供します。DB_APIの機能を組み合わせることによって複雑なクエリを実行することができます。後述のすべてのクエリインタフェースはDB_APIの機能を組み合わせることによって実現されています。
|
31043
31670
|
.SS grn_expr
|
31044
31671
|
.sp
|
31045
|
-
grn_exprは、
|
31046
|
-
.SS
|
31672
|
+
grn_exprは、Groongaデータベースに対する検索処理や更新処理のための条件を表現するためのデータ構造で、複数の条件を再帰的に組み合わせてより複雑な条件を表現することができます。grn_exprによって表現されたクエリを実行するためには、grn_table_select()関数を使用します。
|
31673
|
+
.SS Groonga実行ファイル
|
31047
31674
|
.sp
|
31048
|
-
|
31675
|
+
Groongaデータベースを操作するためのコマンドインタープリタです。渡されたコマンドを解釈し、実行結果を返します。コマンドの実処理はC言語で記述されます。ユーザがC言語で定義した関数を新たなコマンドとしてGroonga実行ファイルに組み込むことができます。各コマンドはいくつかの文字列引数を受け取り、これをクエリとして解釈して実行します。引数をgrn_exprとして解釈するか、別の形式として解釈してDB_APIを使ってデータベースを操作するかはコマンド毎に自由に決めることができます。
|
31049
31676
|
.SS grn_exprで表現できるクエリ
|
31050
31677
|
.sp
|
31051
31678
|
grn_exprは代入や関数呼び出しのような様々な操作を表現できますが、この中で検索クエリを表現するgrn_exprのことを特に条件式とよびます。条件式を構成する個々の要素を関係式と呼びます。条件式は一個以上の関係式か、あるいは条件式を論理演算子で結合したものです。
|
@@ -31283,7 +31910,7 @@ CUTTER_SOURCE_PATH=$HOME/work/cutter/cutter
|
|
31283
31910
|
.UNINDENT
|
31284
31911
|
.SS ビルド環境の準備
|
31285
31912
|
.sp
|
31286
|
-
以下に
|
31913
|
+
以下にGroongaのリリース作業を行うために事前にインストール
|
31287
31914
|
しておくべきパッケージを示します。
|
31288
31915
|
.sp
|
31289
31916
|
なお、ビルド環境としては Ubuntu 12.04 LTS(Precise Pangolin)を前提として説明しているため、その他の環境では適宜読み替えて下さい。:
|
@@ -31328,7 +31955,7 @@ rinseのバージョンが古いとCentOS 5/6パッケージのビルドを行
|
|
31328
31955
|
リリース作業ではRPMパッケージに対する署名を行います。
|
31329
31956
|
その際、パッケージ署名用の鍵が必要です。
|
31330
31957
|
.sp
|
31331
|
-
|
31958
|
+
Groongaプロジェクトでは署名用の鍵をリリース担当者の公開鍵で暗号化してリポジトリのpackages/ディレクトリ以下へと登録しています。
|
31332
31959
|
.sp
|
31333
31960
|
リリース担当者はリポジトリに登録された秘密鍵を復号した後に鍵のインポートを以下のコマンドにて行います。:
|
31334
31961
|
.INDENT 0.0
|
@@ -31345,7 +31972,7 @@ groongaプロジェクトでは署名用の鍵をリリース担当者の公開
|
|
31345
31972
|
.UNINDENT
|
31346
31973
|
.UNINDENT
|
31347
31974
|
.sp
|
31348
|
-
鍵のインポートが正常終了すると gpg \-\-list\-keys で
|
31975
|
+
鍵のインポートが正常終了すると gpg \-\-list\-keys でGroongaの署名用の鍵を確認することができます。:
|
31349
31976
|
.INDENT 0.0
|
31350
31977
|
.INDENT 3.5
|
31351
31978
|
.sp
|
@@ -31381,7 +32008,7 @@ gpg> quit
|
|
31381
32008
|
この作業は、新規にリリースを行うことになった担当者やパッケージに署名する鍵に変更があった場合などに行います。
|
31382
32009
|
.SS リリース作業用ディレクトリの作成
|
31383
32010
|
.sp
|
31384
|
-
|
32011
|
+
Groongaのリリース作業ではリリース専用の環境下(コンパイルフラグ)でビルドする必要があります。
|
31385
32012
|
.sp
|
31386
32013
|
リリース時と開発時でディレクトリを分けずに作業することもできますが、誤ったコンパイルフラグでリリースしてしまう危険があります。
|
31387
32014
|
.sp
|
@@ -31432,13 +32059,13 @@ groongaのリリース作業ではリリース専用の環境下(コンパイル
|
|
31432
32059
|
.IP \(bu 2
|
31433
32060
|
内部的な変更(変数名の変更やらリファクタリング)
|
31434
32061
|
.UNINDENT
|
31435
|
-
.SS
|
32062
|
+
.SS Groongaのウェブサイトの取得
|
31436
32063
|
.sp
|
31437
|
-
|
32064
|
+
GroongaのウェブサイトのソースはGroonga同様にgithubにリポジトリを置いています。
|
31438
32065
|
.sp
|
31439
32066
|
リリース作業では後述するコマンド(make update\-latest\-release)にてトップページのバージョンを置き換えることができるようになっています。
|
31440
32067
|
.sp
|
31441
|
-
|
32068
|
+
Groongaのウェブサイトのソースコードを$GROONGA_GITHUB_COM_PATHとして取得するためには、$GROONGA_DIRにて以下のコマンドを実行します。:
|
31442
32069
|
.INDENT 0.0
|
31443
32070
|
.INDENT 3.5
|
31444
32071
|
.sp
|
@@ -31453,7 +32080,7 @@ groongaのウェブサイトのソースコードを$GROONGA_GITHUB_COM_PATHと
|
|
31453
32080
|
これで、$GROONGA_GITHUB_COM_PATHにgroonga.github.comのソースを取得できます。
|
31454
32081
|
.SS cutterのソースコード取得
|
31455
32082
|
.sp
|
31456
|
-
|
32083
|
+
Groongaのリリース作業では、cutterに含まれるスクリプトを使用しています。
|
31457
32084
|
.sp
|
31458
32085
|
そこであらかじめ用意しておいた$HOME/work/cutterディレクトリにてcutterのソースコードを以下のコマンドにて取得します。:
|
31459
32086
|
.INDENT 0.0
|
@@ -31470,7 +32097,7 @@ groongaのリリース作業では、cutterに含まれるスクリプトを使
|
|
31470
32097
|
これで、$CUTTER_SOURCE_PATHディレクトリにcutterのソースを取得できます。
|
31471
32098
|
.SS configureスクリプトの生成
|
31472
32099
|
.sp
|
31473
|
-
|
32100
|
+
Groongaのソースコードをcloneした時点ではconfigureスクリプトが含まれておらず、そのままmakeコマンドにてビルドすることができません。
|
31474
32101
|
.sp
|
31475
32102
|
$GROONGA_CLONE_DIRにてautogen.shを以下のように実行します。:
|
31476
32103
|
.INDENT 0.0
|
@@ -31501,11 +32128,11 @@ Makefileを生成するためにconfigureスクリプトを実行します。
|
|
31501
32128
|
.UNINDENT
|
31502
32129
|
.UNINDENT
|
31503
32130
|
.sp
|
31504
|
-
configureオプションである\-\-with\-groonga\-github\-com\-pathには
|
32131
|
+
configureオプションである\-\-with\-groonga\-github\-com\-pathにはGroongaのウェブサイトのリポジトリをcloneした場所を指定します。
|
31505
32132
|
.sp
|
31506
32133
|
configureオプションである\-\-with\-cutter\-source\-pathにはcutterのソースをcloneした場所を指定します。
|
31507
32134
|
.sp
|
31508
|
-
以下のように
|
32135
|
+
以下のようにGroongaのソースコードをcloneした先からの相対パスを指定することもできます。:
|
31509
32136
|
.INDENT 0.0
|
31510
32137
|
.INDENT 3.5
|
31511
32138
|
.sp
|
@@ -31546,7 +32173,7 @@ make update\-latest\-releaseコマンドでは、OLD_RELEASE_DATEに前回のリ
|
|
31546
32173
|
.UNINDENT
|
31547
32174
|
.UNINDENT
|
31548
32175
|
.sp
|
31549
|
-
これにより、clone済みの
|
32176
|
+
これにより、clone済みのGroongaのWebサイトのトップページのソース(index.html,ja/index.html)やRPMパッケージのspecファイルのバージョン表記などが更新されます。
|
31550
32177
|
.SS make update\-filesの実行
|
31551
32178
|
.sp
|
31552
32179
|
ロケールメッセージの更新や変更されたファイルのリスト等を更新するために以下のコマンドを実行します。:
|
@@ -31679,7 +32306,7 @@ rpmパッケージのビルドに必要なパッケージをダウンロード
|
|
31679
32306
|
.UNINDENT
|
31680
32307
|
.UNINDENT
|
31681
32308
|
.sp
|
31682
|
-
これにより、
|
32309
|
+
これにより、GroongaやMySQLのRPM/SRPMパッケージなどがカレントディレクトリ以下へとダウンロードされます。
|
31683
32310
|
.sp
|
31684
32311
|
windowsパッケージのビルドに必要なパッケージをダウンロードするには以下のコマンドを実行します。:
|
31685
32312
|
.INDENT 0.0
|
@@ -31694,7 +32321,7 @@ windowsパッケージのビルドに必要なパッケージをダウンロー
|
|
31694
32321
|
.UNINDENT
|
31695
32322
|
.UNINDENT
|
31696
32323
|
.sp
|
31697
|
-
これにより、
|
32324
|
+
これにより、Groongaのインストーラやzipアーカイブがカレントディレクトリ以下へとダウンロードされます。
|
31698
32325
|
.sp
|
31699
32326
|
sourceパッケージに必要なものをダウンロードするには以下のコマンドを実行します。:
|
31700
32327
|
.INDENT 0.0
|
@@ -31713,7 +32340,7 @@ sourceパッケージに必要なものをダウンロードするには以下
|
|
31713
32340
|
packages/source/filesディレクトリ以下へとダウンロードされます。
|
31714
32341
|
.SS Debian系パッケージのビルド
|
31715
32342
|
.sp
|
31716
|
-
|
32343
|
+
Groongaのpackages/aptサブディレクトリに移動して、以下のコマンドを実行します。:
|
31717
32344
|
.INDENT 0.0
|
31718
32345
|
.INDENT 3.5
|
31719
32346
|
.sp
|
@@ -31790,7 +32417,7 @@ make build ではまとめてビルドできないこともあります。
|
|
31790
32417
|
.UNINDENT
|
31791
32418
|
.SS Red Hat系パッケージのビルド
|
31792
32419
|
.sp
|
31793
|
-
|
32420
|
+
Groongaのpackages/yumサブディレクトリに移動して、以下のコマンドを実行します。:
|
31794
32421
|
.INDENT 0.0
|
31795
32422
|
.INDENT 3.5
|
31796
32423
|
.sp
|
@@ -31899,9 +32526,9 @@ Debian系もしくはRed Hat系の場合には本番環境へとアップロー
|
|
31899
32526
|
.UNINDENT
|
31900
32527
|
.SS grntestの準備
|
31901
32528
|
.sp
|
31902
|
-
grntestを実行するためには
|
32529
|
+
grntestを実行するためにはGroongaのテストデータとgrntestのソースが必要です。
|
31903
32530
|
.sp
|
31904
|
-
まず
|
32531
|
+
まずGroongaのソースを任意のディレクトリへと展開します。:
|
31905
32532
|
.INDENT 0.0
|
31906
32533
|
.INDENT 3.5
|
31907
32534
|
.sp
|
@@ -31913,7 +32540,7 @@ grntestを実行するためにはgroongaのテストデータとgrntestのソ
|
|
31913
32540
|
.UNINDENT
|
31914
32541
|
.UNINDENT
|
31915
32542
|
.sp
|
31916
|
-
次に
|
32543
|
+
次にGroongaのtest/functionディレクトリ以下にgrntestのソースを展開します。
|
31917
32544
|
つまりtest/function/grntestという名前でgrntestのソースを配置します。:
|
31918
32545
|
.INDENT 0.0
|
31919
32546
|
.INDENT 3.5
|
@@ -31928,7 +32555,7 @@ README.md binlib license test
|
|
31928
32555
|
.UNINDENT
|
31929
32556
|
.SS grntestの実行方法
|
31930
32557
|
.sp
|
31931
|
-
grntestでは
|
32558
|
+
grntestではGroongaコマンドを明示的にしていすることができます。
|
31932
32559
|
後述のパッケージごとのgrntestによる動作確認では以下のようにして実行します。:
|
31933
32560
|
.INDENT 0.0
|
31934
32561
|
.INDENT 3.5
|
@@ -32005,7 +32632,7 @@ grntestの正常終了を確認する
|
|
32005
32632
|
zipアーカイブも同様にしてgrntestを実行し動作確認を行います。
|
32006
32633
|
.SS リリースアナウンスの作成
|
32007
32634
|
.sp
|
32008
|
-
リリースの際にはリリースアナウンスを流して、
|
32635
|
+
リリースの際にはリリースアナウンスを流して、Groongaを広く通知します。
|
32009
32636
|
.sp
|
32010
32637
|
news.txtに変更点をまとめましたが、それを元にリリースアナウンスを作成します。
|
32011
32638
|
.sp
|
@@ -32021,14 +32648,14 @@ news.txtに変更点をまとめましたが、それを元にリリースアナ
|
|
32021
32648
|
リリース変更点(news.txtの内容)
|
32022
32649
|
.UNINDENT
|
32023
32650
|
.sp
|
32024
|
-
リリースのトピック紹介では、これから
|
32651
|
+
リリースのトピック紹介では、これからGroongaを使う人へアピールする点や既存のバージョンを利用している人がアップグレードする際に必要な情報を提供します。
|
32025
32652
|
.sp
|
32026
32653
|
非互換な変更が含まれるのであれば、回避方法等の案内を載せることも重要です。
|
32027
32654
|
.sp
|
32028
32655
|
参考までに過去のリリースアナウンスへのリンクを以下に示します。
|
32029
32656
|
.INDENT 0.0
|
32030
32657
|
.IP \(bu 2
|
32031
|
-
[Groonga\-talk] [ANN]
|
32658
|
+
[Groonga\-talk] [ANN] Groonga 2.0.2
|
32032
32659
|
.INDENT 2.0
|
32033
32660
|
.INDENT 3.5
|
32034
32661
|
.INDENT 0.0
|
@@ -32038,7 +32665,7 @@ news.txtに変更点をまとめましたが、それを元にリリースアナ
|
|
32038
32665
|
.UNINDENT
|
32039
32666
|
.UNINDENT
|
32040
32667
|
.IP \(bu 2
|
32041
|
-
[groonga\-dev,00794] [ANN]
|
32668
|
+
[groonga\-dev,00794] [ANN] Groonga 2.0.2
|
32042
32669
|
.INDENT 2.0
|
32043
32670
|
.INDENT 3.5
|
32044
32671
|
.INDENT 0.0
|
@@ -32189,16 +32816,16 @@ doc/source以下のドキュメントを更新、翻訳まで完了している
|
|
32189
32816
|
.sp
|
32190
32817
|
OS Xでのパッケージ管理方法として \fI\%Homebrew\fP があります。
|
32191
32818
|
.sp
|
32192
|
-
|
32819
|
+
Groongaを簡単にインストールできるようにするために、Homebrewへpull requestを送ります。
|
32193
32820
|
.INDENT 0.0
|
32194
32821
|
.INDENT 3.5
|
32195
32822
|
\fI\%https://github.com/mxcl/homebrew\fP
|
32196
32823
|
.UNINDENT
|
32197
32824
|
.UNINDENT
|
32198
32825
|
.sp
|
32199
|
-
すでに
|
32826
|
+
すでにGroongaのFormulaは取り込まれているので、リリースのたびにFormulaの内容を更新する作業を実施します。
|
32200
32827
|
.sp
|
32201
|
-
|
32828
|
+
Groonga 3.0.6のときは以下のように更新してpull requestを送りました。
|
32202
32829
|
.INDENT 0.0
|
32203
32830
|
.INDENT 3.5
|
32204
32831
|
\fI\%https://github.com/mxcl/homebrew/pull/21456/files\fP
|
@@ -32217,7 +32844,7 @@ Groonga\-talk \fI\%groonga\-talk@lists.sourceforge.net\fP
|
|
32217
32844
|
.UNINDENT
|
32218
32845
|
.SS freecode.comへリリース情報を登録
|
32219
32846
|
.sp
|
32220
|
-
|
32847
|
+
Groongaプロジェクトではfreecode.comでもリリース情報を発信しています。
|
32221
32848
|
.sp
|
32222
32849
|
freecode.comのプロジェクトページは以下の通りです。
|
32223
32850
|
.INDENT 0.0
|
@@ -32255,14 +32882,14 @@ blogroongaのリリースエントリには「リンクをあなたのフォロ
|
|
32255
32882
|
リリースアナウンスを流し終えたら、次期バージョンの開発が始まります。
|
32256
32883
|
.INDENT 0.0
|
32257
32884
|
.IP \(bu 2
|
32258
|
-
|
32885
|
+
Groonga プロジェクトの新規バージョン追加
|
32259
32886
|
.IP \(bu 2
|
32260
|
-
|
32887
|
+
Groonga のbase_versionの更新
|
32261
32888
|
.UNINDENT
|
32262
|
-
.SS
|
32889
|
+
.SS Groonga プロジェクトの新規バージョン追加
|
32263
32890
|
.sp
|
32264
|
-
\fI\%
|
32265
|
-
.SS
|
32891
|
+
\fI\%Groonga プロジェクトの設定ページ\fP にて新規バージョンを追加します。(例: release\-2.0.6)
|
32892
|
+
.SS Groonga バージョン更新
|
32266
32893
|
.sp
|
32267
32894
|
$GROONGA_CLONE_DIRにて以下のコマンドを実行します。:
|
32268
32895
|
.INDENT 0.0
|
@@ -32285,508 +32912,226 @@ base_versionはtar.gzなどのリリース用のファイル名で使用しま
|
|
32285
32912
|
.UNINDENT
|
32286
32913
|
.UNINDENT
|
32287
32914
|
.SS ビルド時のTIPS
|
32288
|
-
.SS ビルドを並列化したい
|
32289
|
-
.sp
|
32290
|
-
make build PALALLES=yesを指定するとchroot環境で並列にビルドを
|
32291
|
-
実行できます。
|
32292
|
-
.SS 特定の環境向けのみビルドしたい
|
32293
|
-
.sp
|
32294
|
-
Debian系の場合、CODES,ARCHITECTURESオプションを明示的に指定することで、特定のリリース、アーキテクチャのみビルドすることができます。
|
32295
|
-
.sp
|
32296
|
-
squeezeのi386のみビルドしたい場合には以下のコマンドを実行します。:
|
32297
|
-
.INDENT 0.0
|
32298
|
-
.INDENT 3.5
|
32299
|
-
.sp
|
32300
|
-
.nf
|
32301
|
-
.ft C
|
32302
|
-
% make build ARCHITECTURES=i386 CODES=squeeze
|
32303
|
-
.ft P
|
32304
|
-
.fi
|
32305
|
-
.UNINDENT
|
32306
|
-
.UNINDENT
|
32307
|
-
.sp
|
32308
|
-
buildコマンド以外でも build\-package\-deb build\-repository\-debなどのサブタスクでもARCHITECTURES,CODES指定は有効です。
|
32309
|
-
.sp
|
32310
|
-
Red Hat系の場合、ARCHITECTURES,DISTRIBUTIONSオプションを明示的に指定することで、特定のリリース、アーキテクチャのみビルドすることができます。
|
32311
|
-
.sp
|
32312
|
-
fedoraのi386のみビルドしたい場合には以下のコマンドを実行します。:
|
32313
|
-
.INDENT 0.0
|
32314
|
-
.INDENT 3.5
|
32315
|
-
.sp
|
32316
|
-
.nf
|
32317
|
-
.ft C
|
32318
|
-
% make build ARCHITECTURES=i386 DISTRIBUTIONS=fedora
|
32319
|
-
.ft P
|
32320
|
-
.fi
|
32321
|
-
.UNINDENT
|
32322
|
-
.UNINDENT
|
32323
|
-
.sp
|
32324
|
-
buildコマンド以外でも build\-in\-chroot build\-repository\-rpmなどのサブタスクでもARCHITECTURES,DISTRIBUTIONSの指定は有効です。
|
32325
|
-
.sp
|
32326
|
-
centosの場合、CENTOS_VERSIONSを指定することで特定のバージョンのみビルドすることができます。
|
32327
|
-
.SS パッケージの署名用のパスフレーズを知りたい
|
32328
|
-
.sp
|
32329
|
-
パッケージの署名に必要な秘密鍵のパスフレーズについては
|
32330
|
-
リリース担当者向けの秘密鍵を復号したテキストの1行目に記載してあります。
|
32331
|
-
.SS バージョンを明示的に指定してドキュメントを生成したい
|
32332
|
-
.sp
|
32333
|
-
リリース後にドキュメントの一部を差し替えたい場合、特に何も指定しないと生成したHTMLに埋め込まれるバージョンが「v3.0.1\-xxxxxドキュメント」となってしまうことがあります。gitでのコミット時ハッシュの一部が使われるためです。
|
32334
|
-
.sp
|
32335
|
-
これを回避するには、以下のようにDOCUMENT_VERSIONやDOCUMENT_VERSION_FULLを明示的に指定します。:
|
32336
|
-
.INDENT 0.0
|
32337
|
-
.INDENT 3.5
|
32338
|
-
.sp
|
32339
|
-
.nf
|
32340
|
-
.ft C
|
32341
|
-
% make update\-document DOCUMENT_VERSION=3.0.1 DOCUMENT_VERSION_FULL=3.0.1
|
32342
|
-
.ft P
|
32343
|
-
.fi
|
32344
|
-
.UNINDENT
|
32345
|
-
.UNINDENT
|
32346
|
-
.SS テスト方法
|
32347
|
-
.SS テスト環境の構築
|
32348
|
-
.SS Cutterのインストール
|
32349
|
-
.sp
|
32350
|
-
groongaは、テストのフレームワークとして \fI\%Cutter\fP を用いています。
|
32351
|
-
.sp
|
32352
|
-
Cutterのインストール方法は \fI\%プラットフォーム毎のCutterのインストール方法\fP をご覧下さい。
|
32353
|
-
.SS lcovのインストール
|
32354
|
-
.sp
|
32355
|
-
カバレッジ情報を計測するためには、lcov 1.6以上が必要です。DebianやUbuntuでは以下のようにしてインストールできます。:
|
32356
|
-
.INDENT 0.0
|
32357
|
-
.INDENT 3.5
|
32358
|
-
.sp
|
32359
|
-
.nf
|
32360
|
-
.ft C
|
32361
|
-
% sudo aptitude install \-y lcov
|
32362
|
-
.ft P
|
32363
|
-
.fi
|
32364
|
-
.UNINDENT
|
32365
|
-
.UNINDENT
|
32366
|
-
.SS clangのインストール
|
32367
|
-
.sp
|
32368
|
-
ソースコードの静的解析を行うためには、clang(scan\-build)をインストールする必要があります。DebianやUbuntuでは以下のようにしてインストールできます。:
|
32369
|
-
.INDENT 0.0
|
32370
|
-
.INDENT 3.5
|
32371
|
-
.sp
|
32372
|
-
.nf
|
32373
|
-
.ft C
|
32374
|
-
% sudo aptitude install \-y clang
|
32375
|
-
.ft P
|
32376
|
-
.fi
|
32377
|
-
.UNINDENT
|
32378
|
-
.UNINDENT
|
32379
|
-
.SS libmemcachedのインストール
|
32380
|
-
.sp
|
32381
|
-
memcachedのバイナリプロトコルのテストを動作させるためには、libmemcachedの導入が必要です。squeeze以降のDebianやKarmic以降のUubntuでは以下の用にしてインストールできます。:
|
32382
|
-
.INDENT 0.0
|
32383
|
-
.INDENT 3.5
|
32384
|
-
.sp
|
32385
|
-
.nf
|
32386
|
-
.ft C
|
32387
|
-
% sudo aptitude install \-y libmemcached\-dev
|
32388
|
-
.ft P
|
32389
|
-
.fi
|
32390
|
-
.UNINDENT
|
32391
|
-
.UNINDENT
|
32392
|
-
.SS テストの動作
|
32393
|
-
.sp
|
32394
|
-
groongaのトップディレクトリで、以下のコマンドを実行します。:
|
32395
|
-
.INDENT 0.0
|
32396
|
-
.INDENT 3.5
|
32397
|
-
.sp
|
32398
|
-
.nf
|
32399
|
-
.ft C
|
32400
|
-
make check
|
32401
|
-
.ft P
|
32402
|
-
.fi
|
32403
|
-
.UNINDENT
|
32404
|
-
.UNINDENT
|
32405
|
-
.SS カバレッジ情報
|
32406
|
-
.sp
|
32407
|
-
groongaのトップディレクトリで、以下のコマンドを実行します。:
|
32408
|
-
.INDENT 0.0
|
32409
|
-
.INDENT 3.5
|
32410
|
-
.sp
|
32411
|
-
.nf
|
32412
|
-
.ft C
|
32413
|
-
make coverage
|
32414
|
-
.ft P
|
32415
|
-
.fi
|
32416
|
-
.UNINDENT
|
32417
|
-
.UNINDENT
|
32418
|
-
.sp
|
32419
|
-
すると、coverageディレクトリ以下に、カバレッジ情報が入ったhtmlが出力されます。
|
32420
|
-
.sp
|
32421
|
-
カバレッジには、Lines/Functions/Branchesの3つの対象があります。それぞれ、行/関数/分岐に対応します。Functionsがもっとも重要な対象です。すべての関数がテストされるようになっていることを心がけてください。
|
32422
|
-
.sp
|
32423
|
-
テストがカバーしていない部分の編集は慎重に行ってください。また、テストがカバーしている部分を増やすことも重要です。
|
32424
|
-
.SS 様々なテスト
|
32425
|
-
.sp
|
32426
|
-
テストは、test/unitディレクトリにおいて、./run\-test.shを実行することによっても行えます。run\-test.shはいくつかのオプションをとります。詳細は、./run\-test.sh \-\-helpを実行しヘルプをご覧ください。
|
32427
|
-
.SS 特定のテスト関数のみテストする
|
32428
|
-
.sp
|
32429
|
-
特定のテスト関数(Cutterではテストと呼ぶ)のみをテストすることができます。
|
32430
|
-
.sp
|
32431
|
-
実行例:
|
32432
|
-
.INDENT 0.0
|
32433
|
-
.INDENT 3.5
|
32434
|
-
.sp
|
32435
|
-
.nf
|
32436
|
-
.ft C
|
32437
|
-
% ./run\-test.sh \-n test_text_otoj
|
32438
|
-
.ft P
|
32439
|
-
.fi
|
32440
|
-
.UNINDENT
|
32441
|
-
.UNINDENT
|
32442
|
-
.SS 特定のテストファイルのみテストする
|
32443
|
-
.sp
|
32444
|
-
特定のテストファイル(Cutterではテストケースと呼ぶ)のみテストすることができます。
|
32445
|
-
.sp
|
32446
|
-
実行例:
|
32447
|
-
.INDENT 0.0
|
32448
|
-
.INDENT 3.5
|
32449
|
-
.sp
|
32450
|
-
.nf
|
32451
|
-
.ft C
|
32452
|
-
% ./run\-test.sh \-t test_string
|
32453
|
-
.ft P
|
32454
|
-
.fi
|
32455
|
-
.UNINDENT
|
32456
|
-
.UNINDENT
|
32457
|
-
.SS 不正メモリアクセス・メモリリーク検出
|
32458
|
-
.sp
|
32459
|
-
環境変数CUTTER_CHECK_LEAKをyesと設定すると、valgrindを用いて不正メモリアクセスやメモリリークを検出しつつ、テストを動作させることができます。
|
32460
|
-
.sp
|
32461
|
-
run\-test.shのみならず、make checkでも利用可能です。
|
32462
|
-
.sp
|
32463
|
-
実行例:
|
32464
|
-
.INDENT 0.0
|
32465
|
-
.INDENT 3.5
|
32466
|
-
.sp
|
32467
|
-
.nf
|
32468
|
-
.ft C
|
32469
|
-
% CUTTER_CHECK_LEAK=yes make check
|
32470
|
-
.ft P
|
32471
|
-
.fi
|
32472
|
-
.UNINDENT
|
32473
|
-
.UNINDENT
|
32474
|
-
.SS デバッガ上でのテスト実行
|
32915
|
+
.SS ビルドを並列化したい
|
32475
32916
|
.sp
|
32476
|
-
|
32917
|
+
make build PALALLES=yesを指定するとchroot環境で並列にビルドを
|
32918
|
+
実行できます。
|
32919
|
+
.SS 特定の環境向けのみビルドしたい
|
32477
32920
|
.sp
|
32478
|
-
|
32921
|
+
Debian系の場合、CODES,ARCHITECTURESオプションを明示的に指定することで、特定のリリース、アーキテクチャのみビルドすることができます。
|
32479
32922
|
.sp
|
32480
|
-
|
32923
|
+
squeezeのi386のみビルドしたい場合には以下のコマンドを実行します。:
|
32481
32924
|
.INDENT 0.0
|
32482
32925
|
.INDENT 3.5
|
32483
32926
|
.sp
|
32484
32927
|
.nf
|
32485
32928
|
.ft C
|
32486
|
-
%
|
32929
|
+
% make build ARCHITECTURES=i386 CODES=squeeze
|
32487
32930
|
.ft P
|
32488
32931
|
.fi
|
32489
32932
|
.UNINDENT
|
32490
32933
|
.UNINDENT
|
32491
|
-
.SS 静的解析
|
32492
32934
|
.sp
|
32493
|
-
|
32935
|
+
buildコマンド以外でも build\-package\-deb build\-repository\-debなどのサブタスクでもARCHITECTURES,CODES指定は有効です。
|
32936
|
+
.sp
|
32937
|
+
Red Hat系の場合、ARCHITECTURES,DISTRIBUTIONSオプションを明示的に指定することで、特定のリリース、アーキテクチャのみビルドすることができます。
|
32938
|
+
.sp
|
32939
|
+
fedoraのi386のみビルドしたい場合には以下のコマンドを実行します。:
|
32494
32940
|
.INDENT 0.0
|
32495
32941
|
.INDENT 3.5
|
32496
32942
|
.sp
|
32497
32943
|
.nf
|
32498
32944
|
.ft C
|
32499
|
-
%
|
32500
|
-
% make clean
|
32501
|
-
% scan\-build \-o ./scan_build make \-j4
|
32945
|
+
% make build ARCHITECTURES=i386 DISTRIBUTIONS=fedora
|
32502
32946
|
.ft P
|
32503
32947
|
.fi
|
32504
32948
|
.UNINDENT
|
32505
32949
|
.UNINDENT
|
32506
32950
|
.sp
|
32507
|
-
|
32508
|
-
.SS How to contribute in documentation topics
|
32509
|
-
.sp
|
32510
|
-
We use \fI\%Sphinx\fP for documentation tool.
|
32511
|
-
.SS C API
|
32512
|
-
.sp
|
32513
|
-
We still have C API documentation in include/groonga.h. But
|
32514
|
-
we want to move them into doc/source/c\-api/*.txt. We welcome
|
32515
|
-
to you help us by moving C API documentation.
|
32516
|
-
.sp
|
32517
|
-
We will use \fI\%the C domain markup\fP of Sphinx.
|
32518
|
-
.SS I18N
|
32519
|
-
.sp
|
32520
|
-
We only had documentation in Japanese. We start to support
|
32521
|
-
I18N documentation by gettext based \fI\%Sphinx I18N feature\fP.
|
32522
|
-
We\(aqll use English as base language and translate
|
32523
|
-
English into other languages such as Japanese. We\(aqll put
|
32524
|
-
all documentations into doc/source/ and process them by
|
32525
|
-
Sphinx.
|
32951
|
+
buildコマンド以外でも build\-in\-chroot build\-repository\-rpmなどのサブタスクでもARCHITECTURES,DISTRIBUTIONSの指定は有効です。
|
32526
32952
|
.sp
|
32527
|
-
|
32528
|
-
|
32529
|
-
English. We welcome to you help us by translating
|
32530
|
-
documentation.
|
32531
|
-
.SS Translation flow
|
32953
|
+
centosの場合、CENTOS_VERSIONSを指定することで特定のバージョンのみビルドすることができます。
|
32954
|
+
.SS パッケージの署名用のパスフレーズを知りたい
|
32532
32955
|
.sp
|
32533
|
-
|
32956
|
+
パッケージの署名に必要な秘密鍵のパスフレーズについては
|
32957
|
+
リリース担当者向けの秘密鍵を復号したテキストの1行目に記載してあります。
|
32958
|
+
.SS バージョンを明示的に指定してドキュメントを生成したい
|
32534
32959
|
.sp
|
32535
|
-
|
32536
|
-
.INDENT 0.0
|
32537
|
-
.IP 1. 3
|
32538
|
-
Clone groonga repository.
|
32539
|
-
.IP 2. 3
|
32540
|
-
Update .po files.
|
32541
|
-
.IP 3. 3
|
32542
|
-
Edit .po files.
|
32543
|
-
.IP 4. 3
|
32544
|
-
Generate HTML files.
|
32545
|
-
.IP 5. 3
|
32546
|
-
Confirm HTML output.
|
32547
|
-
.IP 6. 3
|
32548
|
-
Repeat 2.\-4. until you get good result.
|
32549
|
-
.IP 7. 3
|
32550
|
-
Send your works to us!
|
32551
|
-
.UNINDENT
|
32960
|
+
リリース後にドキュメントの一部を差し替えたい場合、特に何も指定しないと生成したHTMLに埋め込まれるバージョンが「v3.0.1\-xxxxxドキュメント」となってしまうことがあります。gitでのコミット時ハッシュの一部が使われるためです。
|
32552
32961
|
.sp
|
32553
|
-
|
32554
|
-
sections describes details.
|
32962
|
+
これを回避するには、以下のようにDOCUMENT_VERSIONやDOCUMENT_VERSION_FULLを明示的に指定します。:
|
32555
32963
|
.INDENT 0.0
|
32556
32964
|
.INDENT 3.5
|
32557
32965
|
.sp
|
32558
32966
|
.nf
|
32559
32967
|
.ft C
|
32560
|
-
|
32561
|
-
% git clone https://github.com/${YOUR_GITHUB_ACCOUNT}/groonga.git
|
32562
|
-
% ./autogen.sh
|
32563
|
-
% ./configure
|
32564
|
-
% cd doc/locale/${LANGUAGE}/LC_MESSAGES # ${LANGUAGE} is language code such as \(aqja\(aq.
|
32565
|
-
% make update # *.po are updated
|
32566
|
-
% editor *.po # translate *.po # you can use your favorite editor
|
32567
|
-
% cd ..
|
32568
|
-
% make html
|
32569
|
-
% browser html/index.html # confirm translation
|
32570
|
-
% git add LC_MESSAGES/*.po
|
32571
|
-
% git commit
|
32572
|
-
% git push
|
32968
|
+
% make update\-document DOCUMENT_VERSION=3.0.1 DOCUMENT_VERSION_FULL=3.0.1
|
32573
32969
|
.ft P
|
32574
32970
|
.fi
|
32575
32971
|
.UNINDENT
|
32576
32972
|
.UNINDENT
|
32577
|
-
.SS
|
32973
|
+
.SS テスト方法
|
32974
|
+
.SS テスト環境の構築
|
32975
|
+
.SS Cutterのインストール
|
32578
32976
|
.sp
|
32579
|
-
|
32580
|
-
|
32581
|
-
\
|
32977
|
+
Groongaは、テストのフレームワークとして \fI\%Cutter\fP を用いています。
|
32978
|
+
.sp
|
32979
|
+
Cutterのインストール方法は \fI\%プラットフォーム毎のCutterのインストール方法\fP をご覧下さい。
|
32980
|
+
.SS lcovのインストール
|
32981
|
+
.sp
|
32982
|
+
カバレッジ情報を計測するためには、lcov 1.6以上が必要です。DebianやUbuntuでは以下のようにしてインストールできます。:
|
32582
32983
|
.INDENT 0.0
|
32583
32984
|
.INDENT 3.5
|
32584
32985
|
.sp
|
32585
32986
|
.nf
|
32586
32987
|
.ft C
|
32587
|
-
%
|
32988
|
+
% sudo aptitude install \-y lcov
|
32588
32989
|
.ft P
|
32589
32990
|
.fi
|
32590
32991
|
.UNINDENT
|
32591
32992
|
.UNINDENT
|
32993
|
+
.SS clangのインストール
|
32592
32994
|
.sp
|
32593
|
-
|
32995
|
+
ソースコードの静的解析を行うためには、clang(scan\-build)をインストールする必要があります。DebianやUbuntuでは以下のようにしてインストールできます。:
|
32594
32996
|
.INDENT 0.0
|
32595
32997
|
.INDENT 3.5
|
32596
32998
|
.sp
|
32597
32999
|
.nf
|
32598
33000
|
.ft C
|
32599
|
-
%
|
32600
|
-
% ./autogen.sh
|
32601
|
-
% ./configure
|
33001
|
+
% sudo aptitude install \-y clang
|
32602
33002
|
.ft P
|
32603
33003
|
.fi
|
32604
33004
|
.UNINDENT
|
32605
33005
|
.UNINDENT
|
33006
|
+
.SS libmemcachedのインストール
|
32606
33007
|
.sp
|
32607
|
-
|
32608
|
-
.sp
|
32609
|
-
If you have troubles on the above steps, you can use source
|
32610
|
-
files available on \fI\%http://packages.groonga.org/source/groonga/\fP .
|
32611
|
-
.SS How to update .po files
|
32612
|
-
.sp
|
32613
|
-
You can update .po files by running \fImake update\fP on
|
32614
|
-
doc/locale/${LANGUAGE}/LC_MESSAGES. (Please substitute
|
32615
|
-
\fI${LANGUAGE}\fP with your language code such as \(aqja\(aq.):
|
33008
|
+
memcachedのバイナリプロトコルのテストを動作させるためには、libmemcachedの導入が必要です。squeeze以降のDebianやKarmic以降のUubntuでは以下の用にしてインストールできます。:
|
32616
33009
|
.INDENT 0.0
|
32617
33010
|
.INDENT 3.5
|
32618
33011
|
.sp
|
32619
33012
|
.nf
|
32620
33013
|
.ft C
|
32621
|
-
%
|
32622
|
-
% make update
|
33014
|
+
% sudo aptitude install \-y libmemcached\-dev
|
32623
33015
|
.ft P
|
32624
33016
|
.fi
|
32625
33017
|
.UNINDENT
|
32626
33018
|
.UNINDENT
|
32627
|
-
.SS
|
32628
|
-
.sp
|
32629
|
-
There are some tools to edit .po files. .po files are just
|
32630
|
-
text. So you can use your favorite editor. Here is a
|
32631
|
-
specialized editor for .po file edit list.
|
32632
|
-
.INDENT 0.0
|
32633
|
-
.TP
|
32634
|
-
.B Emacs\(aqs \fI\%po\-mode\fP
|
32635
|
-
It is bundled in gettext.
|
32636
|
-
.TP
|
32637
|
-
.B \fI\%Poedit\fP
|
32638
|
-
It is a .po editor and works on many platform.
|
32639
|
-
.TP
|
32640
|
-
.B gted
|
32641
|
-
It is also a .po editor and is implemented as Eclipse plugin.
|
32642
|
-
.UNINDENT
|
32643
|
-
.SS How to generate HTML files
|
33019
|
+
.SS テストの動作
|
32644
33020
|
.sp
|
32645
|
-
|
32646
|
-
running \fImake html\fP on doc/locale/${LANGUAGE}. (Please
|
32647
|
-
substitute \fI${LANGUAGE}\fP with your language code such as
|
32648
|
-
\(aqja\(aq.):
|
33021
|
+
Groongaのトップディレクトリで、以下のコマンドを実行します。:
|
32649
33022
|
.INDENT 0.0
|
32650
33023
|
.INDENT 3.5
|
32651
33024
|
.sp
|
32652
33025
|
.nf
|
32653
33026
|
.ft C
|
32654
|
-
|
32655
|
-
% make html
|
33027
|
+
make check
|
32656
33028
|
.ft P
|
32657
33029
|
.fi
|
32658
33030
|
.UNINDENT
|
32659
33031
|
.UNINDENT
|
33032
|
+
.SS カバレッジ情報
|
32660
33033
|
.sp
|
32661
|
-
|
32662
|
-
running \fImake html\fP on doc/locale:
|
33034
|
+
Groongaのトップディレクトリで、以下のコマンドを実行します。:
|
32663
33035
|
.INDENT 0.0
|
32664
33036
|
.INDENT 3.5
|
32665
33037
|
.sp
|
32666
33038
|
.nf
|
32667
33039
|
.ft C
|
32668
|
-
|
32669
|
-
% make html
|
33040
|
+
make coverage
|
32670
33041
|
.ft P
|
32671
33042
|
.fi
|
32672
33043
|
.UNINDENT
|
32673
33044
|
.UNINDENT
|
32674
33045
|
.sp
|
32675
|
-
|
32676
|
-
.INDENT 0.0
|
32677
|
-
.INDENT 3.5
|
32678
|
-
.mo files are updated automatically by \fImake html\fP. So
|
32679
|
-
you don\(aqt care about .mo files.
|
32680
|
-
.UNINDENT
|
32681
|
-
.UNINDENT
|
32682
|
-
.SS How to confirm HTML output
|
33046
|
+
すると、coverageディレクトリ以下に、カバレッジ情報が入ったhtmlが出力されます。
|
32683
33047
|
.sp
|
32684
|
-
|
32685
|
-
|
32686
|
-
|
32687
|
-
|
33048
|
+
カバレッジには、Lines/Functions/Branchesの3つの対象があります。それぞれ、行/関数/分岐に対応します。Functionsがもっとも重要な対象です。すべての関数がテストされるようになっていることを心がけてください。
|
33049
|
+
.sp
|
33050
|
+
テストがカバーしていない部分の編集は慎重に行ってください。また、テストがカバーしている部分を増やすことも重要です。
|
33051
|
+
.SS 様々なテスト
|
33052
|
+
.sp
|
33053
|
+
テストは、test/unitディレクトリにおいて、./run\-test.shを実行することによっても行えます。run\-test.shはいくつかのオプションをとります。詳細は、./run\-test.sh \-\-helpを実行しヘルプをご覧ください。
|
33054
|
+
.SS 特定のテスト関数のみテストする
|
33055
|
+
.sp
|
33056
|
+
特定のテスト関数(Cutterではテストと呼ぶ)のみをテストすることができます。
|
33057
|
+
.sp
|
33058
|
+
実行例:
|
32688
33059
|
.INDENT 0.0
|
32689
33060
|
.INDENT 3.5
|
32690
33061
|
.sp
|
32691
33062
|
.nf
|
32692
33063
|
.ft C
|
32693
|
-
%
|
33064
|
+
% ./run\-test.sh \-n test_text_otoj
|
32694
33065
|
.ft P
|
32695
33066
|
.fi
|
32696
33067
|
.UNINDENT
|
32697
33068
|
.UNINDENT
|
32698
|
-
.SS
|
33069
|
+
.SS 特定のテストファイルのみテストする
|
32699
33070
|
.sp
|
32700
|
-
|
32701
|
-
E\-mail attachment patch or .po files themselves.
|
32702
|
-
.SS How to send pull request
|
33071
|
+
特定のテストファイル(Cutterではテストケースと呼ぶ)のみテストすることができます。
|
32703
33072
|
.sp
|
32704
|
-
|
33073
|
+
実行例:
|
32705
33074
|
.INDENT 0.0
|
32706
33075
|
.INDENT 3.5
|
32707
33076
|
.sp
|
32708
33077
|
.nf
|
32709
33078
|
.ft C
|
32710
|
-
%
|
32711
|
-
% git commit
|
32712
|
-
% git push
|
33079
|
+
% ./run\-test.sh \-t test_string
|
32713
33080
|
.ft P
|
32714
33081
|
.fi
|
32715
33082
|
.UNINDENT
|
32716
33083
|
.UNINDENT
|
33084
|
+
.SS 不正メモリアクセス・メモリリーク検出
|
32717
33085
|
.sp
|
32718
|
-
|
32719
|
-
your repository page on GitHub and press \fIPull Request\fP
|
32720
|
-
button.
|
33086
|
+
環境変数CUTTER_CHECK_LEAKをyesと設定すると、valgrindを用いて不正メモリアクセスやメモリリークを検出しつつ、テストを動作させることができます。
|
32721
33087
|
.sp
|
32722
|
-
|
32723
|
-
.INDENT 0.0
|
32724
|
-
.INDENT 3.5
|
32725
|
-
\fI\%Help.GitHub \- Sending pull requests\fP.
|
32726
|
-
.UNINDENT
|
32727
|
-
.UNINDENT
|
32728
|
-
.SS How to send patch
|
33088
|
+
run\-test.shのみならず、make checkでも利用可能です。
|
32729
33089
|
.sp
|
32730
|
-
|
33090
|
+
実行例:
|
32731
33091
|
.INDENT 0.0
|
32732
33092
|
.INDENT 3.5
|
32733
33093
|
.sp
|
32734
33094
|
.nf
|
32735
33095
|
.ft C
|
32736
|
-
%
|
32737
|
-
% git commit
|
32738
|
-
% git format\-patch origin/master
|
33096
|
+
% CUTTER_CHECK_LEAK=yes make check
|
32739
33097
|
.ft P
|
32740
33098
|
.fi
|
32741
33099
|
.UNINDENT
|
32742
33100
|
.UNINDENT
|
33101
|
+
.SS デバッガ上でのテスト実行
|
32743
33102
|
.sp
|
32744
|
-
|
32745
|
-
directory. Please send those files to us!
|
32746
|
-
.sp
|
32747
|
-
\fBSEE ALSO:\fP
|
32748
|
-
.INDENT 0.0
|
32749
|
-
.INDENT 3.5
|
32750
|
-
\fB/community\fP describes our contact information.
|
32751
|
-
.UNINDENT
|
32752
|
-
.UNINDENT
|
32753
|
-
.SS How to send .po files
|
33103
|
+
環境変数CUTTER_DEBUGをyesと設定すると、テストが実行できる環境が整ったgdbが実行されます。gdb上でrunを行うと、テストの実行が開始されます。
|
32754
33104
|
.sp
|
32755
|
-
|
32756
|
-
substitute \fI${LANGUAGE}\fP with your language code such as
|
32757
|
-
\(aqja\(aq.) and send it to us! We extract and merge them to the
|
32758
|
-
groonga repository.
|
33105
|
+
run\-test.shのみならず、make checkでも利用可能です。
|
32759
33106
|
.sp
|
32760
|
-
|
33107
|
+
実行例:
|
32761
33108
|
.INDENT 0.0
|
32762
33109
|
.INDENT 3.5
|
32763
|
-
|
33110
|
+
.sp
|
33111
|
+
.nf
|
33112
|
+
.ft C
|
33113
|
+
% CUTTER_DEBUG=yes make check
|
33114
|
+
.ft P
|
33115
|
+
.fi
|
32764
33116
|
.UNINDENT
|
32765
33117
|
.UNINDENT
|
32766
|
-
.SS
|
33118
|
+
.SS 静的解析
|
32767
33119
|
.sp
|
32768
|
-
|
33120
|
+
scan\-buildを用いて、ソースコードの静的解析を行うことができます。scan_buildというディレクトリに解析結果のhtmlが出力されます。:
|
32769
33121
|
.INDENT 0.0
|
32770
33122
|
.INDENT 3.5
|
32771
33123
|
.sp
|
32772
33124
|
.nf
|
32773
33125
|
.ft C
|
32774
|
-
%
|
32775
|
-
% make
|
33126
|
+
% scan\-build ./configure \-\-prefix=/usr
|
33127
|
+
% make clean
|
33128
|
+
% scan\-build \-o ./scan_build make \-j4
|
32776
33129
|
.ft P
|
32777
33130
|
.fi
|
32778
33131
|
.UNINDENT
|
32779
33132
|
.UNINDENT
|
32780
33133
|
.sp
|
32781
|
-
|
32782
|
-
as \(aqja\(aq.
|
32783
|
-
.sp
|
32784
|
-
\fBSEE ALSO:\fP
|
32785
|
-
.INDENT 0.0
|
32786
|
-
.INDENT 3.5
|
32787
|
-
\fI\%Codes for the Representation of Names of Languages\fP.
|
32788
|
-
.UNINDENT
|
32789
|
-
.UNINDENT
|
33134
|
+
configureは1度のみ実行する必要があります。
|
32790
33135
|
.INDENT 0.0
|
32791
33136
|
.IP \(bu 2
|
32792
33137
|
\fIgenindex\fP
|