rabbit-slide-kou-pgconf-asia-2016 2016.12.3.1 → 2016.12.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config.yaml +1 -1
- data/images/pgroonga-n-gram-search.svg +10 -32
- data/pdf/pgconf-asia-2016-pgroonga.pdf +0 -0
- data/pgroonga.rab +45 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 035d86da01bae9e7f4dca419ab71bc46783ba024
|
4
|
+
data.tar.gz: 7380e6a2bfbdad393cccdc38a4339f3d04d7509c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eb0fa7e862b75a3f71e8b6377eefb17b367730fdd7b97ceae8fa3b84162e1546b9e8f9468565fc2b24881d0f7c5a090b8a28464789ba6dc08b6ffa4ca0f5563
|
7
|
+
data.tar.gz: 2fc68d1038ac98b61db0c3980081582054112e8588389f6fb2f96e8886575fcc95d03dddfd3578bbf6599c3dedcdb044b4bedc5f33d03c84add305dafad4584f
|
data/config.yaml
CHANGED
@@ -316,14 +316,14 @@
|
|
316
316
|
inkscape:pageopacity="0.0"
|
317
317
|
inkscape:pageshadow="2"
|
318
318
|
inkscape:zoom="1.4"
|
319
|
-
inkscape:cx="291.
|
320
|
-
inkscape:cy="
|
319
|
+
inkscape:cx="291.33318"
|
320
|
+
inkscape:cy="292.12282"
|
321
321
|
inkscape:document-units="px"
|
322
322
|
inkscape:current-layer="layer1"
|
323
323
|
showgrid="false"
|
324
|
-
inkscape:window-width="
|
325
|
-
inkscape:window-height="
|
326
|
-
inkscape:window-x="
|
324
|
+
inkscape:window-width="1024"
|
325
|
+
inkscape:window-height="704"
|
326
|
+
inkscape:window-x="0"
|
327
327
|
inkscape:window-y="27"
|
328
328
|
inkscape:window-maximized="1"
|
329
329
|
fit-margin-top="5"
|
@@ -339,7 +339,7 @@
|
|
339
339
|
<dc:format>image/svg+xml</dc:format>
|
340
340
|
<dc:type
|
341
341
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
342
|
-
<dc:title
|
342
|
+
<dc:title />
|
343
343
|
</cc:Work>
|
344
344
|
</rdf:RDF>
|
345
345
|
</metadata>
|
@@ -534,7 +534,7 @@
|
|
534
534
|
sodipodi:nodetypes="cc"
|
535
535
|
inkscape:connector-curvature="0"
|
536
536
|
id="path4336"
|
537
|
-
d="m -149.90468,
|
537
|
+
d="m -149.90468,125.82717 0,56.63162"
|
538
538
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker4356)" />
|
539
539
|
<text
|
540
540
|
sodipodi:linespacing="125%"
|
@@ -808,40 +808,18 @@
|
|
808
808
|
id="tspan5074">(Point: In PGroonga)</tspan></text>
|
809
809
|
<g
|
810
810
|
id="g5507"
|
811
|
-
transform="translate(-71.602156,-
|
811
|
+
transform="translate(-71.602156,-64.884501)">
|
812
812
|
<text
|
813
813
|
sodipodi:linespacing="125%"
|
814
814
|
id="text4558"
|
815
|
-
y="
|
815
|
+
y="289.1691"
|
816
816
|
x="-105.25858"
|
817
817
|
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
818
818
|
xml:space="preserve"><tspan
|
819
819
|
id="tspan4562"
|
820
|
-
y="
|
820
|
+
y="289.1691"
|
821
821
|
x="-105.25858"
|
822
822
|
sodipodi:role="line">"ca","at"</tspan></text>
|
823
|
-
<text
|
824
|
-
sodipodi:linespacing="125%"
|
825
|
-
id="text4846"
|
826
|
-
y="312.24121"
|
827
|
-
x="-79.601219"
|
828
|
-
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;fill:#204a87;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
829
|
-
xml:space="preserve"><tspan
|
830
|
-
y="312.24121"
|
831
|
-
x="-79.601219"
|
832
|
-
id="tspan4848"
|
833
|
-
sodipodi:role="line">1</tspan></text>
|
834
|
-
<text
|
835
|
-
sodipodi:linespacing="125%"
|
836
|
-
id="text4850"
|
837
|
-
y="312.27246"
|
838
|
-
x="-1.5595034"
|
839
|
-
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:125%;font-family:Sans;-inkscape-font-specification:Sans;letter-spacing:0px;word-spacing:0px;fill:#204a87;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
840
|
-
xml:space="preserve"><tspan
|
841
|
-
y="312.27246"
|
842
|
-
x="-1.5595034"
|
843
|
-
id="tspan4852"
|
844
|
-
sodipodi:role="line">2</tspan></text>
|
845
823
|
</g>
|
846
824
|
<path
|
847
825
|
sodipodi:nodetypes="cc"
|
Binary file
|
data/pgroonga.rab
CHANGED
@@ -22,9 +22,9 @@ Some my patches are merged\n
|
|
22
22
|
|
23
23
|
= Patches\n(('note:パッチ'))
|
24
24
|
|
25
|
-
* (('wait'))
|
25
|
+
* (('wait'))#13840: pg_dump generates unloadable SQL\n
|
26
26
|
(('note:pg_dumpがリストアできないSQLを出力する'))
|
27
|
-
* (('wait'))
|
27
|
+
* (('wait'))#14160: DROP ACCESS METHOD IF EXISTS isn't impl.\n
|
28
28
|
(('note:DROP ACCESS METHOD IF EXISTSが実装されていない'))
|
29
29
|
|
30
30
|
(('wait'))
|
@@ -43,7 +43,7 @@ They are found while developing PGroonga\n
|
|
43
43
|
|
44
44
|
= PostgreSQL and FTS\n(('note:PostgreSQLと全文検索'))
|
45
45
|
|
46
|
-
* PostgreSQL has
|
46
|
+
* PostgreSQL has built-in full text search feature\n
|
47
47
|
(('note:PostgreSQLには組込の全文検索機能がある'))\n
|
48
48
|
* (('wait'))It has some problems...\n
|
49
49
|
(('note:ただ、いくつか問題がある'))
|
@@ -242,7 +242,7 @@ pg_bigm
|
|
242
242
|
* "cat"→"ca","at"
|
243
243
|
(2) ((*Search all tokens*))\n
|
244
244
|
(('note:すべてのトークンを検索'))
|
245
|
-
* "ca"
|
245
|
+
* "ca" & "at" exist: Candidate!
|
246
246
|
(3) ((*Check appearance pos.*))\n
|
247
247
|
(('note:出現位置をチェック'))
|
248
248
|
* "ca" then "at": Found!
|
@@ -461,7 +461,7 @@ for all languages!
|
|
461
461
|
|
462
462
|
= Performance: Wrap up\n(('note:性能:まとめ'))
|
463
463
|
|
464
|
-
* Keep fast search
|
464
|
+
* Keep fast search w/ update\n
|
465
465
|
(('note:更新しながらでも高速検索を維持'))
|
466
466
|
* Support index only scan\n
|
467
467
|
(('note:インデックスオンリースキャンをサポート'))
|
@@ -556,18 +556,49 @@ prefix Romaji/Katakana search\n
|
|
556
556
|
(('note:(GIN supports only this style)'))\n
|
557
557
|
(('note:(GINはこのやり方だけサポート)'))
|
558
558
|
|
559
|
-
= JSON: FTS\n(('note:JSON
|
559
|
+
= JSON: FTS: Data\n(('note:JSON:全文検索:Data'))
|
560
560
|
|
561
561
|
# coderay sql
|
562
|
+
CREATE TABLE logs (
|
563
|
+
record jsonb
|
564
|
+
);
|
562
565
|
INSERT INTO logs (record)
|
563
566
|
VALUES ('{"host": "app1"}'),
|
564
567
|
('{"message": "app is down"}');
|
568
|
+
|
569
|
+
= JSON: FTS: Index\n(('note:JSON:全文検索:インデックス'))
|
570
|
+
|
571
|
+
# coderay sql
|
572
|
+
CREATE INDEX message_index ON logs
|
573
|
+
USING GIN
|
574
|
+
((record->>'message') gin_trgm_ops);
|
575
|
+
-- {"message": "HERE IS ONLY SEARCHABLE"}
|
576
|
+
CREATE INDEX record_index ON logs
|
577
|
+
USING pgroonga (record);
|
578
|
+
-- All string values are searchable
|
579
|
+
|
580
|
+
= JSON: FTS: GIN\n(('note:JSON:全文検索:GIN'))
|
581
|
+
|
582
|
+
# coderay sql
|
583
|
+
SELECT * FROM logs
|
584
|
+
WHERE record->>'message' LIKE '%app%';
|
585
|
+
-- ↑ {"host": "app1"} isn't target
|
586
|
+
-- record
|
587
|
+
-- ----------------------------
|
588
|
+
-- {"message": "app is down"}
|
589
|
+
-- (1 row)
|
590
|
+
|
591
|
+
= JSON: FTS: PGroonga\n(('note:JSON:全文検索:PGroonga'))
|
592
|
+
|
593
|
+
# coderay sql
|
565
594
|
SELECT * FROM logs
|
566
|
-
WHERE record @@ 'string
|
567
|
-
--
|
568
|
-
--
|
569
|
-
--
|
570
|
-
--
|
595
|
+
WHERE record @@ 'string @ "app"';
|
596
|
+
-- ↑ All string values are target
|
597
|
+
-- record
|
598
|
+
-- ----------------------------
|
599
|
+
-- {"host": "app1"}
|
600
|
+
-- {"message": "app is down"}
|
601
|
+
-- (2 rows)
|
571
602
|
|
572
603
|
= JSON: Wrap up\n(('note:JSON:まとめ'))
|
573
604
|
|
@@ -576,7 +607,7 @@ prefix Romaji/Katakana search\n
|
|
576
607
|
|
577
608
|
= Replication\n(('note:レプリケーション'))
|
578
609
|
|
579
|
-
* Support with
|
610
|
+
* Support with PG 9.6!\n
|
580
611
|
(('note:PostgreSQL 9.6で使う場合はサポート!'))
|
581
612
|
* PostgreSQL 9.6 ships "generic WAL"\n
|
582
613
|
(('note:PostgreSQL 9.6で「generic WAL」機能が追加'))
|
@@ -586,7 +617,7 @@ prefix Romaji/Katakana search\n
|
|
586
617
|
= Implementation\n(('note:実装'))
|
587
618
|
|
588
619
|
(1) Master: Encode action logs as MessagePack\n
|
589
|
-
(('note:マスター:アクションログをMessagePack
|
620
|
+
(('note:マスター:アクションログをMessagePack形式に変換'))
|
590
621
|
(2) Master: Write the action logs to WAL\n
|
591
622
|
(('note:マスター:アクションログをWALに書き込み'))
|
592
623
|
(3) Slaves: Read the action logs and apply them\n
|
@@ -646,7 +677,7 @@ prefix Romaji/Katakana search\n
|
|
646
677
|
|
647
678
|
= Replication: Wrap up\n(('note:レプリケーション:まとめ'))
|
648
679
|
|
649
|
-
* Support with
|
680
|
+
* Support with PG 9.6!\n
|
650
681
|
(('note:PostgreSQL 9.6で使う場合はサポート!'))
|
651
682
|
* Concept: Action logs on WAL\n
|
652
683
|
(('note:コンセプト:WAL上にアクションログを書く'))
|