rabbit-slide-kou-groonga-seminar-2017-08 2017.8.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 13902c106c08c10df6d8389329561bd172f6a043
4
+ data.tar.gz: ea5e2e581dd004a271d08e76c76dc264958efc1e
5
+ SHA512:
6
+ metadata.gz: e8bb57ee32439184f9d17f617f9e54b21a7ab9c33a55b1693b2ac83382979f5a5aa9b096fed62741601bae31da456481f9bce7d3bdd425bfcde8c52e997b7253
7
+ data.tar.gz: 0520f788c9d287ad1d256f8dfba57b4c5c876f1fb1a7f8949d31678d83df9d51a7d24e72e1b839249489e04963889c8b700081f1df9cbda69f5679e825c3cbb6
data/.rabbit ADDED
@@ -0,0 +1 @@
1
+ mroonga-and-pgroonga.rab
@@ -0,0 +1,28 @@
1
+ = MySQL・PostgreSQL上で動かす全文検索エンジン「Groonga」セミナー
2
+
3
+ MySQL・MariaDB・PostgreSQLを使ってリッチな全文検索システムを実装する方法を紹介します。
4
+
5
+ リッチな全文検索システムとは、単に全文検索できるだけではありません。全文検索できることはもちろん、クリックによる絞り込みや入力補完・関連エントリーの提示など、ユーザーが目的の情報をより簡単に見つけられるようにする機能があります。
6
+
7
+ 全文検索エンジンGroongaをMySQL・MariaDB・PostgreSQLに組み込むことでSQLを使ってそんなリッチな全文検索システムを実装できます。
8
+
9
+ == 作者向け
10
+
11
+ === 表示
12
+
13
+ rake
14
+
15
+ === 公開
16
+
17
+ rake publish
18
+
19
+ == 閲覧者向け
20
+
21
+ === インストール
22
+
23
+ gem install rabbit-slide-kou-groonga-seminar-2017-08
24
+
25
+ === 表示
26
+
27
+ rabbit rabbit-slide-kou-groonga-seminar-2017-08.gem
28
+
@@ -0,0 +1,18 @@
1
+ require "rabbit/task/slide"
2
+
3
+ # Edit ./config.yaml to customize meta data
4
+
5
+ spec = nil
6
+ Rabbit::Task::Slide.new do |task|
7
+ spec = task.spec
8
+ spec.files += Dir.glob("images/**/*.*")
9
+ # spec.files += Dir.glob("doc/**/*.*")
10
+ # spec.files -= Dir.glob("private/**/*.*")
11
+ spec.add_runtime_dependency("rabbit-theme-groonga")
12
+ end
13
+
14
+ desc "Tag #{spec.version}"
15
+ task :tag do
16
+ sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
17
+ sh("git", "push", "--tags")
18
+ end
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: groonga-seminar-2017-08
3
+ base_name: mroonga-and-pgroonga
4
+ tags:
5
+ - rabbit
6
+ - groonga
7
+ - mroonga
8
+ - pgroonga
9
+ - mysql
10
+ - mariadb
11
+ - postgresql
12
+ presentation_date: 2017-08-01
13
+ version: 2017.8.1.0
14
+ licenses:
15
+ - CC BY-SA 4.0
16
+ slideshare_id: groongaseminar201708
17
+ speaker_deck_id:
18
+ ustream_id:
19
+ vimeo_id:
20
+ youtube_id:
21
+ author:
22
+ markup_language: :rd
23
+ name: Kouhei Sutou
24
+ email: kou@clear-code.com
25
+ rubygems_user: kou
26
+ slideshare_user: kou
27
+ speaker_deck_user:
@@ -0,0 +1,1639 @@
1
+ = Mroonga・PGroongaを使った\n全文検索システムの実装方法
2
+
3
+ : author
4
+ 須藤功平
5
+ : institution
6
+ 株式会社クリアコード
7
+ : content-source
8
+ MySQL・PostgreSQL上で動かす全文検索エンジン「Groonga」セミナー
9
+ : date
10
+ 2017-08-01
11
+ : allotted-time
12
+ 105m
13
+ : theme
14
+ .
15
+
16
+ = 全文検索システム\n対象
17
+
18
+ (('tag:center'))
19
+ (('tag:large'))
20
+ (('tag:margin-bottom * 2'))
21
+ 大量のテキスト
22
+
23
+ * 例:Wikiのデータ
24
+ * 例:オフィス文書のテキスト
25
+ * 例:商品説明・口コミ
26
+
27
+ = 全文検索システム\n目的
28
+
29
+ * 必要な情報を
30
+ * 必要なときに
31
+ * 活用
32
+
33
+ = 必要な情報を活用
34
+
35
+ * ×
36
+ * 探している情報が見つからない
37
+ * ○
38
+ * 探している情報が見つかる
39
+ * ◎
40
+ * 意識していなかったけど\n
41
+ ((*実は欲しかった*))情報も見つかる!
42
+
43
+ = 必要なときに活用
44
+
45
+ * ×
46
+ * なかなか見つからない
47
+ * ○
48
+ * すぐに見つかる
49
+ * ◎
50
+ * すでに見つかっていた
51
+ * 例:レコメンデーション
52
+
53
+ = 実装方法\n選択肢
54
+
55
+ * 全文検索サーバーを使う
56
+ * RDBMSを使う
57
+ * MySQL・MariaDB・PostgreSQLを使う
58
+
59
+ = 全文検索サーバー案\nメリット
60
+
61
+ * 必要な機能が揃っている
62
+ * +αの機能もある
63
+ * 速い
64
+
65
+ = 全文検索サーバー案\nデメリット
66
+
67
+ * 実装コスト大
68
+ * それぞれ独自の使い方だから
69
+ * マスターデータの同期はどうする?
70
+ * メンテナンスコスト大
71
+ * それぞれ独自の仕組みだから
72
+
73
+ = RDBMS案\nメリット
74
+
75
+ * 実装コスト小
76
+ * 新しく覚えることが少ない
77
+ * データの一元管理
78
+ * メンテナンスコスト小
79
+ * 既存の運用ノウハウを使える
80
+
81
+ = RDBMS案\nデメリット
82
+
83
+ * 組込機能では機能不足
84
+ * SQLの表現力不足
85
+ * 1クエリーで実現できない機能アリ
86
+ * ↑は性能を出しにくい
87
+
88
+ = 実現方法\n第3の選択肢
89
+
90
+ * RDBMS経由(SQL)で\n
91
+ 全文検索エンジンを使う
92
+
93
+ = メリット
94
+
95
+ * 高速で豊富な機能
96
+ * 実装コスト小
97
+ * メンテナンスコスト小
98
+
99
+ = デメリット
100
+
101
+ * RDBMSに拡張機能が必要
102
+ * DBaaSで使えない
103
+
104
+ = オススメの選択肢\n全文検索の知識ナシ
105
+
106
+ * まだ単純な機能で十分
107
+ * データ少:RDBMS単独でLIKE\n
108
+ (('note:(数十万件とか)'))
109
+ * データ中:RDBMS組込全文検索機能
110
+ * いまどきの全文検索機能が必要
111
+ * RDBMS経由で全文検索エンジン
112
+
113
+ = オススメの選択肢\n全文検索の知識アリ
114
+
115
+ * カリカリにチューニングしたい
116
+ * RDBMSと全文検索サーバーを併用
117
+ * それ以外
118
+ * RDBMS経由で全文検索エンジン
119
+
120
+ = 説明する選択肢
121
+
122
+ RDBMS経由で\n
123
+ 全文検索\n
124
+ エンジン
125
+
126
+ = 全文検索エンジン\nGroonga(ぐるんが)
127
+
128
+ * 組込可能な全文検索エンジン
129
+ * MySQL・MariaDBに組込→Mroonga
130
+ * PostgreSQLに組込→PGoonga
131
+ * 全文検索サーバーとして\n
132
+ 単独でも使用可能
133
+ * RDBMSと全文検索サーバーを併用\n
134
+ もできる
135
+
136
+ = Groongaの得意なこと
137
+
138
+ * データの追加・更新
139
+ * 新鮮な情報をすぐに検索可能に!
140
+ * 更新中も検索性能を落とさない!
141
+ * 日本語
142
+ * 開発者が日本人
143
+ * 便利機能が組み込み
144
+
145
+ = Mroonga(むるんが)
146
+
147
+ * MySQLのストレージエンジン
148
+ * InnoDB・MyISAMなどと同じレイヤー
149
+ * 使用方法
150
+ * (({CREATE TABLE (...) ENGINE=Mroonga}))
151
+
152
+ == スライドプロパティ
153
+
154
+ : groonga-product
155
+
156
+ mroonga
157
+
158
+ = MySQL組込の全文検索機能
159
+
160
+ * MySQL:5.7から使える
161
+ * InnoDB+日本語対応パーサー
162
+ * MariaDB:10.0.15から使える
163
+ * Mroongaをバンドル
164
+
165
+ == スライドプロパティ
166
+
167
+ : groonga-product
168
+
169
+ mroonga
170
+
171
+ = 全文検索機能:基本
172
+
173
+ # RT
174
+
175
+ , InnoDB, Mroonga
176
+
177
+ AND/OR/NOT対応,○,○
178
+ ハイライト,×,○
179
+ 周辺テキスト表示,×,○
180
+
181
+ == スライドプロパティ
182
+
183
+ : groonga-product
184
+
185
+ mroonga
186
+
187
+ = ハイライト\n周辺テキスト表示
188
+
189
+ # image
190
+ # src = images/php-document-search-search.png
191
+ # relative_height = 100
192
+
193
+ == スライドプロパティ
194
+
195
+ : groonga-product
196
+
197
+ mroonga
198
+
199
+ = 全文検索機能:高度な機能
200
+
201
+ # RT
202
+
203
+ , InnoDB, Mroonga
204
+
205
+ 入力補完,×,○
206
+ 類似文書検索,○,○
207
+ クエリー展開,○,○
208
+
209
+ == スライドプロパティ
210
+
211
+ : groonga-product
212
+
213
+ mroonga
214
+
215
+ = 全文検索性能の違い\n計測データ
216
+
217
+ * 対象:Wikipedia日本語版
218
+ * レコード数:約185万件
219
+ * データサイズ:約7GB
220
+ * メモリー4GB・SSD250GB(('note:(ConoHa)'))
221
+
222
+ == スライドプロパティ
223
+
224
+ : groonga-product
225
+
226
+ mroonga
227
+
228
+ = 検索性能1
229
+
230
+ (('tag:center'))
231
+ キーワード:テレビアニメ\n
232
+ (('note:(ヒット数:約2万3千件)'))
233
+
234
+ # RT
235
+ delimiter = [|]
236
+
237
+ InnoDB ngram | 3m2s
238
+ InnoDB MeCab | 6m20s
239
+ Mroonga:((*1*)) | 0.11s
240
+
241
+ == スライドプロパティ
242
+
243
+ : groonga-product
244
+
245
+ mroonga
246
+
247
+ = 検索性能2
248
+
249
+ (('tag:center'))
250
+ キーワード:データベース\n
251
+ (('note:(ヒット数:約1万7千件)'))
252
+
253
+ # RT
254
+ delimiter = [|]
255
+
256
+ InnoDB ngram | 36s
257
+ InnoDB MeCab:((*1*)) | 0.03s
258
+ Mroonga:((*2*)) | 0.09s
259
+
260
+ == スライドプロパティ
261
+
262
+ : groonga-product
263
+
264
+ mroonga
265
+
266
+ = 検索性能3
267
+
268
+ (('tag:center'))
269
+ キーワード:PostgreSQL OR MySQL\n
270
+ (('note:(ヒット数:約400件)'))
271
+
272
+ # RT
273
+ delimiter = [|]
274
+
275
+ InnoDB ngram | N/A(Error)
276
+ InnoDB MeCab:((*1*)) | 0.005s
277
+ Mroonga:((*2*)) | 0.028s
278
+
279
+ == スライドプロパティ
280
+
281
+ : groonga-product
282
+
283
+ mroonga
284
+
285
+ = 検索性能4
286
+
287
+ (('tag:center'))
288
+ キーワード:日本\n
289
+ (('note:(ヒット数:約63万件)'))
290
+
291
+ # RT
292
+ delimiter = [|]
293
+
294
+ InnoDB ngram | 1.3s
295
+ InnoDB MeCab | 1.3s
296
+ Mroonga:((*1*)) | 0.21s
297
+
298
+ == スライドプロパティ
299
+
300
+ : groonga-product
301
+
302
+ mroonga
303
+
304
+ = 検索性能まとめ
305
+
306
+ * Mroonga:安定して速い
307
+ * ((*SQLで使えて機能豊富で速い!*))
308
+ * InnoDB FTS MeCab
309
+ * ハマれば速い
310
+ * InnoDB FTS ngram
311
+ * 安定して遅い
312
+
313
+ == スライドプロパティ
314
+
315
+ : groonga-product
316
+
317
+ mroonga
318
+
319
+ = 全文検索システムの実装\nMroonga
320
+
321
+ * 全文検索
322
+ * キーワードハイライト
323
+ * 周辺テキスト表示
324
+ * 入力補完
325
+ * 関連文書の表示
326
+
327
+ == スライドプロパティ
328
+
329
+ : groonga-product
330
+
331
+ mroonga
332
+
333
+ = 全文検索
334
+
335
+ # image
336
+ # src = images/php-document-search-search.png
337
+ # relative_height = 100
338
+
339
+ == スライドプロパティ
340
+
341
+ : groonga-product
342
+
343
+ mroonga
344
+
345
+ = テーブル定義
346
+
347
+ # coderay sql
348
+
349
+ CREATE TABLE entries (
350
+ title text,
351
+ content text,
352
+ -- 全文検索用インデックス
353
+ -- よくわからないならデフォルトのまま使うこと!
354
+ FULLTEXT INDEX (title, content)
355
+ ) ENGINE=Mroonga
356
+ DEFAULT CHARSET=utf8mb4;
357
+
358
+ == スライドプロパティ
359
+
360
+ : groonga-product
361
+
362
+ mroonga
363
+
364
+ = データ挿入
365
+
366
+ # coderay sql
367
+
368
+ -- 普通に挿入するだけでよい
369
+ INSERT INTO entries
370
+ VALUES ('タイトル',
371
+ '高速に全文検索したいですね!');
372
+
373
+ == スライドプロパティ
374
+
375
+ : groonga-product
376
+
377
+ mroonga
378
+
379
+ = 全文検索
380
+
381
+ # coderay sql
382
+
383
+ SELECT title FROM entries
384
+ WHERE -- MATCH AGAINSTで全文検索
385
+ MATCH (title, content)
386
+ -- デフォルトORがMySQLの仕様
387
+ -- 「検索」または「高速」を含むとマッチ
388
+ AGAINST ('検索 高速'
389
+ IN BOOLEAN MODE);
390
+
391
+ == スライドプロパティ
392
+
393
+ : groonga-product
394
+
395
+ mroonga
396
+
397
+ = AND全文検索
398
+
399
+ # coderay sql
400
+
401
+ MATCH (title, content)
402
+ -- 各キーワードの前に「+」をつけるとAND
403
+ -- 「検索」かつ「高速」を含むとマッチ
404
+ AGAINST ('+検索 +高速'
405
+ IN BOOLEAN MODE);
406
+
407
+ == スライドプロパティ
408
+
409
+ : groonga-product
410
+
411
+ mroonga
412
+
413
+ = 使いやすいAND全文検索
414
+
415
+ # coderay sql
416
+
417
+ MATCH (title, content)
418
+ -- 最初に「*D+」をつけるとデフォルトAND
419
+ -- Mroonga独自機能
420
+ -- 「検索」かつ「高速」を含むとマッチ
421
+ AGAINST ('*D+ 検索 高速'
422
+ IN BOOLEAN MODE);
423
+
424
+ == スライドプロパティ
425
+
426
+ : groonga-product
427
+
428
+ mroonga
429
+
430
+ = スコアー
431
+
432
+ # coderay sql
433
+
434
+ SELECT
435
+ title,
436
+ -- ここのMATCH AGAINSTはスコアーを返す
437
+ MATCH (title, content)
438
+ AGAINST ('*D+ 検索 高速'
439
+ IN BOOLEAN MODE) AS score
440
+ FROM entries
441
+ WHERE -- ...
442
+ -- スコアーが高い順にソート
443
+ ORDER BY score DESC LIMIT 10;
444
+
445
+ == スライドプロパティ
446
+
447
+ : groonga-product
448
+
449
+ mroonga
450
+
451
+ = ハイライト
452
+
453
+ # image
454
+ # src = images/php-document-search-search.png
455
+ # relative_height = 100
456
+
457
+ == スライドプロパティ
458
+
459
+ : groonga-product
460
+
461
+ mroonga
462
+
463
+ = ハイライト
464
+
465
+ # coderay sql
466
+
467
+ SELECT mroonga_highlight_html(
468
+ title, '*D+ 検索 高速' AS query)
469
+ -- クエリーからハイライト対象のキーワードを抽出
470
+ FROM entries
471
+ WHERE
472
+ MATCH (title, content)
473
+ AGAINST ('*D+ 検索 高速' IN BOOLEAN MODE);
474
+
475
+ == スライドプロパティ
476
+
477
+ : groonga-product
478
+
479
+ mroonga
480
+
481
+ = ハイライト結果例
482
+
483
+ # coderay html
484
+
485
+ <Groonga>で高速全文検索!
486
+
487
+ &lt;Groonga&gt;で ← タグをエスケープ
488
+ <span class="keyword">高速</span>
489
+ 全文 ↑↓キーワードはclass付け
490
+ <span class="keyword">検索</span>!
491
+
492
+ == スライドプロパティ
493
+
494
+ : groonga-product
495
+
496
+ mroonga
497
+
498
+ = 周辺テキスト
499
+
500
+ # image
501
+ # src = images/php-document-search-search.png
502
+ # relative_height = 100
503
+
504
+ == スライドプロパティ
505
+
506
+ : groonga-product
507
+
508
+ mroonga
509
+
510
+ = 周辺テキスト
511
+
512
+ # coderay sql
513
+
514
+ SELECT mroonga_snippet_html(
515
+ content, '*D+ 検索 高速' AS query)
516
+ -- クエリーから対象のキーワードを抽出
517
+ FROM entries
518
+ WHERE
519
+ MATCH (title, content)
520
+ AGAINST ('*D+ 検索 高速' IN BOOLEAN MODE);
521
+
522
+ == スライドプロパティ
523
+
524
+ : groonga-product
525
+
526
+ mroonga
527
+
528
+ = 周辺テキスト結果例
529
+
530
+ # coderay html
531
+
532
+ ...<Groonga>で高速全文検索!...
533
+
534
+ <div class="snippet"> ←1つ目
535
+ ga&gt;で ←タグをエスケープ
536
+ <span class="keyword">高速</span>
537
+ 全文 ↑↓キーワードはclass付け
538
+ <span class="keyword">検索/span>!
539
+ </div>
540
+ <div class="snippet">...</div> ←2つ目
541
+
542
+ == スライドプロパティ
543
+
544
+ : groonga-product
545
+
546
+ mroonga
547
+
548
+ = 類似文書検索
549
+
550
+ * 検索クエリーは文書そのもの
551
+ * キーワードではない
552
+ * 関連エントリーの提示に使える
553
+ * メタデータがあるなら組み合わせる\n
554
+ →精度向上
555
+ * メタデータ:タグ・行動履歴など
556
+
557
+ == スライドプロパティ
558
+
559
+ : groonga-product
560
+
561
+ mroonga
562
+
563
+ = 類似文書検索\nインデックス定義
564
+
565
+ # coderay sql
566
+
567
+ CREATE TABLE entries (
568
+ -- ...
569
+ FULLTEXT INDEX (content)
570
+ -- TokenMecabを使わないと精度がでない
571
+ -- 必要なときだけカスタマイズ!
572
+ COMMENT 'tokenizer "TokenMecab"'
573
+ ) -- ...
574
+
575
+ == スライドプロパティ
576
+
577
+ : groonga-product
578
+
579
+ mroonga
580
+
581
+ = 類似文書検索\n検索方法
582
+
583
+ # coderay sql
584
+
585
+ SELECT title
586
+ FROM entries
587
+ WHERE
588
+ MATCH (content)
589
+ ↓ 既存文書の内容をそのまま指定
590
+ AGAINST ('...Groongaで高速全文検索!...'
591
+ IN NATURAL LANGUAGE MODE);
592
+
593
+ == スライドプロパティ
594
+
595
+ : groonga-product
596
+
597
+ mroonga
598
+
599
+ = 類似文書検索\n結果例
600
+
601
+ クエリー:
602
+ ...Groongaで高速全文検索!...
603
+
604
+ ヒット例:
605
+ ...Mroongaで高速全文検索!...
606
+
607
+ == スライドプロパティ
608
+
609
+ : groonga-product
610
+
611
+ mroonga
612
+
613
+ = 照合順序:COLLATION
614
+
615
+ * 文字の並び順の規則
616
+ * 文字が同一かどうかの判定にも利用
617
+ * 適切な日本語規則なし
618
+ * いわゆる🍣=🍺問題
619
+
620
+ (('note:MySQL 8では適切な日本語規則が追加される'))
621
+
622
+ == スライドプロパティ
623
+
624
+ : groonga-product
625
+
626
+ mroonga
627
+
628
+ = Mroongaの照合順序
629
+
630
+ * MySQL互換のもの
631
+ * MySQL互換を微調整したもの
632
+ * 日本語でもいい感じ
633
+ * Groonga提供のもの
634
+ * 日本語でもいい感じ
635
+
636
+ == スライドプロパティ
637
+
638
+ : groonga-product
639
+
640
+ mroonga
641
+
642
+ = 微調整した照合順序
643
+
644
+ # coderay sql
645
+ FULLTEXT INDEX (content)
646
+ COMMENT 'normalizer "${ノーマライザー名}"'
647
+ ノーマライザー名:
648
+ NormalizerMySQLUnicode520CI
649
+ ExceptKanaCI
650
+ KanaWithVoicedSoundMark
651
+
652
+ == スライドプロパティ
653
+
654
+ : groonga-product
655
+
656
+ mroonga
657
+
658
+ = PGroonga\n(ぴーじーるんが)
659
+
660
+ * PostgreSQLのインデックス
661
+ * B-tree・GINなどと同じレイヤー
662
+ * 使用方法
663
+ * (({CREATE INDEX ...}))\n
664
+ (({USING PGroonga ...}))
665
+
666
+ == スライドプロパティ
667
+
668
+ : groonga-product
669
+
670
+ pgroonga
671
+
672
+ = PostgreSQLの全文検索機能
673
+
674
+ * textsearch(組込)
675
+ * 言語依存
676
+ * 日本語対応はメンテされていない
677
+ * pg_trgm(同梱)
678
+ * 言語非依存:が、ほぼ日本語非対応
679
+ * pg_bigm(サードパーティー)
680
+ * 言語非依存:日本語対応
681
+
682
+ == スライドプロパティ
683
+
684
+ : groonga-product
685
+
686
+ pgroonga
687
+
688
+ = 全文検索機能:基本
689
+
690
+ # RT
691
+
692
+ , pg_bigm, PGroonga
693
+
694
+ AND/OR/NOT対応,△※1,○
695
+ ハイライト,△※2,○
696
+ 周辺テキスト表示,△※2,○
697
+
698
+ (('note:※1 SQLでAND/OR/NOTを組み合わせると実現可能'))
699
+
700
+ (('note:※2 PostgreSQLが提供する関数で実現可能。ただし、結果をHTMLで出力する用途では使えない。'))
701
+
702
+ == スライドプロパティ
703
+
704
+ : groonga-product
705
+
706
+ pgroonga
707
+
708
+ = 全文検索機能:高度な機能
709
+
710
+ # RT
711
+
712
+ , pg_bigm, PGroonga
713
+
714
+ 入力補完,×,○
715
+ 類似文書検索,△※,○
716
+ クエリー展開,×,○
717
+
718
+ (('note:※ 類似文書検索と言うよりはあいまい検索。'))
719
+
720
+ == スライドプロパティ
721
+
722
+ : groonga-product
723
+
724
+ pgroonga
725
+
726
+ = 全文検索性能の違い\n計測データ
727
+
728
+ * 対象:Wikipedia日本語版
729
+ * レコード数:約90万件
730
+ * データサイズ:約6GB
731
+ * メモリー32GB・SSD500GB
732
+
733
+ == スライドプロパティ
734
+
735
+ : groonga-product
736
+
737
+ pgroonga
738
+
739
+ = 検索性能1
740
+
741
+ (('tag:center'))
742
+ キーワード:テレビアニメ\n
743
+ (('note:(ヒット数:約2万件)'))
744
+
745
+ # RT
746
+ delimiter = [|]
747
+
748
+ pg_bigm | 2.800s
749
+ PGroonga:((*1*)) | 0.065s
750
+ Groonga(参考) | 0.038s
751
+
752
+ == スライドプロパティ
753
+
754
+ : groonga-product
755
+
756
+ pgroonga
757
+
758
+ = 検索性能2
759
+
760
+ (('tag:center'))
761
+ キーワード:データベース\n
762
+ (('note:(ヒット数:約1万5千件)'))
763
+
764
+ # RT
765
+ delimiter = [|]
766
+
767
+ pg_bigm | 1.300s
768
+ PGroonga:((*1*)) | 0.049s
769
+ Groonga(参考) | 0.031s
770
+
771
+ == スライドプロパティ
772
+
773
+ : groonga-product
774
+
775
+ pgroonga
776
+
777
+ = 検索性能3
778
+
779
+ (('tag:center'))
780
+ キーワード:PostgreSQL OR MySQL\n
781
+ (('note:(ヒット数:約300件)'))
782
+
783
+ # RT
784
+ delimiter = [|]
785
+
786
+ pg_bigm | 0.049s
787
+ PGroonga:((*1*)) | 0.002s
788
+ Groonga(参考) | 0.001s
789
+
790
+ == スライドプロパティ
791
+
792
+ : groonga-product
793
+
794
+ pgroonga
795
+
796
+ = 検索性能4
797
+
798
+ (('tag:center'))
799
+ キーワード:日本\n
800
+ (('note:(ヒット数:約53万件)'))
801
+
802
+ # RT
803
+ delimiter = [|]
804
+
805
+ pg_bigm:((*1*)) | 0.479s
806
+ PGroonga | 0.563s
807
+ Groonga(参考) | 0.059s
808
+
809
+ == スライドプロパティ
810
+
811
+ : groonga-product
812
+
813
+ pgroonga
814
+
815
+ = 検索性能まとめ
816
+
817
+ * PGroonga:安定して速い
818
+ * ((*SQLで使えて機能豊富で速い!*))
819
+ * pg_bigm
820
+ * ヒット数が少なければ速い
821
+ * キーワードが2文字以下なら速い
822
+
823
+ == スライドプロパティ
824
+
825
+ : groonga-product
826
+
827
+ pgroonga
828
+
829
+ = 全文検索システムの実装\nPGroonga
830
+
831
+ * 全文検索
832
+ * キーワードハイライト
833
+ * 周辺テキスト表示
834
+ * 入力補完
835
+ * 関連文書の表示
836
+
837
+ == スライドプロパティ
838
+
839
+ : groonga-product
840
+
841
+ pgroonga
842
+
843
+ = 全文検索
844
+
845
+ # image
846
+ # src = images/php-document-search-search.png
847
+ # relative_height = 100
848
+
849
+ == スライドプロパティ
850
+
851
+ : groonga-product
852
+
853
+ pgroonga
854
+
855
+ = テーブル定義
856
+
857
+ # coderay sql
858
+
859
+ CREATE TABLE entries (
860
+ -- プライマリーキーを用意する
861
+ -- スコアーでソートするために必要
862
+ id integer PRIMARY KEY,
863
+ title text,
864
+ content text
865
+ );
866
+
867
+ == スライドプロパティ
868
+
869
+ : groonga-product
870
+
871
+ pgroonga
872
+
873
+ = インデックス定義
874
+
875
+ # coderay sql
876
+
877
+ -- 全文検索用インデックス
878
+ -- よくわからないなら
879
+ -- デフォルトのまま使うこと!
880
+ CREATE INDEX entries_full_text_search
881
+ ON entries
882
+ --「USING PGroonga」=「PGroongaを使う」
883
+ USING PGroonga (id, title, content);
884
+
885
+ == スライドプロパティ
886
+
887
+ : groonga-product
888
+
889
+ pgroonga
890
+
891
+ = データ挿入
892
+
893
+ # coderay sql
894
+
895
+ -- 普通に挿入するだけでよい
896
+ INSERT INTO entries
897
+ VALUES (1,
898
+ 'Groongaで高速全文検索!',
899
+ '高速に全文検索したいですね!');
900
+
901
+ == スライドプロパティ
902
+
903
+ : groonga-product
904
+
905
+ pgroonga
906
+
907
+ = 全文検索
908
+
909
+ # coderay sql
910
+
911
+ SELECT title FROM entries
912
+ WHERE
913
+ -- &@~で全文検索
914
+ -- 「検索」と「高速」をAND検索
915
+ title &@~ '検索 高速' OR
916
+ content &@~ '検索 高速';
917
+
918
+ == スライドプロパティ
919
+
920
+ : groonga-product
921
+
922
+ pgroonga
923
+
924
+ = 全文検索:LIKE
925
+
926
+ # coderay sql
927
+
928
+ SELECT title FROM entries
929
+ WHERE
930
+ -- LIKEでもインデックスが効く
931
+ --=アプリを書き換えずに高速化可能
932
+ -- ただし&@~より性能が落ちる
933
+ title LIKE '%検索%' OR
934
+ content LIKE '%検索%';
935
+
936
+ == スライドプロパティ
937
+
938
+ : groonga-product
939
+
940
+ pgroonga
941
+
942
+ = スコアー
943
+
944
+ # coderay sql
945
+
946
+ SELECT
947
+ title,
948
+ -- pgroonga.score(テーブル名)で
949
+ -- スコアーを取得
950
+ pgroonga.score(entries) AS score
951
+ FROM entries
952
+ WHERE -- ...
953
+ -- スコアーが高い順にソート
954
+ ORDER BY score DESC LIMIT 10;
955
+
956
+ == スライドプロパティ
957
+
958
+ : groonga-product
959
+
960
+ pgroonga
961
+
962
+ = ハイライト
963
+
964
+ # image
965
+ # src = images/php-document-search-search.png
966
+ # relative_height = 100
967
+
968
+ == スライドプロパティ
969
+
970
+ : groonga-product
971
+
972
+ pgroonga
973
+
974
+ = ハイライト
975
+
976
+ # coderay sql
977
+
978
+ SELECT
979
+ pgroonga.highlight_html(
980
+ title,
981
+ -- クエリーから対象キーワードを抽出
982
+ pgroonga.query_extract_keywords('検索 高速'))
983
+ FROM entries
984
+ WHERE title &@~ '検索 高速' OR
985
+ content &@~ '検索 高速';
986
+
987
+ == スライドプロパティ
988
+
989
+ : groonga-product
990
+
991
+ pgroonga
992
+
993
+ = ハイライト結果例
994
+
995
+ # coderay html
996
+
997
+ <Groonga>で高速全文検索!
998
+
999
+ &lt;Groonga&gt;で ← タグをエスケープ
1000
+ <span class="keyword">高速</span>
1001
+ 全文 ↑↓キーワードはclass付け
1002
+ <span class="keyword">検索</span>!
1003
+
1004
+ == スライドプロパティ
1005
+
1006
+ : groonga-product
1007
+
1008
+ pgroonga
1009
+
1010
+ = 周辺テキスト
1011
+
1012
+ # image
1013
+ # src = images/php-document-search-search.png
1014
+ # relative_height = 100
1015
+
1016
+ == スライドプロパティ
1017
+
1018
+ : groonga-product
1019
+
1020
+ pgroonga
1021
+
1022
+ = 周辺テキスト
1023
+
1024
+ # coderay sql
1025
+
1026
+ SELECT
1027
+ pgroonga.snippet_html(
1028
+ content,
1029
+ -- クエリーから対象キーワードを抽出
1030
+ pgroonga.query_extract_keywords('検索 高速'))
1031
+ FROM entries
1032
+ WHERE title &@~ '検索 高速' OR
1033
+ content &@~ '検索 高速';
1034
+
1035
+ == スライドプロパティ
1036
+
1037
+ : groonga-product
1038
+
1039
+ pgroonga
1040
+
1041
+ = 周辺テキスト結果例
1042
+
1043
+ # coderay html
1044
+
1045
+ ...<Groonga>で高速全文検索!...
1046
+
1047
+ ARRAY[
1048
+ ↓ 1つ目
1049
+ 'ga&gt;で ←タグをエスケープ
1050
+ <span class="keyword">高速</span>
1051
+ 全文 ↑↓キーワードはclass付け
1052
+ <span class="keyword">検索/span>!',
1053
+ '...' ← 2つ目
1054
+ ]
1055
+
1056
+ == スライドプロパティ
1057
+
1058
+ : groonga-product
1059
+
1060
+ pgroonga
1061
+
1062
+ = 入力補完
1063
+
1064
+ # image
1065
+ # src = images/php-document-search.png
1066
+ # relative_height = 100
1067
+
1068
+ == スライドプロパティ
1069
+
1070
+ : groonga-product
1071
+
1072
+ pgroonga
1073
+
1074
+ = 入力補完\n実装方法
1075
+
1076
+ * 以下の検索のOR
1077
+ * 前方一致検索
1078
+ * ヨミガナでの前方一致検索
1079
+ * 緩い全文検索
1080
+ * 表示文字列でソートして提示
1081
+
1082
+ (('tag:xx-small'))
1083
+ https://pgroonga.github.io/ja/how-to/auto-complete.html
1084
+
1085
+ == スライドプロパティ
1086
+
1087
+ : groonga-product
1088
+
1089
+ pgroonga
1090
+
1091
+ = 入力補完\nテーブル定義
1092
+
1093
+ # coderay sql
1094
+
1095
+ CREATE TABLE terms (
1096
+ -- 補完候補
1097
+ term text,
1098
+ -- この候補のヨミガナ(N個可)
1099
+ readings text[]
1100
+ );
1101
+
1102
+ == スライドプロパティ
1103
+
1104
+ : groonga-product
1105
+
1106
+ pgroonga
1107
+
1108
+ = 入力補完\nデータ例
1109
+
1110
+ # coderay sql
1111
+
1112
+ INSERT INTO terms VALUES (
1113
+ '牛乳', -- 補完候補
1114
+ ARRAY[
1115
+ -- ヨミガナはカタカナで指定する
1116
+ 'ギュウニュウ',
1117
+ -- 「ミルク」でも補完できるようになる
1118
+ 'ミルク'
1119
+ ]
1120
+ );
1121
+
1122
+ == スライドプロパティ
1123
+
1124
+ : groonga-product
1125
+
1126
+ pgroonga
1127
+
1128
+ = 入力補完\nデータ管理のポイント
1129
+
1130
+ * 普通のテーブルなので管理が楽
1131
+ * 追加・削除・更新が楽
1132
+ * ダンプ・リストアもいつも通り
1133
+ * レプリケーションもいつも通り
1134
+
1135
+ == スライドプロパティ
1136
+
1137
+ : groonga-product
1138
+
1139
+ pgroonga
1140
+
1141
+ = 入力補完\n前方一致用インデックス
1142
+
1143
+ # coderay sql
1144
+
1145
+ CREATE INDEX prefix_search ON terms
1146
+ USING PGroonga
1147
+ -- ...text_term_search...
1148
+ (term pgroonga.text_term_search_ops_v2,
1149
+ -- ...text_array_term_search...
1150
+ readings pgroonga.text_array_term_search_ops_v2);
1151
+
1152
+ == スライドプロパティ
1153
+
1154
+ : groonga-product
1155
+
1156
+ pgroonga
1157
+
1158
+ = 入力補完\n緩い全文検索用
1159
+
1160
+ # coderay sql
1161
+
1162
+ CREATE INDEX loose_search ON terms
1163
+ USING PGroonga
1164
+ -- ...text_full_text_search...
1165
+ (term pgroonga.text_full_text_search_ops_v2)
1166
+ -- 緩い全文検索用トークナイザー
1167
+ WITH (tokenizer='TokenBigramSplitSymbolAlphaDigit');
1168
+
1169
+ == スライドプロパティ
1170
+
1171
+ : groonga-product
1172
+
1173
+ pgroonga
1174
+
1175
+ = 入力補完\n検索方法
1176
+
1177
+ # coderay sql
1178
+
1179
+ SELECT term FROM terms
1180
+ -- 前方一致検索
1181
+ WHERE term &^ '${入力}' OR
1182
+ -- ローマ字で前方一致検索
1183
+ readings &^~ '${入力}' OR
1184
+ -- 緩い全文検索
1185
+ term &@ '${入力}'
1186
+ ORDER BY term LIMIT 10; -- ソート
1187
+
1188
+ == スライドプロパティ
1189
+
1190
+ : groonga-product
1191
+
1192
+ pgroonga
1193
+
1194
+ = 入力補完\n検索例:漢字1
1195
+
1196
+ # coderay sql
1197
+
1198
+ -- ユーザーが「牛」を入力した場合
1199
+ SELECT term FROM terms
1200
+ -- 前方一致検索(ヒット)
1201
+ WHERE term &^ '牛' OR
1202
+ -- ヨミガナで前方一致検索
1203
+ readings &^~ '牛' OR
1204
+ -- 緩い全文検索(ヒット)
1205
+ term &@ '牛'
1206
+ ORDER BY term LIMIT 10; -- ソート
1207
+
1208
+ == スライドプロパティ
1209
+
1210
+ : groonga-product
1211
+
1212
+ pgroonga
1213
+
1214
+ = 入力補完\n検索例:漢字2
1215
+
1216
+ # coderay sql
1217
+
1218
+ -- ユーザーが「乳」を入力した場合
1219
+ SELECT term FROM terms
1220
+ -- 前方一致検索
1221
+ WHERE term &^ '乳' OR
1222
+ -- ヨミガナで前方一致検索
1223
+ readings &^~ '乳' OR
1224
+ -- 緩い全文検索(ヒット)
1225
+ term &@ '乳'
1226
+ ORDER BY term LIMIT 10; -- ソート
1227
+
1228
+ == スライドプロパティ
1229
+
1230
+ : groonga-product
1231
+
1232
+ pgroonga
1233
+
1234
+ = 入力補完\n検索例:カタカナ
1235
+
1236
+ # coderay sql
1237
+
1238
+ -- ユーザーが「ギュウ」を入力した場合
1239
+ SELECT term FROM terms
1240
+ -- 前方一致検索
1241
+ WHERE term &^ 'ギュウ' OR
1242
+ -- ヨミガナで前方一致検索(ヒット)
1243
+ readings &^~ 'ギュウ' OR
1244
+ -- 緩い全文検索
1245
+ term &@ 'ギュウ'
1246
+ ORDER BY term LIMIT 10; -- ソート
1247
+
1248
+ == スライドプロパティ
1249
+
1250
+ : groonga-product
1251
+
1252
+ pgroonga
1253
+
1254
+ = 入力補完\n検索例:ひらがな
1255
+
1256
+ # coderay sql
1257
+
1258
+ -- ユーザーが「ぎゅう」を入力した場合
1259
+ SELECT term FROM terms
1260
+ -- 前方一致検索
1261
+ WHERE term &^ 'ぎゅう' OR
1262
+ -- ヨミガナで前方一致検索(ヒット)
1263
+ readings &^~ 'ぎゅう' OR
1264
+ -- 緩い全文検索
1265
+ term &@ 'ぎゅう'
1266
+ ORDER BY term LIMIT 10; -- ソート
1267
+
1268
+ == スライドプロパティ
1269
+
1270
+ : groonga-product
1271
+
1272
+ pgroonga
1273
+
1274
+ = 入力補完\n検索例:ローマ字
1275
+
1276
+ # coderay sql
1277
+
1278
+ -- ユーザーが「gyu」を入力した場合
1279
+ SELECT term FROM terms
1280
+ -- 前方一致検索
1281
+ WHERE term &^ 'gyu' OR
1282
+ -- ヨミガナで前方一致検索(ヒット)
1283
+ readings &^~ 'gyu' OR
1284
+ -- 緩い全文検索
1285
+ term &@ 'gyu'
1286
+ ORDER BY term LIMIT 10; -- ソート
1287
+
1288
+ == スライドプロパティ
1289
+
1290
+ : groonga-product
1291
+
1292
+ pgroonga
1293
+
1294
+ = 同義語展開
1295
+
1296
+ * 同義語
1297
+ * 同じ意味だが表記が異なる語
1298
+ * 例:「刺身」と「お造り」
1299
+ * どの表記でもヒットして欲しい
1300
+ * 同義語展開→同義語すべてでOR検索
1301
+
1302
+ == スライドプロパティ
1303
+
1304
+ : groonga-product
1305
+
1306
+ pgroonga
1307
+
1308
+ = 同義語展開\n実装方法
1309
+
1310
+ * 同義語管理テーブルを作成
1311
+ * クエリー内の同義語を展開
1312
+ * 展開後のクエリーで検索
1313
+
1314
+ (('tag:xx-small'))
1315
+ https://pgroonga.github.io/ja/reference/functions/pgroonga-query-expand.html
1316
+
1317
+ == スライドプロパティ
1318
+
1319
+ : groonga-product
1320
+
1321
+ pgroonga
1322
+
1323
+ = 同義語展開\nテーブル定義
1324
+
1325
+ # coderay sql
1326
+ CREATE TABLE synonyms (
1327
+ -- 展開対象の語
1328
+ term text,
1329
+ -- 同義語のリスト
1330
+ -- term自身も含める
1331
+ -- 含めない場合はtermが検索禁止語になる
1332
+ terms text[]
1333
+ );
1334
+
1335
+ == スライドプロパティ
1336
+
1337
+ : groonga-product
1338
+
1339
+ pgroonga
1340
+
1341
+ = 同義語展開\nデータ例
1342
+
1343
+ # coderay sql
1344
+ INSERT INTO synonyms
1345
+ VALUES ('刺身', -- 「刺身」を展開
1346
+ ARRAY['刺身', 'お造り']),
1347
+ ('お造り', -- 「お造り」を展開
1348
+ ARRAY['お造り', '刺身']);
1349
+
1350
+ == スライドプロパティ
1351
+
1352
+ : groonga-product
1353
+
1354
+ pgroonga
1355
+
1356
+ = 同義語展開\nデータ管理のポイント
1357
+
1358
+ * 普通のテーブルなので管理が楽
1359
+ * 追加・削除・更新が楽
1360
+ * ダンプ・リストアもいつも通り
1361
+ * レプリケーションもいつも通り
1362
+
1363
+ == スライドプロパティ
1364
+
1365
+ : groonga-product
1366
+
1367
+ pgroonga
1368
+
1369
+ = 同義語展開\nインデックス定義
1370
+
1371
+ # coderay sql
1372
+ CREATE INDEX synonym_search ON synonyms
1373
+ USING PGroonga
1374
+ -- ...text_term_search...
1375
+ -- termで完全一致検索をするため
1376
+ (term pgroonga.text_term_search_ops_v2);
1377
+
1378
+ == スライドプロパティ
1379
+
1380
+ : groonga-product
1381
+
1382
+ pgroonga
1383
+
1384
+ = 同義語展開\n確認方法
1385
+
1386
+ # coderay sql
1387
+
1388
+ SELECT pgroonga.query_expand(
1389
+ 'synonyms', -- テーブル名
1390
+ 'term', -- 展開対象のカラム名
1391
+ 'terms', -- 対応する同義語配列のカラム名
1392
+ '刺身' -- クエリー
1393
+ );
1394
+ -- '((刺身) OR (お造り))'
1395
+
1396
+ == スライドプロパティ
1397
+
1398
+ : groonga-product
1399
+
1400
+ pgroonga
1401
+
1402
+ = 同義語展開\n検索方法
1403
+
1404
+ # coderay sql
1405
+ SELECT title FROM entries
1406
+ WHERE
1407
+ -- title &@~ '和食 OR ((刺身) OR (お造り))'になる
1408
+ title &@~
1409
+ pgroonga.query_expand('synonyms',
1410
+ 'term',
1411
+ 'terms',
1412
+ '和食 OR 刺身');
1413
+
1414
+ == スライドプロパティ
1415
+
1416
+ : groonga-product
1417
+
1418
+ pgroonga
1419
+
1420
+ = 類似文書検索
1421
+
1422
+ * 検索クエリーは文書そのもの
1423
+ * キーワードではない
1424
+ * 関連エントリーの提示に使える
1425
+ * メタデータがあるなら組み合わせる\n
1426
+ →精度向上
1427
+ * メタデータ:タグ・行動履歴など
1428
+
1429
+ == スライドプロパティ
1430
+
1431
+ : groonga-product
1432
+
1433
+ pgroonga
1434
+
1435
+ = 類似文書検索\nインデックス定義
1436
+
1437
+ # coderay sql
1438
+
1439
+ CREATE INDEX entries_similar_search
1440
+ ON entries
1441
+ USING PGroonga (
1442
+ id,
1443
+ -- pg...v2の指定がポイント
1444
+ content pgroonga.text_full_text_search_ops_v2
1445
+ -- TokenMecabを使うと精度向上
1446
+ ) WITH (tokenizer='TokenMecab');
1447
+
1448
+ == スライドプロパティ
1449
+
1450
+ : groonga-product
1451
+
1452
+ pgroonga
1453
+
1454
+ = 類似文書検索\n検索方法
1455
+
1456
+ # coderay sql
1457
+
1458
+ SELECT title
1459
+ FROM entries
1460
+ WHERE
1461
+ -- &~?で類似文書検索
1462
+ -- 既存文書の内容をそのまま指定
1463
+ content &~?
1464
+ '...Groongaで高速全文検索!...';
1465
+
1466
+ == スライドプロパティ
1467
+
1468
+ : groonga-product
1469
+
1470
+ pgroonga
1471
+
1472
+ = 類似文書検索\n結果例
1473
+
1474
+ クエリー:
1475
+ ...Groongaで高速全文検索!...
1476
+
1477
+ ヒット例:
1478
+ ...PGroongaで高速全文検索!...
1479
+
1480
+ == スライドプロパティ
1481
+
1482
+ : groonga-product
1483
+
1484
+ pgroonga
1485
+
1486
+ = 全文検索システムの実装\nまとめ
1487
+
1488
+ * 全文検索
1489
+ * キーワードハイライト
1490
+ * 周辺テキスト表示
1491
+ * 入力補完
1492
+ * 関連文書の表示
1493
+
1494
+ = 全文検索システムの実装\n次の一歩
1495
+
1496
+ * 構造化データ対応
1497
+ * オフィス文書・HTMLなど
1498
+ * 対応に必要な処理
1499
+ * テキスト抽出
1500
+ * メタデータ抽出(('note:(例:タイトル・更新日時)'))
1501
+ * スクリーンショット作成(('note:(なおよい)'))
1502
+
1503
+ = 抽出ツール
1504
+
1505
+ * Apache Tika
1506
+ * Apache Luceneのサブプロジェクト
1507
+ * 対応フォーマット数が多い
1508
+ * ChupaText
1509
+ * Groongaのサブプロジェクト
1510
+ * スクリーンショット作成対応
1511
+
1512
+ = ChupaText
1513
+
1514
+ * 対応フォーマット
1515
+ * Word/Excel/PowerPoint
1516
+ * ODT/ODS/ODP(('note:(OpenDocument)'))
1517
+ * PDF/HTML/XML/CSV/...
1518
+ * インターフェイス
1519
+ * HTTPとコマンドライン
1520
+
1521
+ = ChupaText:インストール
1522
+
1523
+ * DockerかVagrantを使うのが楽
1524
+ * (('tag:xx-small'))
1525
+ https://github.com/ranguba/chupa-text-docker
1526
+ * (('tag:xx-small'))
1527
+ https://github.com/ranguba/chupa-text-vagrant
1528
+
1529
+ = ChupaText:Docker
1530
+
1531
+ # coderay console
1532
+ % GITHUB=https://github.com
1533
+ % git clone \
1534
+ ${GITHUB}/ranguba/chupa-text-docker.git
1535
+ % cd chupa-text-docker
1536
+ % docker-compose up --build
1537
+
1538
+ = ChupaText:使い方
1539
+
1540
+ # coderay console
1541
+ % curl \
1542
+ --form data=@XXX.pdf \
1543
+ http://localhost:20080/extraction.json
1544
+
1545
+ = ChupaText:結果例
1546
+
1547
+ # coderay json
1548
+
1549
+ {
1550
+ "mime-type": "application/pdf", # 元データのMIMEタイプ
1551
+ "size": 147159, # メタデータ
1552
+ ...,
1553
+ "texts": [ # 抽出されたテキスト(N個)
1554
+ {
1555
+ "mime-type": "text/plain", # 抽出後のMIMEタイプ
1556
+ ...,
1557
+ "creator": "Adobe Illustrator CS3", # メタデータ
1558
+ "body": "This is sample PDF. ...", # 抽出したテキスト
1559
+ "screenshot": {
1560
+ "mime-type": "image/png", # スクリーンショットのMIMEタイプ
1561
+ "data": "iVBORw...", # Base64にした画像データ
1562
+ "encoding": "base64" # Base64であることを明記
1563
+ }
1564
+ }
1565
+ ]
1566
+ }
1567
+
1568
+ = ChupaText:Web UI
1569
+
1570
+ # image
1571
+ # src = images/chupa-text-web-ui-form.png
1572
+ # relative_height = 100
1573
+
1574
+ = ChupaText:Web UI抽出例
1575
+
1576
+ # image
1577
+ # src = images/chupa-text-web-ui-extract-metadata.png
1578
+ # relative_height = 100
1579
+
1580
+ = ChupaText:Web UI抽出例
1581
+
1582
+ # image
1583
+ # src = images/chupa-text-web-ui-extract-text-and-screenshot.png
1584
+ # relative_height = 100
1585
+
1586
+ = ChupaText:Vagrant
1587
+
1588
+ # coderay console
1589
+ % GITHUB=https://github.com
1590
+ % git clone \
1591
+ ${GITHUB}/ranguba/chupa-text-vagrant.git
1592
+ % cd chupa-text-vagrant
1593
+ % vagrant up
1594
+
1595
+ (('tag:center'))
1596
+ 使い方はDocker版と同じ
1597
+
1598
+ = ChupaText:活用例
1599
+
1600
+ * 抽出したテキスト
1601
+ * Mroonga・PGroongaへ挿入
1602
+ * 抽出したメタデータ
1603
+ * Mroonga・PGroongaへ挿入
1604
+ * 絞り込みに活用
1605
+ * 作成したスクリーンショット
1606
+ * 検索結果表示時に掲載
1607
+
1608
+ = まとめ
1609
+
1610
+ * RDBMS経由で全文検索エンジン
1611
+ * 採用の判断材料を提供
1612
+ * 全文検索システム実装例を紹介
1613
+ * Mroonga・PGroonga両方
1614
+ * 構造化データの対応方法を紹介
1615
+ * ChupaText
1616
+
1617
+ = 扱わなかった話題
1618
+
1619
+ * 運用について
1620
+ * 障害対策・レプリケーション
1621
+ * チューニング
1622
+ * Groongaの機能を直接使う方法
1623
+
1624
+ (('tag:center'))
1625
+ 今後のセミナーの話題にするには\n
1626
+ 実例ベースの方がやりやすいので\n
1627
+ あなたのケースを教えてください
1628
+
1629
+ = サポートサービス紹介
1630
+
1631
+ * 導入支援(('note:(設計支援・性能検証・移行支援・…)'))
1632
+ * 開発支援\n
1633
+ (('note:(サンプルコード提供・問い合わせ対応・…)'))
1634
+ * 運用支援(('note:(障害対応・チューニング支援・…)'))
1635
+
1636
+ 問い合わせ先:
1637
+
1638
+ (('tag:x-small'))
1639
+ https://www.clear-code.com/contact/?type=groonga