droonga-engine 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.dir-locals.el +3 -0
- data/.gitignore +6 -0
- data/.travis.yml +15 -0
- data/.yardopts +7 -0
- data/Gemfile +66 -0
- data/LICENSE.txt +14 -0
- data/README.md +17 -0
- data/Rakefile +64 -0
- data/benchmark/benchmark.rb +123 -0
- data/benchmark/utils.rb +246 -0
- data/benchmark/watch/benchmark-notify.rb +143 -0
- data/benchmark/watch/benchmark-notify.sh +20 -0
- data/benchmark/watch/benchmark-publish.rb +120 -0
- data/benchmark/watch/benchmark-scan.rb +213 -0
- data/bin/droonga-catalog-generate +103 -0
- data/bin/droonga-engine +20 -0
- data/bin/droonga-engine-service +20 -0
- data/doc/text/news.md +106 -0
- data/droonga-engine.gemspec +52 -0
- data/lib/droonga/adapter.rb +48 -0
- data/lib/droonga/adapter_runner.rb +104 -0
- data/lib/droonga/catalog/base.rb +41 -0
- data/lib/droonga/catalog/collection_volume.rb +106 -0
- data/lib/droonga/catalog/dataset.rb +69 -0
- data/lib/droonga/catalog/errors.rb +113 -0
- data/lib/droonga/catalog/schema.rb +186 -0
- data/lib/droonga/catalog/single_volume.rb +28 -0
- data/lib/droonga/catalog/slice.rb +41 -0
- data/lib/droonga/catalog/version1.rb +427 -0
- data/lib/droonga/catalog/version2.rb +96 -0
- data/lib/droonga/catalog/version2_validator.rb +63 -0
- data/lib/droonga/catalog/volume.rb +33 -0
- data/lib/droonga/catalog/volume_collection.rb +56 -0
- data/lib/droonga/catalog_generator.rb +156 -0
- data/lib/droonga/catalog_loader.rb +56 -0
- data/lib/droonga/catalog_observer.rb +83 -0
- data/lib/droonga/collector.rb +38 -0
- data/lib/droonga/collector_message.rb +71 -0
- data/lib/droonga/collector_runner.rb +64 -0
- data/lib/droonga/collectors/and.rb +26 -0
- data/lib/droonga/collectors/or.rb +26 -0
- data/lib/droonga/collectors/sum.rb +26 -0
- data/lib/droonga/collectors.rb +18 -0
- data/lib/droonga/dispatcher.rb +326 -0
- data/lib/droonga/distributed_command_planner.rb +179 -0
- data/lib/droonga/distributor.rb +87 -0
- data/lib/droonga/engine/command/droonga_engine.rb +441 -0
- data/lib/droonga/engine/version.rb +20 -0
- data/lib/droonga/engine.rb +80 -0
- data/lib/droonga/engine_state.rb +79 -0
- data/lib/droonga/error.rb +73 -0
- data/lib/droonga/error_messages.rb +33 -0
- data/lib/droonga/event_loop.rb +46 -0
- data/lib/droonga/farm.rb +58 -0
- data/lib/droonga/fluent_message_receiver.rb +191 -0
- data/lib/droonga/fluent_message_sender.rb +140 -0
- data/lib/droonga/forwarder.rb +119 -0
- data/lib/droonga/handler.rb +49 -0
- data/lib/droonga/handler_message.rb +61 -0
- data/lib/droonga/handler_messenger.rb +119 -0
- data/lib/droonga/handler_runner.rb +125 -0
- data/lib/droonga/input_message.rb +51 -0
- data/lib/droonga/job_protocol.rb +20 -0
- data/lib/droonga/job_pusher.rb +179 -0
- data/lib/droonga/job_receiver.rb +70 -0
- data/lib/droonga/loggable.rb +29 -0
- data/lib/droonga/logger.rb +142 -0
- data/lib/droonga/message_matcher.rb +109 -0
- data/lib/droonga/output_message.rb +55 -0
- data/lib/droonga/planner.rb +47 -0
- data/lib/droonga/pluggable.rb +31 -0
- data/lib/droonga/plugin/metadata/adapter_input_message.rb +39 -0
- data/lib/droonga/plugin/metadata/adapter_output_message.rb +39 -0
- data/lib/droonga/plugin/metadata/collector_message.rb +39 -0
- data/lib/droonga/plugin/metadata/handler_action.rb +39 -0
- data/lib/droonga/plugin/metadata/input_message.rb +54 -0
- data/lib/droonga/plugin.rb +43 -0
- data/lib/droonga/plugin_loader.rb +63 -0
- data/lib/droonga/plugin_registry.rb +66 -0
- data/lib/droonga/plugins/basic.rb +54 -0
- data/lib/droonga/plugins/crud.rb +145 -0
- data/lib/droonga/plugins/dump.rb +97 -0
- data/lib/droonga/plugins/error.rb +51 -0
- data/lib/droonga/plugins/groonga/column_create.rb +123 -0
- data/lib/droonga/plugins/groonga/column_list.rb +124 -0
- data/lib/droonga/plugins/groonga/column_remove.rb +65 -0
- data/lib/droonga/plugins/groonga/column_rename.rb +67 -0
- data/lib/droonga/plugins/groonga/delete.rb +117 -0
- data/lib/droonga/plugins/groonga/generic_command.rb +105 -0
- data/lib/droonga/plugins/groonga/generic_response.rb +43 -0
- data/lib/droonga/plugins/groonga/select.rb +236 -0
- data/lib/droonga/plugins/groonga/table_create.rb +111 -0
- data/lib/droonga/plugins/groonga/table_list.rb +120 -0
- data/lib/droonga/plugins/groonga/table_remove.rb +57 -0
- data/lib/droonga/plugins/groonga.rb +37 -0
- data/lib/droonga/plugins/search/distributed_search_planner.rb +407 -0
- data/lib/droonga/plugins/search.rb +146 -0
- data/lib/droonga/plugins/watch.rb +178 -0
- data/lib/droonga/processor.rb +63 -0
- data/lib/droonga/reducer.rb +169 -0
- data/lib/droonga/replier.rb +49 -0
- data/lib/droonga/schema_applier.rb +167 -0
- data/lib/droonga/searcher/mecab_filter.rb +67 -0
- data/lib/droonga/searcher.rb +733 -0
- data/lib/droonga/server.rb +45 -0
- data/lib/droonga/session.rb +99 -0
- data/lib/droonga/single_step.rb +68 -0
- data/lib/droonga/single_step_definition.rb +54 -0
- data/lib/droonga/slice.rb +122 -0
- data/lib/droonga/status_code.rb +25 -0
- data/lib/droonga/step_runner.rb +64 -0
- data/lib/droonga/sweeper.rb +42 -0
- data/lib/droonga/test/stub_handler.rb +37 -0
- data/lib/droonga/test/stub_handler_message.rb +35 -0
- data/lib/droonga/test/stub_handler_messenger.rb +34 -0
- data/lib/droonga/test/stub_planner.rb +31 -0
- data/lib/droonga/test.rb +21 -0
- data/lib/droonga/watch_schema.rb +92 -0
- data/lib/droonga/watcher.rb +257 -0
- data/lib/droonga/worker.rb +61 -0
- data/sample/cluster/catalog.json +42 -0
- data/sample/mecab_filter/data.grn +7 -0
- data/sample/mecab_filter/ddl.grn +7 -0
- data/sample/mecab_filter/search_with_mecab_filter.json +21 -0
- data/sample/mecab_filter/search_without_mecab_filter.json +21 -0
- data/test/command/config/default/catalog.json +85 -0
- data/test/command/config/default/fluentd.conf +11 -0
- data/test/command/config/version1/catalog.json +68 -0
- data/test/command/config/version1/fluentd.conf +11 -0
- data/test/command/fixture/documents.jsons +208 -0
- data/test/command/fixture/event.jsons +41 -0
- data/test/command/fixture/user-table-array.jsons +38 -0
- data/test/command/fixture/user-table.jsons +47 -0
- data/test/command/run-test.rb +34 -0
- data/test/command/suite/add/dimension/column.catalog.json +28 -0
- data/test/command/suite/add/dimension/column.expected +41 -0
- data/test/command/suite/add/dimension/column.test +51 -0
- data/test/command/suite/add/dimension/integer.catalog.json +19 -0
- data/test/command/suite/add/dimension/integer.expected +41 -0
- data/test/command/suite/add/dimension/integer.test +51 -0
- data/test/command/suite/add/error/invalid-integer.expected +46 -0
- data/test/command/suite/add/error/invalid-integer.test +12 -0
- data/test/command/suite/add/error/invalid-time.expected +46 -0
- data/test/command/suite/add/error/invalid-time.test +12 -0
- data/test/command/suite/add/error/missing-key.expected +25 -0
- data/test/command/suite/add/error/missing-key.test +16 -0
- data/test/command/suite/add/error/missing-table.expected +25 -0
- data/test/command/suite/add/error/missing-table.test +16 -0
- data/test/command/suite/add/error/unknown-column.expected +46 -0
- data/test/command/suite/add/error/unknown-column.test +12 -0
- data/test/command/suite/add/error/unknown-table.expected +25 -0
- data/test/command/suite/add/error/unknown-table.test +17 -0
- data/test/command/suite/add/minimum.expected +6 -0
- data/test/command/suite/add/minimum.test +11 -0
- data/test/command/suite/add/with-values.expected +6 -0
- data/test/command/suite/add/with-values.test +17 -0
- data/test/command/suite/add/without-key.expected +6 -0
- data/test/command/suite/add/without-key.test +16 -0
- data/test/command/suite/groonga/column_create/scalar.expected +26 -0
- data/test/command/suite/groonga/column_create/scalar.test +17 -0
- data/test/command/suite/groonga/column_create/unknown-table.expected +14 -0
- data/test/command/suite/groonga/column_create/unknown-table.test +7 -0
- data/test/command/suite/groonga/column_create/vector.expected +26 -0
- data/test/command/suite/groonga/column_create/vector.test +18 -0
- data/test/command/suite/groonga/column_list/success.expected +86 -0
- data/test/command/suite/groonga/column_list/success.test +24 -0
- data/test/command/suite/groonga/column_list/unknown-table.expected +13 -0
- data/test/command/suite/groonga/column_list/unknown-table.test +7 -0
- data/test/command/suite/groonga/column_remove/success.expected +39 -0
- data/test/command/suite/groonga/column_remove/success.test +25 -0
- data/test/command/suite/groonga/column_remove/unknown-column.expected +27 -0
- data/test/command/suite/groonga/column_remove/unknown-column.test +16 -0
- data/test/command/suite/groonga/column_remove/unknown-table.expected +14 -0
- data/test/command/suite/groonga/column_remove/unknown-table.test +7 -0
- data/test/command/suite/groonga/column_rename/success.expected +39 -0
- data/test/command/suite/groonga/column_rename/success.test +26 -0
- data/test/command/suite/groonga/column_rename/unknown-column.expected +27 -0
- data/test/command/suite/groonga/column_rename/unknown-column.test +16 -0
- data/test/command/suite/groonga/column_rename/unknown-table.expected +14 -0
- data/test/command/suite/groonga/column_rename/unknown-table.test +7 -0
- data/test/command/suite/groonga/delete/duplicated-identifiers.expected +27 -0
- data/test/command/suite/groonga/delete/duplicated-identifiers.test +17 -0
- data/test/command/suite/groonga/delete/filter.expected +19 -0
- data/test/command/suite/groonga/delete/filter.test +19 -0
- data/test/command/suite/groonga/delete/invalid-filter.expected +14 -0
- data/test/command/suite/groonga/delete/invalid-filter.test +9 -0
- data/test/command/suite/groonga/delete/no-identifier.expected +27 -0
- data/test/command/suite/groonga/delete/no-identifier.test +15 -0
- data/test/command/suite/groonga/delete/success.expected +19 -0
- data/test/command/suite/groonga/delete/success.test +19 -0
- data/test/command/suite/groonga/delete/unknown-table.expected +14 -0
- data/test/command/suite/groonga/delete/unknown-table.test +7 -0
- data/test/command/suite/groonga/select/minimum.expected +22 -0
- data/test/command/suite/groonga/select/minimum.test +8 -0
- data/test/command/suite/groonga/table_create/array.expected +14 -0
- data/test/command/suite/groonga/table_create/array.test +8 -0
- data/test/command/suite/groonga/table_create/hash.expected +13 -0
- data/test/command/suite/groonga/table_create/hash.test +8 -0
- data/test/command/suite/groonga/table_list/success.expected +71 -0
- data/test/command/suite/groonga/table_list/success.test +15 -0
- data/test/command/suite/groonga/table_remove/success.expected +13 -0
- data/test/command/suite/groonga/table_remove/success.test +8 -0
- data/test/command/suite/groonga/table_remove/unknown-table.expected +14 -0
- data/test/command/suite/groonga/table_remove/unknown-table.test +7 -0
- data/test/command/suite/message/error/missing-dataset.expected +9 -0
- data/test/command/suite/message/error/missing-dataset.test +5 -0
- data/test/command/suite/message/error/unknown-dataset.expected +9 -0
- data/test/command/suite/message/error/unknown-dataset.test +6 -0
- data/test/command/suite/message/error/unknown-type.expected +9 -0
- data/test/command/suite/message/error/unknown-type.test +6 -0
- data/test/command/suite/search/adjusters/multiple.catalog.json +38 -0
- data/test/command/suite/search/adjusters/multiple.expected +19 -0
- data/test/command/suite/search/adjusters/multiple.test +75 -0
- data/test/command/suite/search/adjusters/one.catalog.json +38 -0
- data/test/command/suite/search/adjusters/one.expected +19 -0
- data/test/command/suite/search/adjusters/one.test +66 -0
- data/test/command/suite/search/attributes/array.expected +21 -0
- data/test/command/suite/search/attributes/array.test +28 -0
- data/test/command/suite/search/attributes/hash.expected +30 -0
- data/test/command/suite/search/attributes/hash.test +36 -0
- data/test/command/suite/search/complex.expected +48 -0
- data/test/command/suite/search/complex.test +23 -0
- data/test/command/suite/search/condition/nested.expected +15 -0
- data/test/command/suite/search/condition/nested.test +27 -0
- data/test/command/suite/search/condition/query/nonexistent_column.catalog.json +37 -0
- data/test/command/suite/search/condition/query/nonexistent_column.expected +48 -0
- data/test/command/suite/search/condition/query/nonexistent_column.test +33 -0
- data/test/command/suite/search/condition/query/syntax_error.catalog.json +36 -0
- data/test/command/suite/search/condition/query/syntax_error.expected +48 -0
- data/test/command/suite/search/condition/query/syntax_error.test +33 -0
- data/test/command/suite/search/condition/query.expected +24 -0
- data/test/command/suite/search/condition/query.test +23 -0
- data/test/command/suite/search/condition/script.expected +24 -0
- data/test/command/suite/search/condition/script.test +26 -0
- data/test/command/suite/search/error/cyclic-source.expected +14 -0
- data/test/command/suite/search/error/cyclic-source.test +12 -0
- data/test/command/suite/search/error/deeply-cyclic-source.expected +17 -0
- data/test/command/suite/search/error/deeply-cyclic-source.test +15 -0
- data/test/command/suite/search/error/missing-source-parameter.expected +13 -0
- data/test/command/suite/search/error/missing-source-parameter.test +11 -0
- data/test/command/suite/search/error/no-query.expected +9 -0
- data/test/command/suite/search/error/no-query.test +7 -0
- data/test/command/suite/search/error/unknown-source.expected +52 -0
- data/test/command/suite/search/error/unknown-source.test +12 -0
- data/test/command/suite/search/group/count.expected +10 -0
- data/test/command/suite/search/group/count.test +18 -0
- data/test/command/suite/search/group/limit.expected +15 -0
- data/test/command/suite/search/group/limit.test +20 -0
- data/test/command/suite/search/group/string.expected +32 -0
- data/test/command/suite/search/group/string.test +40 -0
- data/test/command/suite/search/group/subrecord/with-sort.catalog.json +33 -0
- data/test/command/suite/search/group/subrecord/with-sort.expected +30 -0
- data/test/command/suite/search/group/subrecord/with-sort.test +81 -0
- data/test/command/suite/search/multiple/chained.expected +41 -0
- data/test/command/suite/search/multiple/chained.test +39 -0
- data/test/command/suite/search/multiple/parallel.expected +35 -0
- data/test/command/suite/search/multiple/parallel.test +35 -0
- data/test/command/suite/search/output/attributes/invalid.catalog.json +13 -0
- data/test/command/suite/search/output/attributes/invalid.expected +44 -0
- data/test/command/suite/search/output/attributes/invalid.test +28 -0
- data/test/command/suite/search/range/only-output.expected +24 -0
- data/test/command/suite/search/range/only-output.test +23 -0
- data/test/command/suite/search/range/only-sort.expected +24 -0
- data/test/command/suite/search/range/only-sort.test +26 -0
- data/test/command/suite/search/range/sort-and-output.expected +21 -0
- data/test/command/suite/search/range/sort-and-output.test +27 -0
- data/test/command/suite/search/range/too-large-output-offset.expected +12 -0
- data/test/command/suite/search/range/too-large-output-offset.test +23 -0
- data/test/command/suite/search/range/too-large-sort-offset.expected +12 -0
- data/test/command/suite/search/range/too-large-sort-offset.test +26 -0
- data/test/command/suite/search/response/elapsed_time.catalog.json +13 -0
- data/test/command/suite/search/response/elapsed_time.expected +11 -0
- data/test/command/suite/search/response/elapsed_time.test +26 -0
- data/test/command/suite/search/response/records/value/time.expected +20 -0
- data/test/command/suite/search/response/records/value/time.test +22 -0
- data/test/command/suite/search/simple.expected +48 -0
- data/test/command/suite/search/simple.test +22 -0
- data/test/command/suite/search/sort/default-offset-limit.expected +39 -0
- data/test/command/suite/search/sort/default-offset-limit.test +24 -0
- data/test/command/suite/search/sort/invisible-column.expected +24 -0
- data/test/command/suite/search/sort/invisible-column.test +26 -0
- data/test/command/suite/watch/subscribe.expected +6 -0
- data/test/command/suite/watch/subscribe.test +9 -0
- data/test/command/suite/watch/unsubscribe.expected +6 -0
- data/test/command/suite/watch/unsubscribe.test +9 -0
- data/test/performance/run-test.rb +56 -0
- data/test/performance/watch/catalog.json +33 -0
- data/test/performance/watch/feed.json +9 -0
- data/test/performance/watch/fluentd.conf +11 -0
- data/test/performance/watch/subscribe.json +3 -0
- data/test/unit/catalog/test_collection_volume.rb +103 -0
- data/test/unit/catalog/test_dataset.rb +104 -0
- data/test/unit/catalog/test_schema.rb +226 -0
- data/test/unit/catalog/test_single_volume.rb +31 -0
- data/test/unit/catalog/test_slice.rb +92 -0
- data/test/unit/catalog/test_version1.rb +361 -0
- data/test/unit/catalog/test_version2.rb +124 -0
- data/test/unit/catalog/test_version2_validator.rb +66 -0
- data/test/unit/catalog/test_volume_collection.rb +50 -0
- data/test/unit/fixtures/array.grn +18 -0
- data/test/unit/fixtures/catalog/version1.json +40 -0
- data/test/unit/fixtures/catalog/version2.json +62 -0
- data/test/unit/fixtures/document.grn +34 -0
- data/test/unit/fixtures/reference/array.grn +11 -0
- data/test/unit/fixtures/reference/hash.grn +7 -0
- data/test/unit/helper/distributed_search_planner_helper.rb +83 -0
- data/test/unit/helper/fixture.rb +28 -0
- data/test/unit/helper/plugin_helper.rb +38 -0
- data/test/unit/helper/sandbox.rb +86 -0
- data/test/unit/helper/stub_worker.rb +27 -0
- data/test/unit/helper/watch_helper.rb +23 -0
- data/test/unit/helper.rb +28 -0
- data/test/unit/plugins/crud/test_add.rb +190 -0
- data/test/unit/plugins/groonga/select/test_adapter_input.rb +510 -0
- data/test/unit/plugins/groonga/select/test_adapter_output.rb +201 -0
- data/test/unit/plugins/groonga/test_column_create.rb +171 -0
- data/test/unit/plugins/groonga/test_column_list.rb +170 -0
- data/test/unit/plugins/groonga/test_column_remove.rb +98 -0
- data/test/unit/plugins/groonga/test_column_rename.rb +105 -0
- data/test/unit/plugins/groonga/test_delete.rb +127 -0
- data/test/unit/plugins/groonga/test_table_create.rb +147 -0
- data/test/unit/plugins/groonga/test_table_list.rb +184 -0
- data/test/unit/plugins/groonga/test_table_remove.rb +61 -0
- data/test/unit/plugins/search/planner/test_basic.rb +120 -0
- data/test/unit/plugins/search/planner/test_group_by.rb +573 -0
- data/test/unit/plugins/search/planner/test_output.rb +388 -0
- data/test/unit/plugins/search/planner/test_sort_by.rb +938 -0
- data/test/unit/plugins/search/test_collector.rb +806 -0
- data/test/unit/plugins/search/test_handler.rb +930 -0
- data/test/unit/plugins/search/test_planner.rb +174 -0
- data/test/unit/plugins/test_basic.rb +510 -0
- data/test/unit/plugins/test_groonga.rb +70 -0
- data/test/unit/plugins/test_watch.rb +211 -0
- data/test/unit/run-test.rb +56 -0
- data/test/unit/test_catalog_generator.rb +93 -0
- data/test/unit/test_message_matcher.rb +160 -0
- data/test/unit/test_schema_applier.rb +59 -0
- data/test/unit/test_sweeper.rb +95 -0
- data/test/unit/test_watch_schema.rb +57 -0
- data/test/unit/test_watcher.rb +336 -0
- metadata +759 -0
@@ -0,0 +1,208 @@
|
|
1
|
+
#@disable-logging
|
2
|
+
{
|
3
|
+
"dataset": "Droonga",
|
4
|
+
"type": "table_create",
|
5
|
+
"body": {
|
6
|
+
"default_tokenizer": "TokenBigram",
|
7
|
+
"normalizer": "NormalizerAuto",
|
8
|
+
"name": "Bigram",
|
9
|
+
"flags": "TABLE_PAT_KEY",
|
10
|
+
"key_type": "ShortText"
|
11
|
+
}
|
12
|
+
}
|
13
|
+
{
|
14
|
+
"dataset": "Droonga",
|
15
|
+
"type": "table_create",
|
16
|
+
"body": {
|
17
|
+
"name": "Documents",
|
18
|
+
"flags": "TABLE_HASH_KEY",
|
19
|
+
"key_type": "ShortText"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
{
|
23
|
+
"dataset": "Droonga",
|
24
|
+
"type": "table_create",
|
25
|
+
"body": {
|
26
|
+
"name": "Sections",
|
27
|
+
"flags": "TABLE_HASH_KEY",
|
28
|
+
"key_type": "ShortText"
|
29
|
+
}
|
30
|
+
}
|
31
|
+
{
|
32
|
+
"dataset": "Droonga",
|
33
|
+
"type": "column_create",
|
34
|
+
"body": {
|
35
|
+
"table": "Sections",
|
36
|
+
"name": "content",
|
37
|
+
"flags": "COLUMN_SCALAR",
|
38
|
+
"type": "Text"
|
39
|
+
}
|
40
|
+
}
|
41
|
+
{
|
42
|
+
"dataset": "Droonga",
|
43
|
+
"type": "column_create",
|
44
|
+
"body": {
|
45
|
+
"table": "Sections",
|
46
|
+
"name": "title",
|
47
|
+
"flags": "COLUMN_SCALAR",
|
48
|
+
"type": "ShortText"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
{
|
52
|
+
"dataset": "Droonga",
|
53
|
+
"type": "column_create",
|
54
|
+
"body": {
|
55
|
+
"table": "Sections",
|
56
|
+
"name": "document",
|
57
|
+
"flags": "COLUMN_SCALAR",
|
58
|
+
"type": "Documents"
|
59
|
+
}
|
60
|
+
}
|
61
|
+
{
|
62
|
+
"dataset": "Droonga",
|
63
|
+
"type": "column_create",
|
64
|
+
"body": {
|
65
|
+
"table": "Bigram",
|
66
|
+
"name": "Sections_title",
|
67
|
+
"flags": "COLUMN_INDEX|WITH_POSITION",
|
68
|
+
"type": "Sections",
|
69
|
+
"source": "title"
|
70
|
+
}
|
71
|
+
}
|
72
|
+
{
|
73
|
+
"dataset": "Droonga",
|
74
|
+
"type": "column_create",
|
75
|
+
"body": {
|
76
|
+
"table": "Bigram",
|
77
|
+
"name": "Sections_content",
|
78
|
+
"flags": "COLUMN_INDEX|WITH_POSITION",
|
79
|
+
"type": "Sections",
|
80
|
+
"source": "content"
|
81
|
+
}
|
82
|
+
}
|
83
|
+
{
|
84
|
+
"dataset": "Droonga",
|
85
|
+
"type": "add",
|
86
|
+
"body": {
|
87
|
+
"table": "Documents",
|
88
|
+
"key": "Groonga"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
{
|
92
|
+
"dataset": "Droonga",
|
93
|
+
"type": "add",
|
94
|
+
"body": {
|
95
|
+
"table": "Sections",
|
96
|
+
"key": "1.1",
|
97
|
+
"values": {
|
98
|
+
"content": "Groonga is a fast and accurate full text search engine based on inverted index. One of the characteristics of groonga is that a newly registered document instantly appears in search results. Also, groonga allows updates without read locks. These characteristics result in superior performance on real-time applications.",
|
99
|
+
"document": "Groonga",
|
100
|
+
"title": "Groonga overview"
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
{
|
105
|
+
"dataset": "Droonga",
|
106
|
+
"type": "add",
|
107
|
+
"body": {
|
108
|
+
"table": "Sections",
|
109
|
+
"key": "1.2",
|
110
|
+
"values": {
|
111
|
+
"content": "In widely used DBMSs, updates are immediately processed, for example, a newly registered record appears in the result of the next query. In contrast, some full text search engines do not support instant updates, because it is difficult to dynamically update inverted indexes, the underlying data structure.",
|
112
|
+
"document": "Groonga",
|
113
|
+
"title": "Full text search and Instant update"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
{
|
118
|
+
"dataset": "Droonga",
|
119
|
+
"type": "add",
|
120
|
+
"body": {
|
121
|
+
"table": "Sections",
|
122
|
+
"key": "1.3",
|
123
|
+
"values": {
|
124
|
+
"content": "People can collect more than enough data in the Internet era. However, it is difficult to extract informative knowledge from a large database, and such a task requires a many-sided analysis through trial and error. For example, search refinement by date, time and location may reveal hidden patterns. Aggregate queries are useful to perform this kind of tasks.",
|
125
|
+
"document": "Groonga",
|
126
|
+
"title": "Column store and aggregate query"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
{
|
131
|
+
"dataset": "Droonga",
|
132
|
+
"type": "add",
|
133
|
+
"body": {
|
134
|
+
"table": "Sections",
|
135
|
+
"key": "1.4",
|
136
|
+
"values": {
|
137
|
+
"content": "An inverted index is a traditional data structure used for large-scale full text search. A search engine based on inverted index extracts index terms from a document when it is added. Then in retrieval, a query is divided into index terms to find documents containing those index terms. In this way, index terms play an important role in full text search and thus the way of extracting index terms is a key to a better search engine.",
|
138
|
+
"document": "Groonga",
|
139
|
+
"title": "Inverted index and tokenizer"
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
{
|
144
|
+
"dataset": "Droonga",
|
145
|
+
"type": "add",
|
146
|
+
"body": {
|
147
|
+
"table": "Sections",
|
148
|
+
"key": "1.5",
|
149
|
+
"values": {
|
150
|
+
"content": "Multi-core processors are mainstream today and the number of cores per processor is increasing. In order to exploit multiple cores, executing multiple queries in parallel or dividing a query into sub-queries for parallel processing is becoming more important.",
|
151
|
+
"document": "Groonga",
|
152
|
+
"title": "Sharable storage and read lock-free"
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
{
|
157
|
+
"dataset": "Droonga",
|
158
|
+
"type": "add",
|
159
|
+
"body": {
|
160
|
+
"table": "Sections",
|
161
|
+
"key": "1.6",
|
162
|
+
"values": {
|
163
|
+
"content": "Location services are getting more convenient because of mobile devices with GPS. For example, if you are going to have lunch or dinner at a nearby restaurant, a local search service for restaurants may be very useful, and for such services, fast geo-location search is becoming more important.",
|
164
|
+
"document": "Groonga",
|
165
|
+
"title": "Geo-location (latitude and longitude) search"
|
166
|
+
}
|
167
|
+
}
|
168
|
+
}
|
169
|
+
{
|
170
|
+
"dataset": "Droonga",
|
171
|
+
"type": "add",
|
172
|
+
"body": {
|
173
|
+
"table": "Sections",
|
174
|
+
"key": "1.7",
|
175
|
+
"values": {
|
176
|
+
"content": "The basic functions of groonga are provided in a C library and any application can use groonga as a full text search engine or a column-oriented database. Also, libraries for languages other than C/C++, such as Ruby, are provided in related projects. See related projects for details.",
|
177
|
+
"document": "Groonga",
|
178
|
+
"title": "Groonga library"
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
{
|
183
|
+
"dataset": "Droonga",
|
184
|
+
"type": "add",
|
185
|
+
"body": {
|
186
|
+
"table": "Sections",
|
187
|
+
"key": "1.8",
|
188
|
+
"values": {
|
189
|
+
"content": "Groonga provides a built-in server command which supports HTTP, the memcached binary protocol and the groonga query transfer protocol (gqtp). Also, a groonga server supports query caching, which significantly reduces response time for repeated read queries. Using this command, groonga is available even on a server that does not allow you to install new libraries.",
|
190
|
+
"document": "Groonga",
|
191
|
+
"title": "Groonga server"
|
192
|
+
}
|
193
|
+
}
|
194
|
+
}
|
195
|
+
{
|
196
|
+
"dataset": "Droonga",
|
197
|
+
"type": "add",
|
198
|
+
"body": {
|
199
|
+
"table": "Sections",
|
200
|
+
"key": "1.9",
|
201
|
+
"values": {
|
202
|
+
"content": "Groonga works not only as an independent column-oriented DBMS but also as storage engines of well-known DBMSs. For example, mroonga is a MySQL pluggable storage engine using groonga. By using mroonga, you can use groonga for column-oriented storage and full text search. A combination of a built-in storage engine, MyISAM or InnoDB, and a groonga-based full text search engine is also available. All the combinations have good and bad points and the best one depends on the application. See related projects for details.",
|
203
|
+
"document": "Groonga",
|
204
|
+
"title": "Groonga storage engine"
|
205
|
+
}
|
206
|
+
}
|
207
|
+
}
|
208
|
+
#@enable-logging
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#@disable-logging
|
2
|
+
{
|
3
|
+
"type": "table_create",
|
4
|
+
"dataset": "Droonga",
|
5
|
+
"body": {
|
6
|
+
"name" : "Event",
|
7
|
+
"flags" : "TABLE_HASH_KEY"
|
8
|
+
}
|
9
|
+
}
|
10
|
+
{
|
11
|
+
"type": "column_create",
|
12
|
+
"dataset": "Droonga",
|
13
|
+
"body": {
|
14
|
+
"table" : "Event",
|
15
|
+
"name" : "start",
|
16
|
+
"type" : "Time"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
{
|
20
|
+
"dataset": "Droonga",
|
21
|
+
"type": "add",
|
22
|
+
"body": {
|
23
|
+
"table": "Event",
|
24
|
+
"key": "Groonga Night 3",
|
25
|
+
"values": {
|
26
|
+
"start": 1354183200
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
{
|
31
|
+
"dataset": "Droonga",
|
32
|
+
"type": "add",
|
33
|
+
"body": {
|
34
|
+
"table": "Event",
|
35
|
+
"key": "Groonga Night 4",
|
36
|
+
"values": {
|
37
|
+
"start": "2013-11-29T08:00:00Z"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
#@enable-logging
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#@disable-logging
|
2
|
+
{
|
3
|
+
"type": "table_create",
|
4
|
+
"dataset": "Droonga",
|
5
|
+
"body": {
|
6
|
+
"name" : "User",
|
7
|
+
"flags" : "TABLE_NO_KEY"
|
8
|
+
}
|
9
|
+
}
|
10
|
+
{
|
11
|
+
"type": "column_create",
|
12
|
+
"dataset": "Droonga",
|
13
|
+
"body": {
|
14
|
+
"table" : "User",
|
15
|
+
"name" : "name",
|
16
|
+
"type" : "ShortText"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
{
|
20
|
+
"type": "column_create",
|
21
|
+
"dataset": "Droonga",
|
22
|
+
"body": {
|
23
|
+
"table" : "User",
|
24
|
+
"name" : "age",
|
25
|
+
"type" : "Int32"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
{
|
29
|
+
"type": "column_create",
|
30
|
+
"dataset": "Droonga",
|
31
|
+
"body": {
|
32
|
+
"table" : "User",
|
33
|
+
"name" : "email",
|
34
|
+
"type" : "ShortText",
|
35
|
+
"flags" : "COLUMN_VECTOR"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
#@enable-logging
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#@disable-logging
|
2
|
+
{
|
3
|
+
"type": "table_create",
|
4
|
+
"dataset": "Droonga",
|
5
|
+
"body": {
|
6
|
+
"name" : "User",
|
7
|
+
"flags" : "TABLE_PAT_KEY"
|
8
|
+
}
|
9
|
+
}
|
10
|
+
{
|
11
|
+
"type": "column_create",
|
12
|
+
"dataset": "Droonga",
|
13
|
+
"body": {
|
14
|
+
"table" : "User",
|
15
|
+
"name" : "name",
|
16
|
+
"type" : "ShortText"
|
17
|
+
}
|
18
|
+
}
|
19
|
+
{
|
20
|
+
"type": "column_create",
|
21
|
+
"dataset": "Droonga",
|
22
|
+
"body": {
|
23
|
+
"table" : "User",
|
24
|
+
"name" : "age",
|
25
|
+
"type" : "Int32"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
{
|
29
|
+
"type": "column_create",
|
30
|
+
"dataset": "Droonga",
|
31
|
+
"body": {
|
32
|
+
"table" : "User",
|
33
|
+
"name" : "email",
|
34
|
+
"type" : "ShortText",
|
35
|
+
"flags" : "COLUMN_VECTOR"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
{
|
39
|
+
"type": "column_create",
|
40
|
+
"dataset": "Droonga",
|
41
|
+
"body": {
|
42
|
+
"table" : "User",
|
43
|
+
"name" : "birthday",
|
44
|
+
"type" : "Time"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
#@enable-logging
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2013 Droonga Project
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
17
|
+
|
18
|
+
require "rbconfig"
|
19
|
+
require "fileutils"
|
20
|
+
|
21
|
+
def run(*command_line)
|
22
|
+
return if system(*command_line)
|
23
|
+
puts("failed to run: #{command_line.join(' ')}")
|
24
|
+
exit(false)
|
25
|
+
end
|
26
|
+
|
27
|
+
base_dir = File.dirname(__FILE__)
|
28
|
+
lib_dir = File.expand_path(File.join(base_dir, "..", "..", "lib"))
|
29
|
+
|
30
|
+
drntest_options = []
|
31
|
+
drntest_options.concat(["--base-path", base_dir])
|
32
|
+
drntest_options.concat(ARGV)
|
33
|
+
|
34
|
+
run("bundle", "exec", "drntest", *drntest_options)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
{
|
2
|
+
"datasets": {
|
3
|
+
"Droonga": {
|
4
|
+
"schema": {
|
5
|
+
"Products": {
|
6
|
+
"type": "Hash",
|
7
|
+
"keyType": "ShortText",
|
8
|
+
"columns": {
|
9
|
+
"category": {
|
10
|
+
"type": "Scalar",
|
11
|
+
"valueType": "ShortText"
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"fact": "Products",
|
17
|
+
"replicas": [
|
18
|
+
{
|
19
|
+
"dimension": "category"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"dimension": "category"
|
23
|
+
}
|
24
|
+
]
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"inReplyTo": "request-id",
|
3
|
+
"statusCode": 200,
|
4
|
+
"type": "add.result",
|
5
|
+
"body": true
|
6
|
+
}
|
7
|
+
{
|
8
|
+
"inReplyTo": "request-id",
|
9
|
+
"statusCode": 200,
|
10
|
+
"type": "add.result",
|
11
|
+
"body": true
|
12
|
+
}
|
13
|
+
{
|
14
|
+
"inReplyTo": "request-id",
|
15
|
+
"statusCode": 200,
|
16
|
+
"type": "add.result",
|
17
|
+
"body": true
|
18
|
+
}
|
19
|
+
{
|
20
|
+
"inReplyTo": "request-id",
|
21
|
+
"statusCode": 200,
|
22
|
+
"type": "search.result",
|
23
|
+
"body": {
|
24
|
+
"products": {
|
25
|
+
"records": [
|
26
|
+
[
|
27
|
+
"Groonga",
|
28
|
+
"groonga"
|
29
|
+
],
|
30
|
+
[
|
31
|
+
"Rroonga",
|
32
|
+
"groonga"
|
33
|
+
],
|
34
|
+
[
|
35
|
+
"Ruby",
|
36
|
+
"ruby"
|
37
|
+
]
|
38
|
+
]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#@require-catalog-version 2
|
2
|
+
{
|
3
|
+
"type": "add",
|
4
|
+
"dataset": "Droonga",
|
5
|
+
"body": {
|
6
|
+
"table": "Products",
|
7
|
+
"key": "Groonga",
|
8
|
+
"values": {
|
9
|
+
"category": "groonga"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
{
|
14
|
+
"type": "add",
|
15
|
+
"dataset": "Droonga",
|
16
|
+
"body": {
|
17
|
+
"table": "Products",
|
18
|
+
"key": "Rroonga",
|
19
|
+
"values": {
|
20
|
+
"category": "groonga"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
{
|
25
|
+
"type": "add",
|
26
|
+
"dataset": "Droonga",
|
27
|
+
"body": {
|
28
|
+
"table": "Products",
|
29
|
+
"key": "Ruby",
|
30
|
+
"values": {
|
31
|
+
"category": "ruby"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
{
|
36
|
+
"type": "search",
|
37
|
+
"dataset": "Droonga",
|
38
|
+
"body": {
|
39
|
+
"queries": {
|
40
|
+
"products": {
|
41
|
+
"source": "Products",
|
42
|
+
"sortBy": ["_key"],
|
43
|
+
"output": {
|
44
|
+
"elements": ["records"],
|
45
|
+
"attributes": ["_key", "category"],
|
46
|
+
"limit": -1
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"inReplyTo": "request-id",
|
3
|
+
"statusCode": 200,
|
4
|
+
"type": "add.result",
|
5
|
+
"body": true
|
6
|
+
}
|
7
|
+
{
|
8
|
+
"inReplyTo": "request-id",
|
9
|
+
"statusCode": 200,
|
10
|
+
"type": "add.result",
|
11
|
+
"body": true
|
12
|
+
}
|
13
|
+
{
|
14
|
+
"inReplyTo": "request-id",
|
15
|
+
"statusCode": 200,
|
16
|
+
"type": "add.result",
|
17
|
+
"body": true
|
18
|
+
}
|
19
|
+
{
|
20
|
+
"inReplyTo": "request-id",
|
21
|
+
"statusCode": 200,
|
22
|
+
"type": "search.result",
|
23
|
+
"body": {
|
24
|
+
"products": {
|
25
|
+
"records": [
|
26
|
+
[
|
27
|
+
1,
|
28
|
+
"Groonga"
|
29
|
+
],
|
30
|
+
[
|
31
|
+
2,
|
32
|
+
"Droonga"
|
33
|
+
],
|
34
|
+
[
|
35
|
+
3,
|
36
|
+
"Ruby"
|
37
|
+
]
|
38
|
+
]
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#@require-catalog-version 2
|
2
|
+
{
|
3
|
+
"type": "add",
|
4
|
+
"dataset": "Droonga",
|
5
|
+
"body": {
|
6
|
+
"table": "Products",
|
7
|
+
"key": 1,
|
8
|
+
"values": {
|
9
|
+
"name": "Groonga"
|
10
|
+
}
|
11
|
+
}
|
12
|
+
}
|
13
|
+
{
|
14
|
+
"type": "add",
|
15
|
+
"dataset": "Droonga",
|
16
|
+
"body": {
|
17
|
+
"table": "Products",
|
18
|
+
"key": 2,
|
19
|
+
"values": {
|
20
|
+
"name": "Droonga"
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
{
|
25
|
+
"type": "add",
|
26
|
+
"dataset": "Droonga",
|
27
|
+
"body": {
|
28
|
+
"table": "Products",
|
29
|
+
"key": 3,
|
30
|
+
"values": {
|
31
|
+
"name": "Ruby"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
{
|
36
|
+
"type": "search",
|
37
|
+
"dataset": "Droonga",
|
38
|
+
"body": {
|
39
|
+
"queries": {
|
40
|
+
"products": {
|
41
|
+
"source": "Products",
|
42
|
+
"sortBy": ["_key"],
|
43
|
+
"output": {
|
44
|
+
"elements": ["records"],
|
45
|
+
"attributes": ["_key", "name"],
|
46
|
+
"limit": -1
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
{
|
2
|
+
"inReplyTo": "request-id",
|
3
|
+
"statusCode": 400,
|
4
|
+
"type": "add.result",
|
5
|
+
"body": {
|
6
|
+
"name": "InvalidValue",
|
7
|
+
"message": "The column \"age\" cannot store the value \"secret\".",
|
8
|
+
"detail": {
|
9
|
+
"table": "User",
|
10
|
+
"key": "key",
|
11
|
+
"values": {
|
12
|
+
"age": "secret"
|
13
|
+
}
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"errors": {
|
17
|
+
"sources0": {
|
18
|
+
"statusCode": 400,
|
19
|
+
"body": {
|
20
|
+
"name": "InvalidValue",
|
21
|
+
"message": "The column \"age\" cannot store the value \"secret\".",
|
22
|
+
"detail": {
|
23
|
+
"table": "User",
|
24
|
+
"key": "key",
|
25
|
+
"values": {
|
26
|
+
"age": "secret"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"sources1": {
|
32
|
+
"statusCode": 400,
|
33
|
+
"body": {
|
34
|
+
"name": "InvalidValue",
|
35
|
+
"message": "The column \"age\" cannot store the value \"secret\".",
|
36
|
+
"detail": {
|
37
|
+
"table": "User",
|
38
|
+
"key": "key",
|
39
|
+
"values": {
|
40
|
+
"age": "secret"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|