fluent-plugin-droonga 0.0.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -0
  3. data/.yardopts +7 -0
  4. data/Gemfile +14 -2
  5. data/LICENSE.txt +1 -1
  6. data/README.md +1 -1
  7. data/Rakefile +27 -5
  8. data/benchmark/benchmark.rb +1 -1
  9. data/benchmark/utils.rb +9 -6
  10. data/benchmark/watch/benchmark-notify.rb +2 -2
  11. data/benchmark/watch/benchmark-publish.rb +1 -1
  12. data/benchmark/watch/benchmark-scan.rb +1 -1
  13. data/benchmark/watch/catalog.json +1 -1
  14. data/bin/grn2jsons +1 -1
  15. data/fluent-plugin-droonga.gemspec +5 -3
  16. data/lib/droonga/adapter.rb +13 -130
  17. data/lib/droonga/adapter_plugin.rb +51 -0
  18. data/lib/droonga/catalog.rb +2 -2
  19. data/lib/droonga/collector.rb +107 -0
  20. data/lib/droonga/collector_plugin.rb +82 -0
  21. data/lib/droonga/command_mapper.rb +1 -1
  22. data/lib/droonga/{proxy.rb → dispatcher.rb} +116 -151
  23. data/lib/droonga/distributor.rb +51 -0
  24. data/lib/droonga/distributor_plugin.rb +59 -0
  25. data/lib/droonga/engine.rb +9 -50
  26. data/lib/droonga/farm.rb +47 -0
  27. data/lib/droonga/forwarder.rb +125 -0
  28. data/lib/droonga/handler.rb +69 -60
  29. data/lib/droonga/handler_plugin.rb +22 -11
  30. data/lib/droonga/input_message.rb +51 -0
  31. data/lib/droonga/job_queue.rb +5 -1
  32. data/lib/droonga/job_queue_schema.rb +1 -1
  33. data/lib/droonga/logger.rb +1 -1
  34. data/lib/droonga/partition.rb +76 -0
  35. data/lib/droonga/pluggable.rb +62 -0
  36. data/lib/droonga/plugin.rb +18 -16
  37. data/lib/droonga/plugin/{adapter_groonga.rb → adapter/groonga.rb} +10 -10
  38. data/lib/droonga/plugin/adapter/groonga/select.rb +13 -4
  39. data/lib/droonga/plugin/collector/basic.rb +142 -0
  40. data/lib/droonga/plugin/distributor/crud.rb +43 -0
  41. data/lib/droonga/plugin/distributor/groonga.rb +37 -0
  42. data/lib/droonga/plugin/distributor/search.rb +273 -0
  43. data/lib/droonga/plugin/distributor/watch.rb +39 -0
  44. data/lib/droonga/plugin/{handler_add.rb → handler/add.rb} +6 -6
  45. data/lib/droonga/plugin/{handler_forward.rb → handler/forward.rb} +9 -4
  46. data/lib/droonga/plugin/{handler_groonga.rb → handler/groonga.rb} +36 -4
  47. data/lib/droonga/plugin/handler/groonga/column_create.rb +5 -9
  48. data/lib/droonga/plugin/handler/groonga/table_create.rb +9 -18
  49. data/lib/droonga/plugin/{handler_search.rb → handler/search.rb} +4 -4
  50. data/lib/droonga/plugin/{handler_watch.rb → handler/watch.rb} +4 -4
  51. data/lib/droonga/plugin_loader.rb +45 -0
  52. data/lib/droonga/plugin_registerable.rb +51 -0
  53. data/lib/droonga/plugin_repository.rb +56 -0
  54. data/lib/droonga/processor.rb +64 -0
  55. data/lib/droonga/searcher.rb +16 -7
  56. data/lib/droonga/server.rb +5 -9
  57. data/lib/droonga/sweeper.rb +1 -1
  58. data/lib/droonga/watch_schema.rb +1 -1
  59. data/lib/droonga/watcher.rb +1 -1
  60. data/lib/droonga/worker.rb +21 -9
  61. data/lib/fluent/plugin/out_droonga.rb +33 -15
  62. data/lib/groonga_command_converter.rb +1 -1
  63. data/sample/cluster/fluentd.conf +0 -1
  64. data/test/command/config/default/catalog.json +43 -0
  65. data/test/command/config/default/fluentd.conf +11 -0
  66. data/test/command/fixture/documents.jsons +208 -0
  67. data/test/command/fixture/user-table-array.jsons +38 -0
  68. data/test/command/fixture/user-table.jsons +38 -0
  69. data/test/command/run-test.rb +35 -0
  70. data/test/command/suite/add/minimum.expected +12 -0
  71. data/test/command/suite/add/minimum.test +11 -0
  72. data/test/command/suite/add/with-values.expected +12 -0
  73. data/test/command/suite/add/with-values.test +17 -0
  74. data/test/command/suite/add/without-key.expected +12 -0
  75. data/test/command/suite/add/without-key.test +16 -0
  76. data/test/command/suite/groonga/column_create/scalar.expected +34 -0
  77. data/test/command/suite/groonga/column_create/scalar.test +17 -0
  78. data/test/command/suite/groonga/column_create/vector.expected +34 -0
  79. data/test/command/suite/groonga/column_create/vector.test +18 -0
  80. data/test/command/suite/groonga/select/minimum.expected +26 -0
  81. data/test/command/suite/groonga/select/minimum.test +8 -0
  82. data/test/command/suite/groonga/table_create/array.expected +17 -0
  83. data/test/command/suite/groonga/table_create/array.test +8 -0
  84. data/test/command/suite/groonga/table_create/hash.expected +17 -0
  85. data/test/command/suite/groonga/table_create/hash.test +8 -0
  86. data/test/command/suite/search/array-attribute-label.expected +25 -0
  87. data/test/command/suite/search/array-attribute-label.test +30 -0
  88. data/test/command/suite/search/chained-queries.expected +45 -0
  89. data/test/command/suite/search/chained-queries.test +43 -0
  90. data/test/command/suite/search/complex.expected +52 -0
  91. data/test/command/suite/search/complex.test +25 -0
  92. data/test/command/suite/search/condition-nested.expected +19 -0
  93. data/test/command/suite/search/condition-nested.test +29 -0
  94. data/test/command/suite/search/condition-query.expected +28 -0
  95. data/test/command/suite/search/condition-query.test +25 -0
  96. data/test/command/suite/search/condition-script.expected +28 -0
  97. data/test/command/suite/search/condition-script.test +28 -0
  98. data/test/command/suite/search/hash-attribute-label.expected +34 -0
  99. data/test/command/suite/search/hash-attribute-label.test +38 -0
  100. data/test/command/suite/search/minimum.expected +13 -0
  101. data/test/command/suite/search/minimum.test +16 -0
  102. data/test/command/suite/search/multiple-queries.expected +39 -0
  103. data/test/command/suite/search/multiple-queries.test +39 -0
  104. data/test/command/suite/search/output-range.expected +28 -0
  105. data/test/command/suite/search/output-range.test +25 -0
  106. data/test/command/suite/search/simple.expected +52 -0
  107. data/test/command/suite/search/simple.test +24 -0
  108. data/test/command/suite/search/sort-and-output-range.expected +25 -0
  109. data/test/command/suite/search/sort-and-output-range.test +29 -0
  110. data/test/command/suite/search/sort-range.expected +28 -0
  111. data/test/command/suite/search/sort-range.test +28 -0
  112. data/test/command/suite/search/sort-with-invisible-column.expected +28 -0
  113. data/test/command/suite/search/sort-with-invisible-column.test +28 -0
  114. data/test/unit/fixtures/array.grn +18 -0
  115. data/test/{fixtures → unit/fixtures}/catalog.json +0 -0
  116. data/test/{fixtures → unit/fixtures}/document.grn +20 -9
  117. data/test/unit/fixtures/reference/array.grn +11 -0
  118. data/test/unit/fixtures/reference/hash.grn +7 -0
  119. data/test/{helper.rb → unit/helper.rb} +2 -1
  120. data/test/{helper → unit/helper}/fixture.rb +1 -1
  121. data/test/unit/helper/plugin_helper.rb +38 -0
  122. data/test/{helper → unit/helper}/sandbox.rb +19 -6
  123. data/test/{helper → unit/helper}/stub_worker.rb +1 -1
  124. data/test/{helper → unit/helper}/watch_helper.rb +1 -13
  125. data/test/{plugin → unit/plugin}/adapter/groonga/test_select.rb +108 -4
  126. data/test/unit/plugin/collector/test_basic.rb +558 -0
  127. data/test/unit/plugin/distributor/test_search.rb +914 -0
  128. data/test/{plugin → unit/plugin}/handler/groonga/test_column_create.rb +18 -14
  129. data/test/{plugin → unit/plugin}/handler/groonga/test_table_create.rb +13 -11
  130. data/test/{plugin/handler/test_handler_add.rb → unit/plugin/handler/test_add.rb} +2 -14
  131. data/test/{plugin/handler/test_handler_groonga.rb → unit/plugin/handler/test_groonga.rb} +6 -26
  132. data/test/unit/plugin/handler/test_search.rb +601 -0
  133. data/test/{plugin/handler/test_handler_watch.rb → unit/plugin/handler/test_watch.rb} +2 -2
  134. data/test/{run-test.rb → unit/run-test.rb} +3 -3
  135. data/test/{test_adapter.rb → unit/test_adapter.rb} +17 -14
  136. data/test/{test_catalog.rb → unit/test_catalog.rb} +4 -4
  137. data/test/{test_command_mapper.rb → unit/test_command_mapper.rb} +1 -1
  138. data/test/{test_groonga_command_converter.rb → unit/test_groonga_command_converter.rb} +3 -3
  139. data/test/{test_job_queue_schema.rb → unit/test_job_queue_schema.rb} +1 -1
  140. data/test/{test_output.rb → unit/test_output.rb} +9 -9
  141. data/test/{test_handler.rb → unit/test_plugin.rb} +19 -22
  142. data/test/unit/test_plugin_repository.rb +89 -0
  143. data/test/{test_sweeper.rb → unit/test_sweeper.rb} +1 -1
  144. data/test/{test_watch_schema.rb → unit/test_watch_schema.rb} +1 -1
  145. data/test/{test_watcher.rb → unit/test_watcher.rb} +1 -1
  146. metadata +226 -66
  147. data/lib/droonga/executor.rb +0 -289
  148. data/lib/droonga/plugin/handler_proxy.rb +0 -82
  149. data/test/plugin/handler/test_handler_search.rb +0 -512
  150. data/test/test_worker.rb +0 -144
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -15,7 +15,7 @@
15
15
  # License along with this library; if not, write to the Free Software
16
16
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
 
18
- require "groonga"
18
+ require "droonga/job_queue"
19
19
 
20
20
  module Droonga
21
21
  module Server
@@ -53,7 +53,7 @@ module Droonga
53
53
  $log.trace("#{log_tag}: stop: start")
54
54
 
55
55
  $log.trace("#{log_tag}: stop: queue: unblock: start")
56
- max_n_retries = 10
56
+ max_n_retries = 20
57
57
  max_n_retries.times do |i|
58
58
  $log.trace("#{log_tag}: stop: queue: unblock: #{i}: start")
59
59
  super(stop_graceful)
@@ -95,16 +95,12 @@ module Droonga
95
95
 
96
96
  def open_queue
97
97
  config = @worker.config
98
- # TODO: Use JobQueue object
99
- context = Groonga::Context.new
100
- database = context.open_database(config[:database])
101
- queue = context[config[:queue_name]]
98
+ queue = JobQueue.open(config[:database],
99
+ config[:queue_name] || "DroongaQueue")
102
100
  begin
103
101
  yield(queue)
104
102
  ensure
105
103
  queue.close
106
- database.close
107
- context.close
108
104
  end
109
105
  end
110
106
  end
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -15,25 +15,26 @@
15
15
  # License along with this library; if not, write to the Free Software
16
16
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
 
18
- require "droonga/executor"
18
+ require "droonga/job_queue"
19
+ require "droonga/handler"
19
20
 
20
21
  module Droonga
21
22
  module Worker
22
- attr_reader :context, :envelope, :name
23
-
24
23
  def initialize
25
- @executor = Executor.new(config.merge(:proxy => false))
24
+ @database_name = config[:database]
25
+ @queue_name = config[:queue_name] || "DroongaQueue"
26
26
  end
27
27
 
28
28
  def run
29
29
  $log.trace("#{log_tag}: run: start")
30
+ handler = Handler.new(config)
31
+ job_queue = JobQueue.open(@database_name, @queue_name)
30
32
  @running = true
31
33
  while @running
32
- $log.trace("#{log_tag}: run: pull_message: start")
33
- @executor.execute_one
34
- $log.trace("#{log_tag}: run: pull_message: done")
34
+ process(handler, job_queue)
35
35
  end
36
- @executor.shutdown
36
+ handler.shutdown
37
+ job_queue.close
37
38
  $log.trace("#{log_tag}: run: done")
38
39
  end
39
40
 
@@ -44,6 +45,17 @@ module Droonga
44
45
  end
45
46
 
46
47
  private
48
+ def process(handler, job_queue)
49
+ $log.trace("#{log_tag}: process: start")
50
+ envelope = job_queue.pull_message
51
+ unless envelope
52
+ $log.trace("#{log_tag}: process: abort: no message")
53
+ return
54
+ end
55
+ handler.process(envelope)
56
+ $log.trace("#{log_tag}: process: done")
57
+ end
58
+
47
59
  def log_tag
48
60
  "[#{Process.ppid}][#{Process.pid}] worker"
49
61
  end
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -16,28 +16,18 @@
16
16
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
17
 
18
18
  require "droonga/engine"
19
+ require "droonga/plugin_loader"
19
20
 
20
21
  module Fluent
21
22
  class DroongaOutput < Output
22
23
  Plugin.register_output("droonga", self)
23
24
 
24
25
  config_param :name, :string, :default => ""
25
- config_param :proxy, :bool, :default => false
26
- config_param :n_workers, :integer, :default => 0
27
- config_param :database, :string, :default => ""
28
- config_param :queue_name, :string, :default => "DroongaQueue"
29
- config_param :handlers, :default => [] do |value|
30
- value.split(/\s*,\s*/)
31
- end
32
26
 
33
27
  def start
34
28
  super
35
- @engine = Droonga::Engine.new(:database => @database,
36
- :queue_name => @queue_name,
37
- :n_workers => @n_workers,
38
- :handlers => @handlers,
39
- :name => @name,
40
- :proxy => @proxy)
29
+ Droonga::PluginLoader.load_all
30
+ @engine = Droonga::Engine.new(:name => @name)
41
31
  @engine.start
42
32
  end
43
33
 
@@ -48,9 +38,37 @@ module Fluent
48
38
 
49
39
  def emit(tag, es, chain)
50
40
  es.each do |time, record|
51
- @engine.emit(tag, time, record)
41
+ process_event(tag, record)
52
42
  end
53
43
  chain.next
54
44
  end
45
+
46
+ private
47
+ def process_event(tag, record)
48
+ $log.trace("out_droonga: tag: <#{tag}> caller: <#{caller.first}>")
49
+ @engine.process(parse_record(tag, record))
50
+ end
51
+
52
+ def parse_record(tag, record)
53
+ prefix, type, *arguments = tag.split(/\./)
54
+ if type.nil? || type.empty? || type == 'message'
55
+ envelope = record
56
+ else
57
+ envelope = {
58
+ "type" => type,
59
+ "arguments" => arguments,
60
+ "body" => record
61
+ }
62
+ end
63
+ envelope["via"] ||= []
64
+ reply_to = envelope["replyTo"]
65
+ if reply_to.is_a? String
66
+ envelope["replyTo"] = {
67
+ "type" => envelope["type"] + ".result",
68
+ "to" => reply_to
69
+ }
70
+ end
71
+ envelope
72
+ end
55
73
  end
56
74
  end
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
- # Copyright (C) 2013 droonga project
3
+ # Copyright (C) 2013 Droonga Project
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
@@ -5,7 +5,6 @@
5
5
  <match droonga.message>
6
6
  name localhost:23003/droonga
7
7
  type droonga
8
- proxy true
9
8
  </match>
10
9
  <match output.message>
11
10
  type stdout
@@ -0,0 +1,43 @@
1
+ {
2
+ "effective_date": "2013-09-01T00:00:00Z",
3
+ "zones": ["localhost:23003/droonga"],
4
+ "farms": {
5
+ "localhost:23003/droonga": {
6
+ "device": ".",
7
+ "capacity": 10
8
+ }
9
+ },
10
+ "datasets": {
11
+ "Droonga": {
12
+ "workers": 2,
13
+ "plugins": ["search", "groonga", "add"],
14
+ "number_of_replicas": 2,
15
+ "number_of_partitions": 2,
16
+ "partition_key": "_key",
17
+ "date_range": "infinity",
18
+ "ring": {
19
+ "localhost:23041": {
20
+ "weight": 50,
21
+ "partitions": {
22
+ "2013-09-01": [
23
+ "localhost:23003/droonga.000",
24
+ "localhost:23003/droonga.001"
25
+ ]
26
+ }
27
+ },
28
+ "localhost:23042": {
29
+ "weight": 50,
30
+ "partitions": {
31
+ "2013-09-01": [
32
+ "localhost:23003/droonga.002",
33
+ "localhost:23003/droonga.003"
34
+ ]
35
+ }
36
+ }
37
+ }
38
+ }
39
+ },
40
+ "options": {
41
+ "plugins": ["select"]
42
+ }
43
+ }
@@ -0,0 +1,11 @@
1
+ <source>
2
+ type forward
3
+ port 23003
4
+ </source>
5
+ <match droonga.message>
6
+ name localhost:23003/droonga
7
+ type droonga
8
+ </match>
9
+ <match output.message>
10
+ type stdout
11
+ </match>
@@ -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