rroonga 1.3.1-x86-mingw32 → 2.0.0-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -1
- data/Rakefile +2 -7
- data/ext/groonga/rb-grn-column.c +34 -37
- data/ext/groonga/rb-grn-context.c +63 -2
- data/ext/groonga/rb-grn-expression.c +21 -13
- data/ext/groonga/rb-grn-object.c +2 -0
- data/ext/groonga/rb-grn-table.c +57 -51
- data/ext/groonga/rb-grn.h +10 -4
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/lib/groonga/schema.rb +75 -46
- data/lib/groonga.rb +9 -6
- data/rroonga-build.rb +2 -2
- data/test/run-test.rb +1 -2
- data/test/test-table-select.rb +0 -5
- data/test/test-type.rb +2 -2
- data/test/test-version.rb +40 -10
- data/vendor/local/bin/grntest.exe +0 -0
- data/vendor/local/bin/groonga.exe +0 -0
- data/vendor/local/bin/libgcc_s_sjlj-1.dll +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/libstdc++-6.dll +0 -0
- data/vendor/local/bin/mecab.exe +0 -0
- data/vendor/local/include/groonga/groonga/plugin.h +113 -0
- data/vendor/local/include/groonga/groonga/tokenizer.h +146 -0
- data/vendor/local/include/groonga/groonga.h +18 -18
- data/vendor/local/include/msgpack/object.h +98 -0
- data/vendor/local/include/msgpack/object.hpp +412 -0
- data/vendor/local/include/msgpack/pack.h +143 -0
- data/vendor/local/include/msgpack/pack.hpp +318 -0
- data/vendor/local/include/msgpack/pack_define.h +26 -0
- data/vendor/local/include/msgpack/pack_template.h +766 -0
- data/vendor/local/include/msgpack/sbuffer.h +111 -0
- data/vendor/local/include/msgpack/sbuffer.hpp +112 -0
- data/vendor/local/include/msgpack/sysdep.h +195 -0
- data/vendor/local/include/msgpack/type/bool.hpp +55 -0
- data/vendor/local/include/msgpack/type/define.hpp +3279 -0
- data/vendor/local/include/msgpack/type/deque.hpp +77 -0
- data/vendor/local/include/msgpack/type/fixint.hpp +172 -0
- data/vendor/local/include/msgpack/type/float.hpp +82 -0
- data/vendor/local/include/msgpack/type/int.hpp +211 -0
- data/vendor/local/include/msgpack/type/list.hpp +77 -0
- data/vendor/local/include/msgpack/type/map.hpp +205 -0
- data/vendor/local/include/msgpack/type/nil.hpp +65 -0
- data/vendor/local/include/msgpack/type/pair.hpp +61 -0
- data/vendor/local/include/msgpack/type/raw.hpp +94 -0
- data/vendor/local/include/msgpack/type/set.hpp +122 -0
- data/vendor/local/include/msgpack/type/string.hpp +62 -0
- data/vendor/local/include/msgpack/type/tr1/unordered_map.hpp +129 -0
- data/vendor/local/include/msgpack/type/tr1/unordered_set.hpp +122 -0
- data/vendor/local/include/msgpack/type/tuple.hpp +13691 -0
- data/vendor/local/include/msgpack/type/vector.hpp +81 -0
- data/vendor/local/include/msgpack/type.hpp +16 -0
- data/vendor/local/include/msgpack/unpack.h +260 -0
- data/vendor/local/include/msgpack/unpack.hpp +374 -0
- data/vendor/local/include/msgpack/unpack_define.h +93 -0
- data/vendor/local/include/msgpack/unpack_template.h +409 -0
- data/vendor/local/include/msgpack/version.h +40 -0
- data/vendor/local/include/msgpack/vrefbuffer.h +142 -0
- data/vendor/local/include/msgpack/vrefbuffer.hpp +97 -0
- data/vendor/local/include/msgpack/zbuffer.h +207 -0
- data/vendor/local/include/msgpack/zbuffer.hpp +100 -0
- data/vendor/local/include/msgpack/zone.h +147 -0
- data/vendor/local/include/msgpack/zone.hpp +455 -0
- data/vendor/local/include/msgpack.h +30 -0
- data/vendor/local/include/msgpack.hpp +24 -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 +2 -2
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.dll.a +0 -0
- data/vendor/local/lib/groonga/plugins/tokenizers/mecab.la +2 -2
- data/vendor/local/lib/libgroonga.a +0 -0
- data/vendor/local/lib/libgroonga.dll.a +0 -0
- data/vendor/local/lib/libgroonga.la +2 -2
- data/vendor/local/lib/libmecab.a +0 -0
- data/vendor/local/lib/libmecab.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.a +0 -0
- data/vendor/local/lib/libmsgpack.dll.a +0 -0
- data/vendor/local/lib/libmsgpack.la +41 -0
- data/vendor/local/lib/libmsgpackc.a +0 -0
- data/vendor/local/lib/libmsgpackc.dll.a +0 -0
- data/vendor/local/lib/libmsgpackc.la +41 -0
- data/vendor/local/lib/pkgconfig/groonga.pc +4 -4
- 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/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/en/html/_sources/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/en/html/_sources/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/news.txt +51 -385
- data/vendor/local/share/doc/groonga/en/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/en/html/_sources/spec/search.txt +4 -4
- data/vendor/local/share/doc/groonga/en/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/suggest.html +7 -7
- data/vendor/local/share/doc/groonga/en/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/contribution/report.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/functions/rand.html +10 -10
- data/vendor/local/share/doc/groonga/en/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/index.html +14 -8
- data/vendor/local/share/doc/groonga/en/html/indexing.html +237 -0
- data/vendor/local/share/doc/groonga/en/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/log.html +20 -20
- data/vendor/local/share/doc/groonga/en/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news/1.2.x.html +566 -0
- data/vendor/local/share/doc/groonga/en/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/news.html +65 -464
- data/vendor/local/share/doc/groonga/en/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/en/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/reference.html +14 -8
- 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/spec/search.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/spec.html +9 -9
- data/vendor/local/share/doc/groonga/en/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/en/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/.buildinfo +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/ja/html/_sources/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/ja/html/_sources/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/news.txt +51 -385
- data/vendor/local/share/doc/groonga/ja/html/_sources/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/ja/html/_sources/spec/search.txt +4 -4
- data/vendor/local/share/doc/groonga/ja/html/characteristic.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/command_version.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/cache_limit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/check.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/clearlock.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/column_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/define_selector.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/defrag.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/delete.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/dump.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/load.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_level.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_put.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/log_reopen.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/quit.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/select.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/shutdown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/status.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_create.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_list.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/table_remove.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands/view_add.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/commands.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/community.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/com.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/document.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/query.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development/test.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/development.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/c-api.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation/i18n.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/documentation.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/contribution/report.html +6 -6
- data/vendor/local/share/doc/groonga/ja/html/contribution.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grnslap.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/grntest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-http.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga-suggest-create-dataset.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables/groonga.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/executables.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/expr.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/edit_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_distance.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_circle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/geo_in_rectangle.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/now.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/functions/rand.html +10 -10
- data/vendor/local/share/doc/groonga/ja/html/functions.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/genindex.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/geolocation_search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/index.html +14 -8
- data/vendor/local/share/doc/groonga/ja/html/indexing.html +215 -0
- data/vendor/local/share/doc/groonga/ja/html/install.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/limitations.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/log.html +20 -20
- data/vendor/local/share/doc/groonga/ja/html/news/0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.0.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.1.x.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news/1.2.x.html +528 -0
- data/vendor/local/share/doc/groonga/ja/html/news/senna.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/news.html +62 -425
- data/vendor/local/share/doc/groonga/ja/html/objects.inv +0 -0
- data/vendor/local/share/doc/groonga/ja/html/output.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/pseudo_column.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/reference.html +14 -8
- 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/spec/search.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/spec.html +9 -9
- data/vendor/local/share/doc/groonga/ja/html/suggest/completion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/correction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/suggestion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/suggest.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting/different_results_with_the_same_keyword.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/troubleshooting.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/data.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/drilldown.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/index.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/introduction.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/lexicon.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/match_columns.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/micro_blog.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/network.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/patricia_trie.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/query_expansion.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial/search.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/tutorial.html +5 -5
- data/vendor/local/share/doc/groonga/ja/html/type.html +5 -5
- data/vendor/local/share/doc/groonga/source/commands/suggest.txt +1 -1
- data/vendor/local/share/doc/groonga/source/contribution/report.txt +6 -7
- data/vendor/local/share/doc/groonga/source/indexing.txt +108 -0
- data/vendor/local/share/doc/groonga/source/news/1.2.x.txt +386 -0
- data/vendor/local/share/doc/groonga/source/news.txt +51 -385
- data/vendor/local/share/doc/groonga/source/reference.txt +1 -0
- data/vendor/local/share/doc/groonga/source/spec/search.txt +4 -4
- data/vendor/local/share/license/groonga/COPYING +10 -12
- data/vendor/local/share/license/msgpack/AUTHORS +1 -0
- data/vendor/local/share/license/msgpack/COPYING +14 -0
- data/vendor/local/share/license/msgpack/LICENSE +202 -0
- data/vendor/local/share/man/ja/man1/groonga.1 +113 -5
- data/vendor/local/share/man/man1/groonga.1 +142 -11
- metadata +66 -3
- data/vendor/local/share/doc/groonga/source/update_execution_example.py +0 -141
data/lib/groonga/schema.rb
CHANGED
@@ -151,11 +151,13 @@ module Groonga
|
|
151
151
|
# スキーマを定義する。ブロックにはGroonga::Schemaオブ
|
152
152
|
# ジェクトがわたるので、そのオブジェクトを利用してスキー
|
153
153
|
# マを定義する。以下の省略形。
|
154
|
+
#
|
154
155
|
# <pre>
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
156
|
+
# schema = Groonga::Scheme.new(options)
|
157
|
+
# # ...
|
158
|
+
# schema.define
|
158
159
|
# </pre>
|
160
|
+
#
|
159
161
|
# @param [::Hash] options The name and value
|
160
162
|
# pairs. Omitted names are initialized as the default value.
|
161
163
|
# @option options [Groonga::Context] :content (Groonga::Context.default) The context
|
@@ -170,7 +172,7 @@ module Groonga
|
|
170
172
|
# @example 名前が _name_ のテーブルを作成する。以下の省略形。
|
171
173
|
# Groonga::Schema.define do |schema|
|
172
174
|
# schema.create_table(name, options) do |table|
|
173
|
-
# ...
|
175
|
+
# # ...
|
174
176
|
# end
|
175
177
|
# end
|
176
178
|
# ブロックにはGroonga::Schema::TableDefinitionオブジェ
|
@@ -328,12 +330,13 @@ module Groonga
|
|
328
330
|
end
|
329
331
|
|
330
332
|
# 名前が _name_ のテーブルを変更する。以下の省略形。
|
333
|
+
#
|
331
334
|
# <pre>
|
332
|
-
#
|
333
|
-
#
|
334
|
-
#
|
335
|
-
# end
|
335
|
+
# Groonga::Schema.define do |schema|
|
336
|
+
# schema.change_table(name, options) do |table|
|
337
|
+
# # ...
|
336
338
|
# end
|
339
|
+
# end
|
337
340
|
# </pre>
|
338
341
|
#
|
339
342
|
# ブロックにはGroonga::Schema::TableDefinitionオブジェ
|
@@ -353,12 +356,12 @@ module Groonga
|
|
353
356
|
|
354
357
|
# (See Groonga::Schema#rename_table)
|
355
358
|
#
|
356
|
-
# This is a syntax sugar the following code:
|
359
|
+
# This is a syntax sugar of the following code:
|
357
360
|
#
|
358
361
|
# <pre>
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
+
# Groonga::Schema.define do |schema|
|
363
|
+
# schema.rename_table(current_name, new_name, options)
|
364
|
+
# end
|
362
365
|
# </pre>
|
363
366
|
def rename_table(current_name, new_name, options={})
|
364
367
|
define do |schema|
|
@@ -367,12 +370,13 @@ module Groonga
|
|
367
370
|
end
|
368
371
|
|
369
372
|
# 名前が_name_のビューを作成する。以下の省略形。
|
373
|
+
#
|
370
374
|
# <pre>
|
371
|
-
#
|
372
|
-
#
|
373
|
-
#
|
374
|
-
# end
|
375
|
+
# Groonga::Schema.define do |schema|
|
376
|
+
# schema.create_view(name, options) do |view|
|
377
|
+
# # ...
|
375
378
|
# end
|
379
|
+
# end
|
376
380
|
# </pre>
|
377
381
|
# ブロックにはGroonga::Schema::ViewDefinitionオブジェ
|
378
382
|
# クトがわたるので、そのオブジェクトを利用してビュー
|
@@ -415,12 +419,13 @@ module Groonga
|
|
415
419
|
end
|
416
420
|
|
417
421
|
# 名前が_name_のビューを変更する。以下の省略形。
|
422
|
+
#
|
418
423
|
# <pre>
|
419
|
-
#
|
420
|
-
#
|
421
|
-
#
|
422
|
-
# end
|
424
|
+
# Groonga::Schema.define do |schema|
|
425
|
+
# schema.change_view(name, options) do |view|
|
426
|
+
# # ...
|
423
427
|
# end
|
428
|
+
# end
|
424
429
|
# </pre>
|
425
430
|
#
|
426
431
|
# ブロックにはGroonga::Schema::ViewDefinitionオブジェ
|
@@ -440,9 +445,11 @@ module Groonga
|
|
440
445
|
|
441
446
|
# 以下と同様:
|
442
447
|
#
|
443
|
-
#
|
444
|
-
#
|
445
|
-
#
|
448
|
+
# <pre>
|
449
|
+
# Groonga::Schema.change_table(table_name) do |table|
|
450
|
+
# table.remove_column(column_name)
|
451
|
+
# end
|
452
|
+
# </pre>
|
446
453
|
def remove_column(table_name, column_name)
|
447
454
|
change_table(table_name) do |table|
|
448
455
|
table.remove_column(column_name)
|
@@ -451,10 +458,12 @@ module Groonga
|
|
451
458
|
|
452
459
|
# This is a syntax sugar of the following:
|
453
460
|
#
|
454
|
-
#
|
455
|
-
#
|
456
|
-
#
|
457
|
-
#
|
461
|
+
# <pre>
|
462
|
+
# Groonga::Schema.define do |schema|
|
463
|
+
# schema.rename_column(table_name,
|
464
|
+
# current_column_name, new_column_name)
|
465
|
+
# end
|
466
|
+
# </pre>
|
458
467
|
def rename_column(table_name, current_column_name, new_column_name)
|
459
468
|
define do |schema|
|
460
469
|
schema.rename_column(table_name, current_column_name, new_column_name)
|
@@ -466,25 +475,39 @@ module Groonga
|
|
466
475
|
# Rubyスクリプト形式で返された値は
|
467
476
|
# Groonga::Schema.restoreすることによりスキーマ内に組み
|
468
477
|
# 込むことができる。
|
478
|
+
#
|
479
|
+
# dump.rb:
|
480
|
+
#
|
469
481
|
# <pre>
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
# end
|
474
|
-
# restore.rb:
|
475
|
-
# dumped_text = Groonga::Schema.dump
|
476
|
-
# Groonga::Database.create(:path => "/tmp/new-db.grn")
|
477
|
-
# Groonga::Schema.restore(dumped_text)==
|
482
|
+
# File.open("/tmp/groonga-schema.rb", "w") do |schema|
|
483
|
+
# dumped_text = Groonga::Schema.dump
|
484
|
+
# end
|
478
485
|
# </pre>
|
486
|
+
#
|
487
|
+
# restore.rb:
|
488
|
+
#
|
489
|
+
# <pre>
|
490
|
+
# dumped_text = Groonga::Schema.dump
|
491
|
+
# Groonga::Database.create(:path => "/tmp/new-db.grn")
|
492
|
+
# Groonga::Schema.restore(dumped_text)
|
493
|
+
# </pre>
|
494
|
+
#
|
479
495
|
# grn式形式で返された値はgroongaコマンドで読み込むこと
|
480
496
|
# ができる。
|
497
|
+
#
|
498
|
+
# dump.rb:
|
499
|
+
#
|
481
500
|
# <pre>
|
482
|
-
#
|
483
|
-
#
|
484
|
-
#
|
485
|
-
# end
|
486
|
-
# % groonga db/path < /tmp/groonga-schema.grn==
|
501
|
+
# File.open("/tmp/groonga-schema.grn", "w") do |schema|
|
502
|
+
# dumped_text = Groonga::Schema.dump(:syntax => :command)
|
503
|
+
# end
|
487
504
|
# </pre>
|
505
|
+
#
|
506
|
+
# <pre>
|
507
|
+
# !!!text
|
508
|
+
# % groonga db/path < /tmp/groonga-schema.grn
|
509
|
+
# </pre>
|
510
|
+
#
|
488
511
|
# @param options [::Hash] The name and value
|
489
512
|
# pairs. Omitted names are initialized as the default value.
|
490
513
|
# @option options :context (Groonga::Context.default) The context
|
@@ -914,9 +937,12 @@ module Groonga
|
|
914
937
|
end
|
915
938
|
|
916
939
|
# 以下と同様:
|
917
|
-
#
|
918
|
-
#
|
919
|
-
#
|
940
|
+
#
|
941
|
+
# <pre>
|
942
|
+
# schema.change_table(table_name) do |table|
|
943
|
+
# table.remove_column(column_name)
|
944
|
+
# end
|
945
|
+
# </pre>
|
920
946
|
def remove_column(table_name, column_name)
|
921
947
|
change_table(table_name) do |table|
|
922
948
|
table.remove_column(column_name)
|
@@ -924,9 +950,12 @@ module Groonga
|
|
924
950
|
end
|
925
951
|
|
926
952
|
# It is a syntax sugar of the following:
|
927
|
-
#
|
928
|
-
#
|
929
|
-
#
|
953
|
+
#
|
954
|
+
# <pre>
|
955
|
+
# schema.change_table(table_name) do |table|
|
956
|
+
# table.rename_column(current_column_name, new_column_name)
|
957
|
+
# end
|
958
|
+
# </pre>
|
930
959
|
def rename_column(table_name, current_column_name, new_column_name)
|
931
960
|
change_table(table_name) do |table|
|
932
961
|
table.rename_column(current_column_name, new_column_name)
|
data/lib/groonga.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
#
|
3
|
-
# Copyright (C) 2009-
|
3
|
+
# Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -58,12 +58,15 @@ module Groonga
|
|
58
58
|
BUILD_VERSION.join(".")
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
61
|
+
# Format version.
|
62
|
+
#
|
63
|
+
# @return [String] If Groonga::VERSION has tag,
|
64
|
+
# @MAJOR.MINOR.MICRO-TAG@. Otherwise, @MAJOR.MINOR.MICRO@.
|
65
65
|
def version
|
66
|
-
VERSION
|
66
|
+
major, minor, micro, tag = VERSION
|
67
|
+
version_string = [major, minor, micro].join(".")
|
68
|
+
version_string << "-#{tag}" if tag
|
69
|
+
version_string
|
67
70
|
end
|
68
71
|
|
69
72
|
##
|
data/rroonga-build.rb
CHANGED
data/test/run-test.rb
CHANGED
data/test/test-table-select.rb
CHANGED
@@ -58,11 +58,6 @@ class TableSelectTest < Test::Unit::TestCase
|
|
58
58
|
@result = nil
|
59
59
|
end
|
60
60
|
|
61
|
-
teardown
|
62
|
-
def teardown_expression_close
|
63
|
-
@result.expression.close if @result # TODO: We want to remove it.
|
64
|
-
end
|
65
|
-
|
66
61
|
def test_sub_expression
|
67
62
|
@result = @comments.select do |record|
|
68
63
|
record.match("Hello", "content") &
|
data/test/test-type.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -28,7 +28,7 @@ class TypeTest < Test::Unit::TestCase
|
|
28
28
|
Groonga::Type.new("user id", :type => :integer)
|
29
29
|
end
|
30
30
|
message =
|
31
|
-
"name can't start with '_' and contains only 0-9, A-Z, a-z, #, - or _"
|
31
|
+
"name can't start with '_' and contains only 0-9, A-Z, a-z, #, @, - or _"
|
32
32
|
assert_match(/#{Regexp.escape(message)}/,
|
33
33
|
exception.message)
|
34
34
|
end
|
data/test/test-version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
|
1
|
+
# Copyright (C) 2009-2012 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -14,18 +14,48 @@
|
|
14
14
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
15
15
|
|
16
16
|
class VersionTest < Test::Unit::TestCase
|
17
|
-
def
|
18
|
-
|
19
|
-
assert_match(Groonga.build_version, Groonga::BUILD_VERSION.join("."))
|
17
|
+
def test_build_version_format
|
18
|
+
assert_equal("X.X.X", normalize(Groonga.build_version))
|
20
19
|
end
|
21
20
|
|
22
|
-
def
|
23
|
-
|
24
|
-
assert_match(Groonga.version, Groonga::VERSION.join("."))
|
21
|
+
def test_build_version_value
|
22
|
+
assert_equal(Groonga.build_version, Groonga::BUILD_VERSION.join("."))
|
25
23
|
end
|
26
24
|
|
27
|
-
def
|
28
|
-
|
29
|
-
|
25
|
+
def test_version_format
|
26
|
+
if /-/ =~ Groonga.version
|
27
|
+
assert_equal("X.X.X-XXX", normalize(Groonga.version))
|
28
|
+
else
|
29
|
+
assert_equal("X.X.X", normalize(Groonga.version))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_version_value
|
34
|
+
major, minor, micro, tag = Groonga::VERSION
|
35
|
+
versions = [major, minor, micro]
|
36
|
+
assert_equal(Groonga.version, [versions.join("."), tag].compact.join("-"))
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_bindings_version_format
|
40
|
+
assert_equal("X.X.X", normalize(Groonga.bindings_version))
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_bindings_version_value
|
44
|
+
assert_equal(Groonga.bindings_version, Groonga::BINDINGS_VERSION.join("."))
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
def normalize(version)
|
49
|
+
versions_component, tag_component = version.split(/-/, 2)
|
50
|
+
versions = versions_component.split(/\./)
|
51
|
+
normalized_versions = versions.collect do |component|
|
52
|
+
component.gsub(/\d+/, "X")
|
53
|
+
end
|
54
|
+
if tag_component
|
55
|
+
normalized_tag = "XXX"
|
56
|
+
else
|
57
|
+
normalized_tag = nil
|
58
|
+
end
|
59
|
+
[normalized_versions.join("."), normalized_tag].compact.join("-")
|
30
60
|
end
|
31
61
|
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/vendor/local/bin/mecab.exe
CHANGED
Binary file
|
@@ -18,6 +18,8 @@
|
|
18
18
|
#ifndef GRN_PLUGIN_H
|
19
19
|
#define GRN_PLUGIN_H
|
20
20
|
|
21
|
+
#include <stddef.h>
|
22
|
+
|
21
23
|
#include <groonga.h>
|
22
24
|
|
23
25
|
#ifdef __cplusplus
|
@@ -38,6 +40,117 @@ GRN_PLUGIN_EXPORT grn_rc GRN_PLUGIN_INIT(grn_ctx *ctx);
|
|
38
40
|
GRN_PLUGIN_EXPORT grn_rc GRN_PLUGIN_REGISTER(grn_ctx *ctx);
|
39
41
|
GRN_PLUGIN_EXPORT grn_rc GRN_PLUGIN_FIN(grn_ctx *ctx);
|
40
42
|
|
43
|
+
/*
|
44
|
+
Don't call these functions directly. Use GRN_PLUGIN_MALLOC(),
|
45
|
+
GRN_PLUGIN_REALLOC() and GRN_PLUGIN_FREE() instead.
|
46
|
+
*/
|
47
|
+
void *grn_plugin_malloc(grn_ctx *ctx, size_t size, const char *file,
|
48
|
+
int line, const char *func);
|
49
|
+
void *grn_plugin_realloc(grn_ctx *ctx, void *ptr, size_t size,
|
50
|
+
const char *file, int line, const char *func);
|
51
|
+
void grn_plugin_free(grn_ctx *ctx, void *ptr, const char *file,
|
52
|
+
int line, const char *func);
|
53
|
+
|
54
|
+
/*
|
55
|
+
GRN_PLUGIN_MALLOC() allocates `size' bytes and returns a pointer to the
|
56
|
+
allocated memory space. Note that the memory space is associated with `ctx'.
|
57
|
+
*/
|
58
|
+
#define GRN_PLUGIN_MALLOC(ctx, size) \
|
59
|
+
grn_plugin_malloc((ctx), (size), __FILE__, __LINE__, __FUNCTION__)
|
60
|
+
/*
|
61
|
+
GRN_PLUGIN_REALLOC() resizes the memory space pointed to by `ptr' or
|
62
|
+
allocates a new memory space of `size' bytes. GRN_PLUGIN_REALLOC() returns
|
63
|
+
a pointer to the memory space. The contents is unchanged or copied from the
|
64
|
+
old memory space to the new memory space.
|
65
|
+
*/
|
66
|
+
#define GRN_PLUGIN_REALLOC(ctx, ptr, size) \
|
67
|
+
grn_plugin_realloc((ctx), (ptr), (size), __FILE__, __LINE__, __FUNCTION__)
|
68
|
+
/*
|
69
|
+
GRN_PLUGIN_FREE() frees a memory space allocated by GRN_PLUGIN_MALLOC() or
|
70
|
+
GRN_PLUGIN_REALLOC(). This means that `ptr' must be a pointer returned by
|
71
|
+
GRN_PLUGIN_MALLOC() or GRN_PLUGIN_REALLOC().
|
72
|
+
*/
|
73
|
+
#define GRN_PLUGIN_FREE(ctx, ptr) \
|
74
|
+
grn_plugin_free((ctx), (ptr), __FILE__, __LINE__, __FUNCTION__)
|
75
|
+
|
76
|
+
/*
|
77
|
+
GRN_PLUGIN_LOG() reports a log of `level'. Its error message is generated
|
78
|
+
from the varying number of arguments, in which the first one is the format
|
79
|
+
string and the rest are its arguments. See grn_log_level in "groonga.h" for
|
80
|
+
more details of `level'.
|
81
|
+
*/
|
82
|
+
#define GRN_PLUGIN_LOG(ctx, level, ...) \
|
83
|
+
GRN_LOG((ctx), (level), __VA_ARGS__)
|
84
|
+
|
85
|
+
/*
|
86
|
+
Don't call grn_plugin_set_error() directly. This function is used in
|
87
|
+
GRN_PLUGIN_SET_ERROR().
|
88
|
+
*/
|
89
|
+
void grn_plugin_set_error(grn_ctx *ctx, grn_log_level level,
|
90
|
+
grn_rc error_code,
|
91
|
+
const char *file, int line, const char *func,
|
92
|
+
const char *format, ...);
|
93
|
+
|
94
|
+
/*
|
95
|
+
Don't call these functions directly. grn_plugin_backtrace() and
|
96
|
+
grn_plugin_logtrace() are used in GRN_PLUGIN_SET_ERROR().
|
97
|
+
*/
|
98
|
+
void grn_plugin_backtrace(grn_ctx *ctx);
|
99
|
+
void grn_plugin_logtrace(grn_ctx *ctx, grn_log_level level);
|
100
|
+
|
101
|
+
/*
|
102
|
+
Don't use GRN_PLUGIN_SET_ERROR() directly. This macro is used in
|
103
|
+
GRN_PLUGIN_ERROR().
|
104
|
+
*/
|
105
|
+
#define GRN_PLUGIN_SET_ERROR(ctx, level, error_code, ...) do { \
|
106
|
+
grn_plugin_set_error(ctx, level, error_code, \
|
107
|
+
__FILE__, __LINE__, __FUNCTION__, __VA_ARGS__); \
|
108
|
+
GRN_LOG(ctx, level, __VA_ARGS__); \
|
109
|
+
grn_plugin_backtrace(ctx); \
|
110
|
+
grn_plugin_logtrace(ctx, level); \
|
111
|
+
} while (0)
|
112
|
+
|
113
|
+
/*
|
114
|
+
GRN_PLUGIN_ERROR() reports an error of `error_code'. Its error message is
|
115
|
+
generated from the varying number of arguments, in which the first one is the
|
116
|
+
format string and the rest are its arguments. See grn_rc in "groonga.h" for
|
117
|
+
more details of `error_code'.
|
118
|
+
*/
|
119
|
+
#define GRN_PLUGIN_ERROR(ctx, error_code, ...) \
|
120
|
+
GRN_PLUGIN_SET_ERROR(ctx, GRN_LOG_ERROR, error_code, __VA_ARGS__)
|
121
|
+
|
122
|
+
/*
|
123
|
+
grn_plugin_mutex is available to make a critical section. See the
|
124
|
+
following functions.
|
125
|
+
*/
|
126
|
+
typedef struct _grn_plugin_mutex grn_plugin_mutex;
|
127
|
+
|
128
|
+
/*
|
129
|
+
grn_plugin_mutex_create() returns a pointer to a new object of
|
130
|
+
grn_plugin_mutex. Memory for the new object is obtained with
|
131
|
+
GRN_PLUGIN_MALLOC(). grn_plugin_mutex_create() returns NULL if sufficient
|
132
|
+
memory is not available.
|
133
|
+
*/
|
134
|
+
grn_plugin_mutex *grn_plugin_mutex_create(grn_ctx *ctx);
|
135
|
+
|
136
|
+
/*
|
137
|
+
grn_plugin_mutex_destroy() finalizes an object of grn_plugin_mutex and then
|
138
|
+
frees memory allocated for that object.
|
139
|
+
*/
|
140
|
+
void grn_plugin_mutex_destroy(grn_ctx *ctx, grn_plugin_mutex *mutex);
|
141
|
+
|
142
|
+
/*
|
143
|
+
grn_plugin_mutex_lock() locks a mutex object. If the object is already
|
144
|
+
locked, the calling thread waits until the object will be unlocked.
|
145
|
+
*/
|
146
|
+
void grn_plugin_mutex_lock(grn_ctx *ctx, grn_plugin_mutex *mutex);
|
147
|
+
|
148
|
+
/*
|
149
|
+
grn_plugin_mutex_unlock() unlocks a mutex object. grn_plugin_mutex_unlock()
|
150
|
+
should not be called for an unlocked object.
|
151
|
+
*/
|
152
|
+
void grn_plugin_mutex_unlock(grn_ctx *ctx, grn_plugin_mutex *mutex);
|
153
|
+
|
41
154
|
#ifdef __cplusplus
|
42
155
|
}
|
43
156
|
#endif
|
@@ -0,0 +1,146 @@
|
|
1
|
+
/* -*- c-basic-offset: 2 -*- */
|
2
|
+
/*
|
3
|
+
Copyright(C) 2012 Brazil
|
4
|
+
|
5
|
+
This library is free software; you can redistribute it and/or
|
6
|
+
modify it under the terms of the GNU Lesser General Public
|
7
|
+
License version 2.1 as published by the Free Software Foundation.
|
8
|
+
|
9
|
+
This library is distributed in the hope that it will be useful,
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12
|
+
Lesser General Public License for more details.
|
13
|
+
|
14
|
+
You should have received a copy of the GNU Lesser General Public
|
15
|
+
License along with this library; if not, write to the Free Software
|
16
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
17
|
+
*/
|
18
|
+
#ifndef GRN_PLUGIN_TOKENIZER_H
|
19
|
+
#define GRN_PLUGIN_TOKENIZER_H
|
20
|
+
|
21
|
+
#include <stddef.h>
|
22
|
+
|
23
|
+
#include <groonga/plugin.h>
|
24
|
+
|
25
|
+
#ifdef __cplusplus
|
26
|
+
extern "C" {
|
27
|
+
#endif /* __cplusplus */
|
28
|
+
|
29
|
+
/*
|
30
|
+
grn_tokenizer_charlen() returns the length (#bytes) of the first character
|
31
|
+
in the string specified by `str_ptr' and `str_length'. If the starting bytes
|
32
|
+
are invalid as a character, grn_tokenizer_charlen() returns 0. See
|
33
|
+
grn_encoding in "groonga.h" for more details of `encoding'
|
34
|
+
*/
|
35
|
+
int grn_tokenizer_charlen(grn_ctx *ctx, const char *str_ptr,
|
36
|
+
unsigned int str_length, grn_encoding encoding);
|
37
|
+
|
38
|
+
/*
|
39
|
+
grn_tokenizer_isspace() returns the length (#bytes) of the first character
|
40
|
+
in the string specified by `str_ptr' and `str_length' if it is a space
|
41
|
+
character. Otherwise, grn_tokenizer_isspace() returns 0.
|
42
|
+
*/
|
43
|
+
int grn_tokenizer_isspace(grn_ctx *ctx, const char *str_ptr,
|
44
|
+
unsigned int str_length, grn_encoding encoding);
|
45
|
+
|
46
|
+
/*
|
47
|
+
grn_tokenizer_query is a structure for storing a query. See the following
|
48
|
+
functions.
|
49
|
+
*/
|
50
|
+
typedef struct _grn_tokenizer_query grn_tokenizer_query;
|
51
|
+
|
52
|
+
struct _grn_tokenizer_query {
|
53
|
+
grn_obj *normalized_query;
|
54
|
+
char *query_buf;
|
55
|
+
const char *ptr;
|
56
|
+
unsigned int length;
|
57
|
+
grn_encoding encoding;
|
58
|
+
};
|
59
|
+
|
60
|
+
/*
|
61
|
+
grn_tokenizer_query_create() parses `args' and returns a new object of
|
62
|
+
grn_tokenizer_query. The new object stores information of the query.
|
63
|
+
grn_tokenizer_query_create() normalizes the query if the target table
|
64
|
+
requires normalization. grn_tokenizer_query_create() returns NULL if
|
65
|
+
something goes wrong. Note that grn_tokenizer_query_create() must be called
|
66
|
+
just once in the function that initializes a tokenizer.
|
67
|
+
*/
|
68
|
+
grn_tokenizer_query *grn_tokenizer_query_create(grn_ctx *ctx,
|
69
|
+
int num_args, grn_obj **args);
|
70
|
+
|
71
|
+
/*
|
72
|
+
grn_tokenizer_mutex_destroy() finalizes an object of grn_tokenizer_mutex
|
73
|
+
and then frees memory allocated for that object.
|
74
|
+
*/
|
75
|
+
void grn_tokenizer_query_destroy(grn_ctx *ctx, grn_tokenizer_query *query);
|
76
|
+
|
77
|
+
/*
|
78
|
+
grn_tokenizer_token is needed to return tokens. A grn_tokenizer_token object
|
79
|
+
stores a token to be returned and it must be maintained until a request for
|
80
|
+
next token or finalization comes.
|
81
|
+
*/
|
82
|
+
typedef struct _grn_tokenizer_token grn_tokenizer_token;
|
83
|
+
|
84
|
+
struct _grn_tokenizer_token {
|
85
|
+
grn_obj str;
|
86
|
+
grn_obj status;
|
87
|
+
};
|
88
|
+
|
89
|
+
/*
|
90
|
+
grn_tokenizer_token_init() initializes `token'. Note that an initialized
|
91
|
+
object must be finalized by grn_tokenizer_token_fin().
|
92
|
+
*/
|
93
|
+
void grn_tokenizer_token_init(grn_ctx *ctx, grn_tokenizer_token *token);
|
94
|
+
|
95
|
+
/*
|
96
|
+
grn_tokenizer_token_fin() finalizes `token' that has been initialized by
|
97
|
+
grn_tokenizer_token_init().
|
98
|
+
*/
|
99
|
+
void grn_tokenizer_token_fin(grn_ctx *ctx, grn_tokenizer_token *token);
|
100
|
+
|
101
|
+
/*
|
102
|
+
grn_tokenizer_status provides a list of tokenizer status codes.
|
103
|
+
GRN_TOKENIZER_CONTINUE means that the next token is not the last one and
|
104
|
+
GRN_TOKENIZER_LAST means that the next token is the last one. If a document
|
105
|
+
or query contains no tokens, please push an empty string with
|
106
|
+
GRN_TOKENIZER_LAST as a token.
|
107
|
+
*/
|
108
|
+
typedef enum {
|
109
|
+
GRN_TOKENIZER_CONTINUE = 0,
|
110
|
+
GRN_TOKENIZER_LAST = 1
|
111
|
+
} grn_tokenizer_status;
|
112
|
+
|
113
|
+
/*
|
114
|
+
grn_tokenizer_token_push() pushes the next token in `*token'. Note that
|
115
|
+
grn_tokenizer_token_push() does not make a copy of the given string. This
|
116
|
+
means that you have to maintain a memory space allocated to the string.
|
117
|
+
Also note that the grn_tokenizer_token object must be maintained until the
|
118
|
+
request for the next token or finalization comes. See grn_tokenizer_status in
|
119
|
+
this header for more details of `status'.
|
120
|
+
*/
|
121
|
+
void grn_tokenizer_token_push(grn_ctx *ctx, grn_tokenizer_token *token,
|
122
|
+
const char *str_ptr, unsigned int str_length,
|
123
|
+
grn_tokenizer_status status);
|
124
|
+
|
125
|
+
/*
|
126
|
+
grn_tokenizer_register() registers a plugin to the database which is
|
127
|
+
associated with `ctx'. `plugin_name_ptr' and `plugin_name_length' specify the
|
128
|
+
plugin name. Alphabetic letters ('A'-'Z' and 'a'-'z'), digits ('0'-'9') and
|
129
|
+
an underscore ('_') are capable characters. `init', `next' and `fin' specify
|
130
|
+
the plugin functions. `init' is called for initializing a tokenizer for a
|
131
|
+
document or query. `next' is called for extracting tokens one by one. `fin'
|
132
|
+
is called for finalizing a tokenizer. grn_tokenizer_register() returns
|
133
|
+
GRN_SUCCESS on success, an error code on failure. See "groonga.h" for more
|
134
|
+
details of grn_proc_func and grn_user_data, that is used as an argument of
|
135
|
+
grn_proc_func.
|
136
|
+
*/
|
137
|
+
grn_rc grn_tokenizer_register(grn_ctx *ctx, const char *plugin_name_ptr,
|
138
|
+
unsigned int plugin_name_length,
|
139
|
+
grn_proc_func *init, grn_proc_func *next,
|
140
|
+
grn_proc_func *fin);
|
141
|
+
|
142
|
+
#ifdef __cplusplus
|
143
|
+
} /* extern "C" */
|
144
|
+
#endif /* __cplusplus */
|
145
|
+
|
146
|
+
#endif /* GRN_PLUGIN_TOKENIZER_H */
|