rabbit-slide-kou-groonga-meatup-2017 2017.2.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ table_create Products TABLE_PAT_KEY ShortText
2
+ load --table Products
3
+ [
4
+ {"_key": "Groonga"},
5
+ {"_key": "Grooonga"},
6
+ {"_key": "Mroonga"}
7
+ ]
8
+ select Products \
9
+ --filter 'fuzzy_search(_key, "Groonga")' \
10
+ --output_columns '_key, _score' \
11
+ --output_pretty yes
@@ -0,0 +1,8 @@
1
+ table_create Numbers TABLE_HASH_KEY Int32
2
+ load --table Numbers \
3
+ --output_errors yes \
4
+ --command_version 3 --output_pretty yes
5
+ [
6
+ {"_key": 29},
7
+ {"_key": "Hello"}
8
+ ]
@@ -0,0 +1,8 @@
1
+ table_create Numbers TABLE_HASH_KEY Int32
2
+ load --table Numbers \
3
+ --output_ids yes \
4
+ --command_version 3 --output_pretty yes
5
+ [
6
+ {"_key": 29},
7
+ {"_key": "Hello"}
8
+ ]
@@ -0,0 +1,2 @@
1
+ table_create Memos TABLE_HASH_KEY ShortText
2
+ column_create Memos content COLUMN_SCALAR Text
@@ -0,0 +1,2 @@
1
+ select Memos \
2
+ --output_pretty yes
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env python
2
+
3
+ import bmemcached
4
+
5
+ servers = ("127.0.0.1:11211",)
6
+ client = bmemcached.Client(servers)
7
+ print(client.get("abc"))
8
+ client.set("abc", "Hello")
9
+ print(client.get("abc"))
10
+ # client.delete("abc")
@@ -0,0 +1,73 @@
1
+ table_create LargeCategories TABLE_HASH_KEY ShortText
2
+
3
+ table_create MediumCategories TABLE_HASH_KEY ShortText
4
+ column_create MediumCategories large COLUMN_SCALAR LargeCategories
5
+
6
+ table_create SmallCategories TABLE_HASH_KEY ShortText
7
+ column_create SmallCategories medium COLUMN_SCALAR MediumCategories
8
+
9
+ table_create Items TABLE_HASH_KEY ShortText
10
+ column_create Items category COLUMN_SCALAR SmallCategories
11
+
12
+ load --table LargeCategories
13
+ [
14
+ {"_key": "家電"},
15
+ {"_key": "コンピューター"}
16
+ ]
17
+
18
+ load --table MediumCategories
19
+ [
20
+ {"_key": "冷蔵庫", "large": "家電"},
21
+ {"_key": "洗濯機", "large": "家電"},
22
+ {"_key": "ノートパソコン", "large": "コンピューター"},
23
+ {"_key": "タブレット", "large": "コンピューター"}
24
+ ]
25
+
26
+ load --table SmallCategories
27
+ [
28
+ {"_key": "2ドア冷蔵庫", "medium": "冷蔵庫"},
29
+ {"_key": "3ドア冷蔵庫", "medium": "冷蔵庫"},
30
+ {"_key": "ドラム式洗濯機", "medium": "洗濯機"},
31
+ {"_key": "ThinkPad", "medium": "ノートパソコン"},
32
+ {"_key": "Let's NOTE", "medium": "ノートパソコン"},
33
+ {"_key": "VAIO", "medium": "ノートパソコン"},
34
+ {"_key": "Nexus", "medium": "タブレット"}
35
+ ]
36
+
37
+ load --table Items
38
+ [
39
+ {"_key": "ThinkPad E470", "category": "ThinkPad"},
40
+ {"_key": "ThinkPad E570", "category": "ThinkPad"},
41
+ {"_key": "Nexus 7", "category": "Nexus"}
42
+ {"_key": "VAIO C15", "category": "VAIO"}
43
+ ]
44
+
45
+ select Items \
46
+ --drilldowns[small_categories].keys category \
47
+ --drilldowns[small_categories].output_columns _key,medium,_nsubrecs \
48
+ --drilldowns[medium_categories].keys medium \
49
+ --drilldowns[medium_categories].table small_categories \
50
+ --drilldowns[medium_categories].calc_target _nsubrecs \
51
+ --drilldowns[medium_categories].calc_types SUM \
52
+ --drilldowns[medium_categories].output_columns _key,large,_sum \
53
+ --drilldowns[large_categories].keys large \
54
+ --drilldowns[large_categories].table medium_categories \
55
+ --drilldowns[large_categories].calc_target _sum \
56
+ --drilldowns[large_categories].calc_types SUM \
57
+ --drilldowns[large_categories].output_columns _key,_sum \
58
+ --output_pretty yes
59
+
60
+ select Items \
61
+ --drilldowns[s].keys category \
62
+ --drilldowns[s].output_columns _key,medium,_nsubrecs \
63
+ --drilldowns[m].keys medium \
64
+ --drilldowns[m].table s \
65
+ --drilldowns[m].calc_target _nsubrecs \
66
+ --drilldowns[m].calc_types SUM \
67
+ --drilldowns[m].output_columns _key,large,_sum \
68
+ --drilldowns[l].keys large \
69
+ --drilldowns[l].table m \
70
+ --drilldowns[l].calc_target _sum \
71
+ --drilldowns[l].calc_types SUM \
72
+ --drilldowns[l].output_columns _key,large,_sum \
73
+ --output_pretty yes
@@ -0,0 +1,11 @@
1
+ table_create Words \
2
+ TABLE_HASH_KEY ShortText
3
+ column_create Words synonyms \
4
+ COLUMN_VECTOR ShortText
5
+
6
+ load --table Words
7
+ [
8
+ {"_key": "焼肉", "synonyms": ["焼肉", "焼き肉"]}
9
+ ]
10
+
11
+ query_expand Words.synonyms 焼肉
@@ -0,0 +1,16 @@
1
+ table_create Teams TABLE_NO_KEY
2
+ column_create Teams ages \
3
+ COLUMN_VECTOR UInt8
4
+
5
+ table_create Ages TABLE_PAT_KEY UInt8
6
+ column_create Ages teams_ages \
7
+ COLUMN_INDEX|WITH_POSITION Teams ages
8
+
9
+ load --table Teams
10
+ [
11
+ {"ages": [1, 30, 2]},
12
+ {"ages": [30, 28, 29]}
13
+ ]
14
+ select Teams \
15
+ --filter 'ages[1] < 29' \
16
+ --output_pretty yes
@@ -0,0 +1,22 @@
1
+ table_create Logs TABLE_NO_KEY
2
+ column_create Logs product COLUMN_SCALAR ShortText
3
+ column_create Logs sales COLUMN_SCALAR UInt32
4
+ column_create Logs day COLUMN_SCALAR Time
5
+
6
+ load --table Logs
7
+ [
8
+ {"product", "A", "sales": 100, "day": "2017-02-01 00:00:00"},
9
+ {"product", "B", "sales": 150, "day": "2017-02-01 00:00:00"},
10
+ {"product", "A", "sales": 120, "day": "2017-02-02 00:00:00"},
11
+ {"product", "A", "sales": 130, "day": "2017-02-03 00:00:00"},
12
+ {"product", "B", "sales": 110, "day": "2017-02-03 00:00:00"}
13
+ ]
14
+
15
+ select Logs \
16
+ --columns[amount].stage initial \
17
+ --columns[amount].type UInt32 \
18
+ --columns[amount].value 'window_sum(sales)' \
19
+ --columns[amount].window.group_keys product \
20
+ --columns[amount].window.sort_keys day \
21
+ --output_columns *,amount \
22
+ --output_pretty yes
@@ -0,0 +1,7 @@
1
+ table_create Memos \
2
+ TABLE_HASH_KEY ShortText
3
+ column_create Memos content \
4
+ COLUMN_SCALAR|COMPRESS_ZSTD \
5
+ Text
6
+
7
+ dump
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-kou-groonga-meatup-2017
3
+ version: !ruby/object:Gem::Version
4
+ version: 2017.2.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Kouhei Sutou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ - !ruby/object:Gem::Dependency
28
+ name: rabbit-theme-groonga
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Groonga、Mroonga、PGroongaなど、Groonga関連プロジェクトの概要と2016年現在の最新情報を紹介します。
42
+ email:
43
+ - kou@clear-code.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - ".rabbit"
49
+ - README.rd
50
+ - Rakefile
51
+ - config.yaml
52
+ - groonga-family-2016.rab
53
+ - images/OLAP_slicing.png
54
+ - images/groonga-logo.svg
55
+ - images/mroonga-logo.svg
56
+ - images/multistage-drilldowns.svg
57
+ - images/pgroonga-logo.svg
58
+ - images/slice-example.svg
59
+ - images/window-function.svg
60
+ - pdf/groonga-meatup-2017-groonga-family-2016.pdf
61
+ - samples/fuzzy-search.grn
62
+ - samples/load-output-errors.grn
63
+ - samples/load-output-ids.grn
64
+ - samples/memcached-schema.grn
65
+ - samples/memcached-select.grn
66
+ - samples/memcached.py
67
+ - samples/multistage-drilldowns.grn
68
+ - samples/query-expand.grn
69
+ - samples/vector-index-search.grn
70
+ - samples/window-function.grn
71
+ - samples/zstd-compression.grn
72
+ homepage: http://slide.rabbit-shocker.org/authors/kou/groonga-meatup-2017/
73
+ licenses:
74
+ - CC BY-SA 4.0
75
+ - CC BY 3.0
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.5.2
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Groonga族2016
97
+ test_files: []