rroonga 1.3.0-x86-mingw32 → 1.3.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +33 -2
- data/benchmark/common.rb +2 -2
- data/benchmark/read-write-many-small-items.rb +71 -62
- data/benchmark/write-many-small-items.rb +61 -53
- data/ext/groonga/rb-grn-context.c +23 -5
- data/ext/groonga/rb-grn-index-column.c +2 -6
- data/ext/groonga/rb-grn-operator.c +31 -1
- data/ext/groonga/rb-grn-variable-size-column.c +77 -1
- data/ext/groonga/rb-grn.h +2 -11
- data/ext/groonga/rb-groonga.c +1 -2
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/command.rb +169 -0
- data/lib/groonga/context.rb +4 -124
- data/lib/groonga/dumper.rb +10 -8
- data/lib/groonga/record.rb +7 -0
- data/lib/groonga/schema.rb +98 -7
- data/rroonga-build.rb +3 -3
- data/test/{test-context-select.rb → test-command-select.rb} +3 -3
- data/test/test-record.rb +18 -1
- data/test/test-schema-dumper.rb +48 -0
- data/test/test-schema-type.rb +35 -0
- data/test/test-schema.rb +81 -11
- data/test/test-table-select.rb +49 -38
- data/test/test-variable-size-column.rb +30 -0
- data/vendor/local/bin/grntest.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/bin/libmecab-1.dll +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga/plugin.h +3 -2
- data/vendor/local/include/groonga/groonga.h +106 -78
- data/vendor/local/lib/groonga/plugins/suggest/suggest.a +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll +0 -0
- data/vendor/local/lib/groonga/plugins/suggest/suggest.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +5 -2
- data/vendor/local/libexec/mecab/mecab-cost-train.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-gen.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-dict-index.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-system-eval.exe +0 -0
- data/vendor/local/libexec/mecab/mecab-test-gen.exe +0 -0
- data/vendor/local/share/doc/groonga/en/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/community.txt +4 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/index.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/install.txt +102 -27
- data/vendor/local/share/doc/groonga/en/html/_sources/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +130 -21
- data/vendor/local/share/doc/groonga/en/html/_sources/output.txt +164 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/en/html/_sources/type.txt +3 -3
- data/vendor/local/share/doc/groonga/en/html/_static/basic.css +13 -1
- data/vendor/local/share/doc/groonga/en/html/_static/doctools.js +5 -5
- data/vendor/local/share/doc/groonga/en/html/_static/searchtools.js +11 -7
- data/vendor/local/share/doc/groonga/en/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +60 -52
- data/vendor/local/share/doc/groonga/en/html/command_version.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +38 -35
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +38 -38
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +36 -36
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +38 -36
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +34 -34
- data/vendor/local/share/doc/groonga/en/html/commands.html +41 -41
- data/vendor/local/share/doc/groonga/en/html/community.html +14 -12
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/contribution.html +15 -13
- data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +12 -12
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/executables.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/expr.html +25 -25
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +71 -36
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +53 -33
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +30 -30
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +32 -32
- data/vendor/local/share/doc/groonga/en/html/functions.html +22 -22
- data/vendor/local/share/doc/groonga/en/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/index.html +92 -87
- data/vendor/local/share/doc/groonga/en/html/install.html +109 -40
- data/vendor/local/share/doc/groonga/en/html/limitations.html +19 -19
- data/vendor/local/share/doc/groonga/en/html/log.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/news.html +233 -112
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +302 -0
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +21 -21
- data/vendor/local/share/doc/groonga/en/html/reference.html +59 -55
- data/vendor/local/share/doc/groonga/en/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/en/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/en/html/spec/search.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/spec.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/suggest.html +7 -12
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +11 -11
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +23 -23
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +124 -164
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +14 -14
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +11 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +26 -26
- data/vendor/local/share/doc/groonga/en/html/type.html +31 -31
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/community.txt +4 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/index.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/install.txt +102 -27
- data/vendor/local/share/doc/groonga/ja/html/_sources/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +130 -21
- data/vendor/local/share/doc/groonga/ja/html/_sources/output.txt +164 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/ja/html/_sources/type.txt +3 -3
- data/vendor/local/share/doc/groonga/ja/html/_static/basic.css +13 -1
- data/vendor/local/share/doc/groonga/ja/html/_static/doctools.js +5 -5
- data/vendor/local/share/doc/groonga/ja/html/_static/searchtools.js +11 -7
- data/vendor/local/share/doc/groonga/ja/html/_static/websupport.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +55 -47
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +38 -35
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +38 -38
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +36 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +38 -36
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +34 -34
- data/vendor/local/share/doc/groonga/ja/html/commands.html +41 -41
- data/vendor/local/share/doc/groonga/ja/html/community.html +10 -8
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +12 -12
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/executables.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/expr.html +25 -25
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +71 -36
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +53 -33
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +30 -30
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +32 -32
- data/vendor/local/share/doc/groonga/ja/html/functions.html +22 -22
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/index.html +84 -79
- data/vendor/local/share/doc/groonga/ja/html/install.html +92 -16
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +13 -13
- data/vendor/local/share/doc/groonga/ja/html/log.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/news.html +202 -99
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +287 -0
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/reference.html +59 -55
- data/vendor/local/share/doc/groonga/ja/html/search.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/searchindex.js +1 -1
- data/vendor/local/share/doc/groonga/ja/html/spec/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/spec.html +11 -11
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +7 -11
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +93 -115
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +8 -8
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +8 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +7 -7
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +21 -21
- data/vendor/local/share/doc/groonga/ja/html/type.html +31 -31
- data/vendor/local/share/doc/groonga/source/characteristic.txt +42 -32
- data/vendor/local/share/doc/groonga/source/commands/delete.txt +5 -1
- data/vendor/local/share/doc/groonga/source/commands/table_create.txt +5 -2
- data/vendor/local/share/doc/groonga/source/community.txt +4 -3
- data/vendor/local/share/doc/groonga/source/contribution.txt +8 -6
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-1.log +8 -8
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-2.log +4 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/data-3.log +4 -4
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-1.log +3 -15
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-2.log +2 -7
- data/vendor/local/share/doc/groonga/source/example/tutorial/introduction-3.log +2 -7
- data/vendor/local/share/doc/groonga/source/functions/geo_distance.txt +42 -3
- data/vendor/local/share/doc/groonga/source/functions/geo_in_circle.txt +26 -1
- data/vendor/local/share/doc/groonga/source/index.txt +2 -2
- data/vendor/local/share/doc/groonga/source/install.txt +102 -27
- data/vendor/local/share/doc/groonga/source/limitations.txt +10 -10
- data/vendor/local/share/doc/groonga/source/news.txt +130 -21
- data/vendor/local/share/doc/groonga/source/output.txt +164 -0
- data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/source/suggest.txt +0 -5
- data/vendor/local/share/doc/groonga/source/tutorial/data.txt +6 -4
- data/vendor/local/share/doc/groonga/source/tutorial/drilldown.txt +1 -3
- data/vendor/local/share/doc/groonga/source/tutorial/index.txt +2 -1
- data/vendor/local/share/doc/groonga/source/tutorial/introduction.txt +95 -116
- data/vendor/local/share/doc/groonga/source/tutorial/match_columns.txt +1 -4
- data/vendor/local/share/doc/groonga/source/tutorial/micro_blog.txt +1 -4
- data/vendor/local/share/doc/groonga/source/tutorial/network.txt +3 -0
- data/vendor/local/share/doc/groonga/source/tutorial/patricia_trie.txt +1 -2
- data/vendor/local/share/doc/groonga/source/tutorial/query_expansion.txt +5 -0
- data/vendor/local/share/doc/groonga/source/tutorial/search.txt +3 -0
- data/vendor/local/share/doc/groonga/source/tutorial.txt +2 -2
- data/vendor/local/share/doc/groonga/source/type.txt +3 -3
- data/vendor/local/share/groonga/examples/dictionary/html/js/dictionary.js +1 -0
- data/vendor/local/share/groonga/html/admin/index.html +40 -0
- data/vendor/local/share/groonga/html/admin/js/jquery.flot-0.7.min.js +6 -0
- data/vendor/local/share/groonga/html/admin/js/jquery.flot.license.txt +22 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +560 -138
- data/vendor/local/share/man/man1/groonga.1 +637 -223
- metadata +887 -898
- data/ext/groonga/Makefile +0 -184
- data/ext/groonga/rb-grn-query.c +0 -260
- data/test/test-query.rb +0 -22
@@ -9,7 +9,7 @@
|
|
9
9
|
<head>
|
10
10
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
11
11
|
|
12
|
-
<title>4.1.
|
12
|
+
<title>4.1. Basic operations — groonga v1.2.9 documentation</title>
|
13
13
|
|
14
14
|
<link rel="stylesheet" href="../_static/groonga.css" type="text/css" />
|
15
15
|
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<script type="text/javascript">
|
18
18
|
var DOCUMENTATION_OPTIONS = {
|
19
19
|
URL_ROOT: '../',
|
20
|
-
VERSION: '1.2.
|
20
|
+
VERSION: '1.2.9',
|
21
21
|
COLLAPSE_INDEX: false,
|
22
22
|
FILE_SUFFIX: '.html',
|
23
23
|
HAS_SOURCE: true
|
@@ -27,10 +27,10 @@
|
|
27
27
|
<script type="text/javascript" src="../_static/underscore.js"></script>
|
28
28
|
<script type="text/javascript" src="../_static/doctools.js"></script>
|
29
29
|
<link rel="shortcut icon" href="../_static/favicon.ico"/>
|
30
|
-
<link rel="top" title="groonga v1.2.
|
31
|
-
<link rel="up" title="4.
|
30
|
+
<link rel="top" title="groonga v1.2.9 documentation" href="../index.html" />
|
31
|
+
<link rel="up" title="4. Tutorial" href="../tutorial.html" />
|
32
32
|
<link rel="next" title="4.2. How to use groonga with network" href="network.html" />
|
33
|
-
<link rel="prev" title="4.
|
33
|
+
<link rel="prev" title="4. Tutorial" href="../tutorial.html" />
|
34
34
|
</head>
|
35
35
|
<body>
|
36
36
|
<div class="header">
|
@@ -60,10 +60,10 @@
|
|
60
60
|
<a href="network.html" title="4.2. How to use groonga with network"
|
61
61
|
accesskey="N">next</a> |</li>
|
62
62
|
<li class="right" >
|
63
|
-
<a href="../tutorial.html" title="4.
|
63
|
+
<a href="../tutorial.html" title="4. Tutorial"
|
64
64
|
accesskey="P">previous</a> |</li>
|
65
|
-
<li><a href="../index.html">groonga v1.2.
|
66
|
-
<li><a href="../tutorial.html" accesskey="U">4.
|
65
|
+
<li><a href="../index.html">groonga v1.2.9 documentation</a> »</li>
|
66
|
+
<li><a href="../tutorial.html" accesskey="U">4. Tutorial</a> »</li>
|
67
67
|
</ul>
|
68
68
|
</div>
|
69
69
|
|
@@ -72,136 +72,103 @@
|
|
72
72
|
<div class="bodywrapper">
|
73
73
|
<div class="body">
|
74
74
|
|
75
|
-
<div class="section" id="
|
76
|
-
<h1>4.1.
|
77
|
-
<p>
|
78
|
-
|
79
|
-
|
80
|
-
<
|
81
|
-
<
|
82
|
-
<p>You can create a new database in the following command.</p>
|
83
|
-
<p>Form</p>
|
75
|
+
<div class="section" id="basic-operations">
|
76
|
+
<h1>4.1. Basic operations<a class="headerlink" href="#basic-operations" title="Permalink to this headline">¶</a></h1>
|
77
|
+
<p>The groonga package provides a C library (libgroonga) and a command line tool (groonga). This tutorial explains how to use the groonga command, with which you can create/operate databases, start a server, establish a connection with a server, etc.</p>
|
78
|
+
<div class="section" id="create-a-database">
|
79
|
+
<h2>4.1.1. Create a database<a class="headerlink" href="#create-a-database" title="Permalink to this headline">¶</a></h2>
|
80
|
+
<p>You can create a new database with the following command.</p>
|
81
|
+
<p>Form:</p>
|
84
82
|
<div class="highlight-none"><div class="highlight"><pre>groonga -n DB_PATH_NAME
|
85
83
|
</pre></div>
|
86
84
|
</div>
|
87
|
-
<p>'-n' option specifies to create a database. DB_PATH_NAME specifies
|
88
|
-
<p>
|
85
|
+
<p>The '-n' option specifies to create a new database. DB_PATH_NAME specifies the path of the new database. Note that this command fails if the specified path already exists.</p>
|
86
|
+
<p>This command creates a 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.</p>
|
89
87
|
<p>Execution example:</p>
|
90
88
|
<div class="highlight-none"><div class="highlight"><pre>% groonga -n /tmp/tutorial.db
|
91
|
-
>
|
89
|
+
> Ctrl-d
|
92
90
|
%
|
93
91
|
</pre></div>
|
94
92
|
</div>
|
95
93
|
</div>
|
96
|
-
<div class="section" id="operate-database">
|
97
|
-
<h2>4.1.2. Operate database<a class="headerlink" href="#operate-database" title="Permalink to this headline">¶</a></h2>
|
98
|
-
<p>Form
|
94
|
+
<div class="section" id="operate-a-database">
|
95
|
+
<h2>4.1.2. Operate a database<a class="headerlink" href="#operate-a-database" title="Permalink to this headline">¶</a></h2>
|
96
|
+
<p>Form:</p>
|
99
97
|
<div class="highlight-none"><div class="highlight"><pre>groonga DB_PATH_NAME [COMMAND]
|
100
98
|
</pre></div>
|
101
99
|
</div>
|
102
|
-
<p>DB_PATH_NAME specifies
|
103
|
-
If COMMAND is specified,
|
104
|
-
<p>
|
105
|
-
Groonga of this mode reads a command from standard input evaluates it repeatedly.
|
106
|
-
This tutorial uses interactive-mode mainly.</p>
|
107
|
-
<p>For example, we will run the <cite>status</cite> command.
|
108
|
-
This command returns status of groonga's execution.</p>
|
100
|
+
<p>DB_PATH_NAME specifies the path of a target database.</p>
|
101
|
+
<p>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 execute them one by one. This tutorial focuses on the interactive mode.</p>
|
102
|
+
<p>Let's try to see the status of a groonga process by using a <a class="reference internal" href="../commands/status.html"><em>status</em></a> command.</p>
|
109
103
|
<p>Execution example:</p>
|
110
|
-
<div class="highlight-none"><div class="highlight"><pre
|
111
|
-
|
112
|
-
&
|
113
|
-
[[0,1317212791.26314,0.124383285],true]
|
114
|
-
> column_create --table Type --name float --type Float
|
115
|
-
[[0,1317212791.58803,0.027924039],true]
|
116
|
-
> column_create --table Type --name string --type ShortText
|
117
|
-
[[0,1317212791.81654,0.040399047],true]
|
118
|
-
> column_create --table Type --name time --type Time
|
119
|
-
[[0,1317212792.05751,0.027354067],true]
|
120
|
-
> load --table Type
|
121
|
-
> [{"_key":"sample","number":12345,"float":42.195,"string":"GROONGA","time":1234567890.12}]
|
122
|
-
[[0,1317212792.28516,0.200775839],1]
|
123
|
-
> select --table Type
|
124
|
-
[[0,1317212792.68655,0.000199477],[[[1],[["_id","UInt32"],["_key","ShortText"],["time","Time"],["string","ShortText"],["number","Int32"],["float","Float"]],[1,"sample",1234567890.12,"GROONGA",12345,42.195]]]]
|
104
|
+
<div class="highlight-none"><div class="highlight"><pre>% groonga -n /tmp/groonga-databases/introduction.db
|
105
|
+
> status
|
106
|
+
[[0,1322616280.40348,0.000158121],{"alloc_count":127,"starttime":1322616279,"uptime":1,"version":"1.2.8-9-gbf05b82","n_queries":0,"cache_hit_rate":0.0,"command_version":1,"default_command_version":1,"max_command_version":2}]
|
125
107
|
</pre></div>
|
126
108
|
</div>
|
127
|
-
<p>
|
128
|
-
The first element in a array of JSON has information of error-code, execution time, and so on.
|
129
|
-
The second element has a result of exectuted command.</p>
|
109
|
+
<p>As shown in the above example, a command basically returns a JSON array. The first element contains an error code, execution time, etc. The second element is the result of an operation.</p>
|
130
110
|
</div>
|
131
|
-
<div class="section" id="
|
132
|
-
<h2>4.1.3.
|
133
|
-
<p>
|
134
|
-
|
135
|
-
<div class="highlight-none"><div class="highlight"><pre>Form1: COMMAND ARGUMENT1 ARGUMENT2 ..
|
111
|
+
<div class="section" id="command-format">
|
112
|
+
<h2>4.1.3. Command format<a class="headerlink" href="#command-format" title="Permalink to this headline">¶</a></h2>
|
113
|
+
<p>Commands for operating a database accept arguments as follows:</p>
|
114
|
+
<div class="highlight-none"><div class="highlight"><pre>Form_1: COMMAND VALUE_1 VALUE_2 ..
|
136
115
|
|
137
|
-
|
116
|
+
Form_2: COMMAND --NAME_1 VALUE_1 --NAME_2 VALUE_2 ..
|
138
117
|
</pre></div>
|
139
118
|
</div>
|
140
|
-
<p>
|
141
|
-
<p>In
|
142
|
-
<p>
|
119
|
+
<p>In the first form, arguments must be passed in order. This kind of arguments are called positional arguments because the position of each argument determines its meaning.</p>
|
120
|
+
<p>In the second form, you can specify a parameter name with its value. So, the order of arguments is not defined. This kind of arguments are known as named parameters or keyword arguments.</p>
|
121
|
+
<p>If you want to specify a value which contains white-spaces or special characters, such as quotes and parentheses, please enclose the value with single-quotes or double-quotes.</p>
|
122
|
+
<p>For details, see also the paragraph of "command" in <a class="reference internal" href="../executables/groonga.html"><em>groonga実行ファイル</em></a>.</p>
|
143
123
|
</div>
|
144
|
-
<div class="section" id="
|
145
|
-
<h2>4.1.4.
|
124
|
+
<div class="section" id="basic-commands">
|
125
|
+
<h2>4.1.4. Basic commands<a class="headerlink" href="#basic-commands" title="Permalink to this headline">¶</a></h2>
|
146
126
|
<blockquote>
|
147
127
|
<div><dl class="docutils">
|
148
128
|
<dt><a class="reference internal" href="../commands/status.html"><em>status</em></a></dt>
|
149
|
-
<dd>
|
129
|
+
<dd>shows status of a groonga process.</dd>
|
150
130
|
<dt><a class="reference internal" href="../commands/table_list.html"><em>table_list</em></a></dt>
|
151
|
-
<dd>
|
131
|
+
<dd>shows a list of tables in a database.</dd>
|
152
132
|
<dt><a class="reference internal" href="../commands/column_list.html"><em>column_list</em></a></dt>
|
153
|
-
<dd>
|
133
|
+
<dd>shows a list of columns in a table.</dd>
|
154
134
|
<dt><a class="reference internal" href="../commands/table_create.html"><em>table_create</em></a></dt>
|
155
|
-
<dd>
|
135
|
+
<dd>adds a table to a database.</dd>
|
156
136
|
<dt><a class="reference internal" href="../commands/column_create.html"><em>column_create</em></a></dt>
|
157
|
-
<dd>
|
137
|
+
<dd>adds a column to a table.</dd>
|
158
138
|
<dt><a class="reference internal" href="../commands/select.html"><em>select</em></a></dt>
|
159
|
-
<dd>
|
139
|
+
<dd>searches records from a table and shows the result.</dd>
|
160
140
|
<dt><a class="reference internal" href="../commands/load.html"><em>load</em></a></dt>
|
161
|
-
<dd>
|
141
|
+
<dd>inserts records to a table.</dd>
|
162
142
|
</dl>
|
163
143
|
</div></blockquote>
|
164
144
|
</div>
|
165
|
-
<div class="section" id="create-table">
|
166
|
-
<h2>4.1.5. Create table<a class="headerlink" href="#create-table" title="Permalink to this headline">¶</a></h2>
|
167
|
-
<p
|
168
|
-
<p>In
|
169
|
-
|
170
|
-
<p>
|
171
|
-
Please imagine it as expressing sort of data.
|
172
|
-
How to store master key defines speed of search with master key and advisability of begins-with-match search. This is also explained in this tutorial later.</p>
|
173
|
-
<p>For example, we create 'Site' table. This table has master key of ShortText type, and the way to store its key is HASH.</p>
|
145
|
+
<div class="section" id="create-a-table">
|
146
|
+
<h2>4.1.5. Create a table<a class="headerlink" href="#create-a-table" title="Permalink to this headline">¶</a></h2>
|
147
|
+
<p>A <a class="reference internal" href="../commands/table_create.html"><em>table_create</em></a> command creates a table.</p>
|
148
|
+
<p>In most cases, a table of groonga has a primary key which must be specified with its data type and index type.</p>
|
149
|
+
<p>There are various data types such as integers, floating-point numbers, etc. The index type determines the search performance and the availability of prefix searches. We will explain the details later.</p>
|
150
|
+
<p>Let's create a 'Site' table which has a primary key of ShortText. In this example, the index type is HASH.</p>
|
174
151
|
<p>Execution example:</p>
|
175
|
-
<div class="highlight-none"><div class="highlight"><pre>>
|
176
|
-
[[0,
|
177
|
-
> load --table Site
|
178
|
-
> [{"_key":"http://example.org/","link":"http://example.net/"}]
|
179
|
-
[[0,1317212793.14984,0.200481934],1]
|
180
|
-
> select --table Site --output_columns _key,title,link._key,link.title --query title:@this
|
181
|
-
[[0,1317212793.55084,0.000485897],[[[1],[["_key","ShortText"],["title","ShortText"],["link._key","ShortText"],["link.title","ShortText"]],["http://example.org/","This is test record 1!","http://example.net/","test record 2."]]]]
|
152
|
+
<div class="highlight-none"><div class="highlight"><pre>> table_create --name Site --flags TABLE_HASH_KEY --key_type ShortText
|
153
|
+
[[0,1322616280.60791,0.01234375],true]
|
182
154
|
</pre></div>
|
183
155
|
</div>
|
184
156
|
</div>
|
185
|
-
<div class="section" id="
|
186
|
-
<h2>4.1.6.
|
187
|
-
<p
|
157
|
+
<div class="section" id="view-a-table">
|
158
|
+
<h2>4.1.6. View a table<a class="headerlink" href="#view-a-table" title="Permalink to this headline">¶</a></h2>
|
159
|
+
<p>A <a class="reference internal" href="../commands/select.html"><em>select</em></a> command shows contents of table.</p>
|
188
160
|
<p>Execution example:</p>
|
189
|
-
<div class="highlight-none"><div class="highlight"><pre>>
|
190
|
-
[[0,
|
191
|
-
> load --table Site
|
192
|
-
> [{"_key":"http://example.org/","links":["http://example.net/","http://example.org/","http://example.com/"]}]
|
193
|
-
[[0,1317212794.00274,0.200473621],1]
|
194
|
-
> select --table Site --output_columns _key,title,links._key,links.title --query title:@this
|
195
|
-
[[0,1317212794.40349,0.000384272],[[[1],[["_key","ShortText"],["title","ShortText"],["links._key","ShortText"],["links.title","ShortText"]],["http://example.org/","This is test record 1!",["http://example.net/","http://example.org/","http://example.com/"],["test record 2.","This is test record 1!","test test record three."]]]]]
|
161
|
+
<div class="highlight-none"><div class="highlight"><pre>> select --table Site
|
162
|
+
[[0,1322616280.82196,0.000451873],[[[0],[["_id","UInt32"],["_key","ShortText"]]]]]
|
196
163
|
</pre></div>
|
197
164
|
</div>
|
198
|
-
<p>
|
199
|
-
<p>
|
165
|
+
<p>When only a table is specified, the 'select' command returns the first (at most) 10 records of that table. "[0]" in the result shows the number of records in the 'Site' 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".</p>
|
166
|
+
<p>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.</p>
|
200
167
|
</div>
|
201
|
-
<div class="section" id="create-
|
202
|
-
<h2>4.1.7. Create
|
203
|
-
<p
|
204
|
-
<p>
|
168
|
+
<div class="section" id="create-a-column">
|
169
|
+
<h2>4.1.7. Create a column<a class="headerlink" href="#create-a-column" title="Permalink to this headline">¶</a></h2>
|
170
|
+
<p>A <a class="reference internal" href="../commands/column_create.html"><em>column_create</em></a> command adds a column to a table.</p>
|
171
|
+
<p>Let's add a column of ShortText to store titles. You may give a descriptive name 'title' to the column.</p>
|
205
172
|
<p>Execution example:</p>
|
206
173
|
<div class="highlight-none"><div class="highlight"><pre>> column_create --table Site --name title --flags COLUMN_SCALAR --type ShortText
|
207
174
|
[[0,1317212712.91734,0.077833747],true]
|
@@ -209,39 +176,36 @@ How to store master key defines speed of search with master key and advisability
|
|
209
176
|
[[0,1317212713.19572,0.000121119],[[[0],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]]]]]
|
210
177
|
</pre></div>
|
211
178
|
</div>
|
212
|
-
<p>COLUMN_SCALAR
|
179
|
+
<p>The COLUMN_SCALAR flag specifies to add a regular column.</p>
|
213
180
|
</div>
|
214
|
-
<div class="section" id="create-
|
215
|
-
<h2>4.1.8. Create
|
216
|
-
<p>
|
217
|
-
<p>
|
218
|
-
|
219
|
-
We create 'Terms' table, it has type of master key value is ShortText.</p>
|
181
|
+
<div class="section" id="create-a-lexicon-table-for-full-text-searches">
|
182
|
+
<h2>4.1.8. Create a lexicon table for full text searches<a class="headerlink" href="#create-a-lexicon-table-for-full-text-searches" title="Permalink to this headline">¶</a></h2>
|
183
|
+
<p>Let's go on to how to make a full text search.</p>
|
184
|
+
<p>Groonga uses an inverted index to provide fast full text search. So, the first step is to create a lexicon table which stores an inverted index, also known as postings lists. The primary key of this table is associated with a vocabulary made up of index terms and each record stores postings lists for one index term.</p>
|
185
|
+
<p>The following shows a command which creates a lexicon table named 'Terms'. The data type of its primary key is ShortText.</p>
|
220
186
|
<p>Execution example:</p>
|
221
187
|
<div class="highlight-none"><div class="highlight"><pre>> table_create --name Terms --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
|
222
188
|
[[0,1317212713.39679,0.092312046],true]
|
223
189
|
</pre></div>
|
224
190
|
</div>
|
225
|
-
<p>
|
226
|
-
|
227
|
-
There are the simple explaination, but you can skipped.</p>
|
228
|
-
<p>In this examples, 'TABLE_PAT_KEY|KEY_NORMALIZE' stores master key in patricia-trie and entries each teminology after nomalized.
|
229
|
-
The 'default_tokenizer' parametar specifies the way to tokenize target texts. In this examples, we specifies 'TokenBigram' as this parameter, and so we choose 'N-gram' generally called.</p>
|
191
|
+
<p>The table_create command takes many parameters but you don't need to understand all of them. Please skip the next paragraph if you are not interested in how it works.</p>
|
192
|
+
<p>The 'TABLE_PAT_KEY' flag specifies to store index terms in a patricia trie. The 'KEY_NORMALIZE' flag specifies to normalize index terms. In this example, both flags are validated by using a '|'. The 'default_tokenizer' parameter specifies a method for tokenizing text. This example specifies 'TokenBigram' that is generally called 'N-gram'.</p>
|
230
193
|
</div>
|
231
|
-
<div class="section" id="create-index-column-
|
232
|
-
<h2>4.1.9. Create index
|
233
|
-
<p>
|
194
|
+
<div class="section" id="create-an-index-column-for-full-text-search">
|
195
|
+
<h2>4.1.9. Create an index column for full text search<a class="headerlink" href="#create-an-index-column-for-full-text-search" title="Permalink to this headline">¶</a></h2>
|
196
|
+
<p>The second step is to create an index column, which allows you to search records from its associated column. That is to say this step specifies which column needs an index.</p>
|
197
|
+
<p>Let's create an index column for the 'title' column in the 'Site' table.</p>
|
234
198
|
<p>Execution example:</p>
|
235
199
|
<div class="highlight-none"><div class="highlight"><pre>> column_create --table Terms --name blog_title --flags COLUMN_INDEX|WITH_POSITION --type Site --source title
|
236
200
|
[[0,1317212713.68994,0.19739078],true]
|
237
201
|
</pre></div>
|
238
202
|
</div>
|
239
|
-
<p>This command creates index column 'blog_title' in '
|
240
|
-
In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifies that this column is index column for storing information of terminology existing position. This option should be specified 'COLUMN_INDEX|WITH_POSITION' in generally fulltext searching. This tutorial does not deal with the reason why store information of terminology existing position.</p>
|
203
|
+
<p>This command creates an index column 'blog_title' in the 'Terms' table. The '--type' option specifies a target table and the '--source' option specifies a target column. Then, the 'COLUMN_INDEX' flag specifies to create an index column and the 'WITH_POSITION' flag specifies to create a full inverted index, which contains the positions of each index term. This combination 'COLUMN_INDEX|WITH_POSITION' is recommended for the general purpose.</p>
|
241
204
|
</div>
|
242
205
|
<div class="section" id="load-data">
|
243
206
|
<h2>4.1.10. Load data<a class="headerlink" href="#load-data" title="Permalink to this headline">¶</a></h2>
|
244
|
-
<p
|
207
|
+
<p>A <a class="reference internal" href="../commands/load.html"><em>load</em></a> command loads JSON-formatted records into a table.</p>
|
208
|
+
<p>The following adds nine records to the 'Site' table.</p>
|
245
209
|
<p>Execution example:</p>
|
246
210
|
<div class="highlight-none"><div class="highlight"><pre>> load --table Site
|
247
211
|
> [
|
@@ -258,7 +222,7 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
258
222
|
[[0,1317212714.08816,2.203527402],9]
|
259
223
|
</pre></div>
|
260
224
|
</div>
|
261
|
-
<p>Let's make sure that
|
225
|
+
<p>Let's make sure that these records are correctly stored.</p>
|
262
226
|
<p>Execution example:</p>
|
263
227
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site
|
264
228
|
[[0,1317212716.49285,0.000270908],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."],[4,"http://example.net/afr","test record four."],[5,"http://example.org/aba","test test test record five."],[6,"http://example.com/rab","test test test test record six."],[7,"http://example.net/atv","test test test record seven."],[8,"http://example.org/gat","test test record eight."],[9,"http://example.com/vdw","test test record nine."]]]]
|
@@ -267,57 +231,53 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
267
231
|
</div>
|
268
232
|
<div class="section" id="search-data">
|
269
233
|
<h2>4.1.11. Search data<a class="headerlink" href="#search-data" title="Permalink to this headline">¶</a></h2>
|
270
|
-
<p>
|
271
|
-
<p>You can search
|
234
|
+
<p>Before a full text search, let's try to search data by '_id' and '_key'. These columns work as unique keys.</p>
|
235
|
+
<p>You can search records by using a 'select' command with a 'query' parameter.</p>
|
272
236
|
<p>Execution example:</p>
|
273
237
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --query _id:1
|
274
238
|
[[0,1317212716.69871,0.000308514],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
|
275
239
|
</pre></div>
|
276
240
|
</div>
|
277
|
-
<p>'_id:1'
|
278
|
-
<p>
|
241
|
+
<p>'_id:1' specifies to search a record whose ID is 1.</p>
|
242
|
+
<p>Next, let's search a record by a primary key.</p>
|
279
243
|
<p>Execution example:</p>
|
280
244
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --query "_key:\"http://example.org/\""
|
281
245
|
[[0,1317212716.9005,0.000478343],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
|
282
246
|
</pre></div>
|
283
247
|
</div>
|
284
|
-
<p>'_key:"<a class="reference external" href="http://example.org/">http://example.org/</a>"'
|
248
|
+
<p>'_key:"<a class="reference external" href="http://example.org/">http://example.org/</a>"' specifies to search a record whose primary key is "<a class="reference external" href="http://example.org/">http://example.org/</a>".</p>
|
285
249
|
</div>
|
286
|
-
<div class="section" id="
|
287
|
-
<h2>4.1.12.
|
288
|
-
<p>
|
250
|
+
<div class="section" id="full-text-search">
|
251
|
+
<h2>4.1.12. Full text search<a class="headerlink" href="#full-text-search" title="Permalink to this headline">¶</a></h2>
|
252
|
+
<p>It's time to make a full text search. You can make a full text search query with the same 'query' parameter.</p>
|
289
253
|
<p>Execution example:</p>
|
290
254
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --query title:@this
|
291
255
|
[[0,1317212717.10303,0.000581287],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
|
292
256
|
</pre></div>
|
293
257
|
</div>
|
294
|
-
<p>This command
|
295
|
-
<p
|
296
|
-
<p>'
|
297
|
-
<p>If this parameter is specified, it means to search in columns specified 'match_columns' when 'query' parameter doesn't specify column-name condition.[1]_</p>
|
298
|
-
<p>If you specify 'match_columns' is 'title' and 'query' is 'this', you can take same result as above query.</p>
|
258
|
+
<p>This command searches records whose 'title' column contains a string 'this'. In this case, only one record matches this query. Note that the lower case query 'this' matches a capitalized 'This' in the 1st record because 'KEY_NORMALIZE' was specified in lexicon column creation.</p>
|
259
|
+
<p>The 'select' command has an optional parameter 'match_columns'. This parameter specifies default target columns and it is used when target columns are not specified in a query.[1]_</p>
|
260
|
+
<p>A combination of '--match_columns title' and '--query this' brings you the same result that '--query title:@this' does.</p>
|
299
261
|
<p>Execution example:</p>
|
300
262
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --match_columns title --query this
|
301
263
|
[[0,1317212717.30596,0.000716439],[[[1],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"]]]]
|
302
264
|
</pre></div>
|
303
265
|
</div>
|
304
266
|
</div>
|
305
|
-
<div class="section" id="specify-output-
|
306
|
-
<h2>4.1.13. Specify output
|
307
|
-
<p>'output_columns' parameter in 'select' command specifies columns shown in result
|
308
|
-
<p>If you want to specify some columns, you should separate column names by comma(,).</p>
|
267
|
+
<div class="section" id="specify-output-columns">
|
268
|
+
<h2>4.1.13. Specify output columns<a class="headerlink" href="#specify-output-columns" title="Permalink to this headline">¶</a></h2>
|
269
|
+
<p>An 'output_columns' parameter in a 'select' command specifies columns to be shown in the search result. If you want to specify more than one columns, please separate column names by commas (,).</p>
|
309
270
|
<p>Execution example:</p>
|
310
271
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --output_columns _key,title,_score --query title:@test
|
311
272
|
[[0,1317212717.50916,0.00060758],[[[9],[["_key","ShortText"],["title","ShortText"],["_score","Int32"]],["http://example.org/","This is test record 1!",1],["http://example.net/","test record 2.",1],["http://example.com/","test test record three.",2],["http://example.net/afr","test record four.",1],["http://example.org/aba","test test test record five.",3],["http://example.com/rab","test test test test record six.",4],["http://example.net/atv","test test test record seven.",3],["http://example.org/gat","test test record eight.",2],["http://example.com/vdw","test test record nine.",2]]]]
|
312
273
|
</pre></div>
|
313
274
|
</div>
|
314
|
-
<p
|
275
|
+
<p>This command specifies three output columns including the '_score' column, which stores the relevance score of each record.</p>
|
315
276
|
</div>
|
316
|
-
<div class="section" id="
|
317
|
-
<h2>4.1.14.
|
318
|
-
<p>'select' command
|
319
|
-
<p>'offset' parameter specifies starting point of
|
320
|
-
<p>'limit' parameter specifies how many records of searching result.</p>
|
277
|
+
<div class="section" id="specify-output-ranges">
|
278
|
+
<h2>4.1.14. Specify output ranges<a class="headerlink" href="#specify-output-ranges" title="Permalink to this headline">¶</a></h2>
|
279
|
+
<p>A 'select' command returns a part of its search result if 'offset' and/or 'limit' parameters are specified. These parameters are useful to paginate a search result, a widely-used interface which shows a search result on a page by page basis.</p>
|
280
|
+
<p>An 'offset' parameter specifies the starting point and a 'limit' parameter specifies the maximum number of records to be returned. If you need the first record in a search result, the offset parameter must be 0 or omitted.</p>
|
321
281
|
<p>Execution example:</p>
|
322
282
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --offset 0 --limit 3
|
323
283
|
[[0,1317212717.71574,0.000238544],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[1,"http://example.org/","This is test record 1!"],[2,"http://example.net/","test record 2."],[3,"http://example.com/","test test record three."]]]]
|
@@ -330,20 +290,20 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
330
290
|
</div>
|
331
291
|
<div class="section" id="sort">
|
332
292
|
<h2>4.1.15. Sort<a class="headerlink" href="#sort" title="Permalink to this headline">¶</a></h2>
|
333
|
-
<p>
|
334
|
-
<p>
|
293
|
+
<p>A 'select' command sorts its result when used with a 'sortby' parameter.</p>
|
294
|
+
<p>A 'sortby' parameter specifies a column as a sorting creteria. A search result is arranged in ascending order of the column values. If you want to sort a search result in reverse order, please add a leading hyphen (-) to the column name of a parameter.</p>
|
335
295
|
<p>Execution example:</p>
|
336
296
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --sortby -_id
|
337
297
|
[[0,1317212718.32565,0.000385755],[[[9],[["_id","UInt32"],["_key","ShortText"],["title","ShortText"]],[9,"http://example.com/vdw","test test record nine."],[8,"http://example.org/gat","test test record eight."],[7,"http://example.net/atv","test test test record seven."],[6,"http://example.com/rab","test test test test record six."],[5,"http://example.org/aba","test test test record five."],[4,"http://example.net/afr","test record four."],[3,"http://example.com/","test test record three."],[2,"http://example.net/","test record 2."],[1,"http://example.org/","This is test record 1!"]]]]
|
338
298
|
</pre></div>
|
339
299
|
</div>
|
340
|
-
<p>
|
300
|
+
<p>You can use the '_score' column as a sorting criteria for ranking a search result.</p>
|
341
301
|
<p>Execution example:</p>
|
342
302
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --query title:@test --output_columns _id,_score,title --sortby _score
|
343
303
|
[[0,1317212718.5331,0.000667311],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[1,1,"This is test record 1!"],[2,1,"test record 2."],[4,1,"test record four."],[3,2,"test test record three."],[9,2,"test test record nine."],[8,2,"test test record eight."],[7,3,"test test test record seven."],[5,3,"test test test record five."],[6,4,"test test test test record six."]]]]
|
344
304
|
</pre></div>
|
345
305
|
</div>
|
346
|
-
<p>If you want to specify
|
306
|
+
<p>If you want to specify more than one columns, please separate column names by commas. In such a case, a search result is sorted in order of the column values in the first column, and then records having the same values in the first column are sorted in order of the second column values.</p>
|
347
307
|
<p>Execution example:</p>
|
348
308
|
<div class="highlight-none"><div class="highlight"><pre>> select --table Site --query title:@test --output_columns _id,_score,title --sortby _score,_id
|
349
309
|
[[0,1317212718.73819,0.00069225],[[[9],[["_id","UInt32"],["_score","Int32"],["title","ShortText"]],[1,1,"This is test record 1!"],[2,1,"test record 2."],[4,1,"test record four."],[3,2,"test test record three."],[8,2,"test test record eight."],[9,2,"test test record nine."],[5,3,"test test test record five."],[7,3,"test test test record seven."],[6,4,"test test test test record six."]]]]
|
@@ -353,7 +313,7 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
353
313
|
<table class="docutils footnote" frame="void" id="id1" rules="none">
|
354
314
|
<colgroup><col class="label" /><col /></colgroup>
|
355
315
|
<tbody valign="top">
|
356
|
-
<tr><td class="label">[1]</td><td>
|
316
|
+
<tr><td class="label">[1]</td><td>Currently, a 'match_columns' parameter is available iff there exists an inverted index for full text search. A 'match_columns' parameter for a regular column is not supported.</td></tr>
|
357
317
|
</tbody>
|
358
318
|
</table>
|
359
319
|
</div>
|
@@ -367,21 +327,21 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
367
327
|
<div class="sphinxsidebarwrapper">
|
368
328
|
<h3><a href="../index.html">Table Of Contents</a></h3>
|
369
329
|
<ul>
|
370
|
-
<li><a class="reference internal" href="#">4.1.
|
371
|
-
<li><a class="reference internal" href="#create-database">4.1.1. Create database</a></li>
|
372
|
-
<li><a class="reference internal" href="#operate-database">4.1.2. Operate database</a></li>
|
373
|
-
<li><a class="reference internal" href="#
|
374
|
-
<li><a class="reference internal" href="#
|
375
|
-
<li><a class="reference internal" href="#create-table">4.1.5. Create table</a></li>
|
376
|
-
<li><a class="reference internal" href="#
|
377
|
-
<li><a class="reference internal" href="#create-
|
378
|
-
<li><a class="reference internal" href="#create-
|
379
|
-
<li><a class="reference internal" href="#create-index-column-
|
330
|
+
<li><a class="reference internal" href="#">4.1. Basic operations</a><ul>
|
331
|
+
<li><a class="reference internal" href="#create-a-database">4.1.1. Create a database</a></li>
|
332
|
+
<li><a class="reference internal" href="#operate-a-database">4.1.2. Operate a database</a></li>
|
333
|
+
<li><a class="reference internal" href="#command-format">4.1.3. Command format</a></li>
|
334
|
+
<li><a class="reference internal" href="#basic-commands">4.1.4. Basic commands</a></li>
|
335
|
+
<li><a class="reference internal" href="#create-a-table">4.1.5. Create a table</a></li>
|
336
|
+
<li><a class="reference internal" href="#view-a-table">4.1.6. View a table</a></li>
|
337
|
+
<li><a class="reference internal" href="#create-a-column">4.1.7. Create a column</a></li>
|
338
|
+
<li><a class="reference internal" href="#create-a-lexicon-table-for-full-text-searches">4.1.8. Create a lexicon table for full text searches</a></li>
|
339
|
+
<li><a class="reference internal" href="#create-an-index-column-for-full-text-search">4.1.9. Create an index column for full text search</a></li>
|
380
340
|
<li><a class="reference internal" href="#load-data">4.1.10. Load data</a></li>
|
381
341
|
<li><a class="reference internal" href="#search-data">4.1.11. Search data</a></li>
|
382
|
-
<li><a class="reference internal" href="#
|
383
|
-
<li><a class="reference internal" href="#specify-output-
|
384
|
-
<li><a class="reference internal" href="#
|
342
|
+
<li><a class="reference internal" href="#full-text-search">4.1.12. Full text search</a></li>
|
343
|
+
<li><a class="reference internal" href="#specify-output-columns">4.1.13. Specify output columns</a></li>
|
344
|
+
<li><a class="reference internal" href="#specify-output-ranges">4.1.14. Specify output ranges</a></li>
|
385
345
|
<li><a class="reference internal" href="#sort">4.1.15. Sort</a></li>
|
386
346
|
</ul>
|
387
347
|
</li>
|
@@ -389,7 +349,7 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
389
349
|
|
390
350
|
<h4>Previous topic</h4>
|
391
351
|
<p class="topless"><a href="../tutorial.html"
|
392
|
-
title="previous chapter">4.
|
352
|
+
title="previous chapter">4. Tutorial</a></p>
|
393
353
|
<h4>Next topic</h4>
|
394
354
|
<p class="topless"><a href="network.html"
|
395
355
|
title="next chapter">4.2. How to use groonga with network</a></p>
|
@@ -401,7 +361,7 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
401
361
|
<div id="searchbox" style="display: none">
|
402
362
|
<h3>Quick search</h3>
|
403
363
|
<form class="search" action="../search.html" method="get">
|
404
|
-
<input type="text" name="q"
|
364
|
+
<input type="text" name="q" />
|
405
365
|
<input type="submit" value="Go" />
|
406
366
|
<input type="hidden" name="check_keywords" value="yes" />
|
407
367
|
<input type="hidden" name="area" value="default" />
|
@@ -425,14 +385,14 @@ In execution example, 'COLUMN_INDEX|WITH_POSITION' for '--flags' option specifie
|
|
425
385
|
<a href="network.html" title="4.2. How to use groonga with network"
|
426
386
|
>next</a> |</li>
|
427
387
|
<li class="right" >
|
428
|
-
<a href="../tutorial.html" title="4.
|
388
|
+
<a href="../tutorial.html" title="4. Tutorial"
|
429
389
|
>previous</a> |</li>
|
430
|
-
<li><a href="../index.html">groonga v1.2.
|
431
|
-
<li><a href="../tutorial.html" >4.
|
390
|
+
<li><a href="../index.html">groonga v1.2.9 documentation</a> »</li>
|
391
|
+
<li><a href="../tutorial.html" >4. Tutorial</a> »</li>
|
432
392
|
</ul>
|
433
393
|
</div>
|
434
394
|
<div class="footer">
|
435
|
-
© Copyright 2009-
|
395
|
+
© Copyright 2009-2012, Brazil, Inc.
|
436
396
|
</div>
|
437
397
|
</body>
|
438
398
|
</html>
|