Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
MySQL 5.7 全文検索デモ 日本語対応
日本オラクル株式会社 MySQL Global Business Unit
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement The following is intended to outline our general product direcMon. It is intended for informaMon purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or funcMonality, and should not be relied upon in making purchasing decisions. The development, release, and Mming of any features or funcMonality described for Oracle’s products remains at the sole discreMon of Oracle.
Oracle ConfidenMal – Internal/Restricted/Highly Restricted 3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
全文検索とは? • 文書内の要素を検索する – 文字列を格納するデータ型が対象 • VARCHAR, TEXT, BLOB
• 検索文字列 – 単語の組み合わせ – フレーズ: “検索する文字列” – ワイルドカード: * – ブール全文検索演算子: +, -‐, ~ – 関連重み付け文字: <, >
4
5
インデクスが ない 場合
6
インデックスが ある 場合
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
用途 • コンテンツ管理 – 情報に対する説明などのメタデータ – 検索結果により有用な情報を提供
• 検索サービス – 特定の用語やトークンを含むドキュメントを検索する – 現在の表示に最も類似したドキュメントを検索する – ユーザが最も興味のあるデータを検索する
7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
全文検索インデックス • 転置インデックスにおけるトークンとドキュメントの関係
8
This movie is about a boy going to war.
This movie is about a girl star;ng an auto-‐shop.
This movie is about flowers.
a about an are as at be by com de en for from
how i in is it la of on or
that the this to was what when where who will with und
the www
Min Token Size
Max Token Size
Document 1
Document 2
Document 3
Stop Words Token Size
全文検索 / 転置インデックス
ID TOKEN DOCUMENT
1 movie 1,2,3
2 boy 1
3 girl 2
4 going 1
5 starMng 2
6 war 1
7 auto-‐shop 2
8 flowers 3
トークンフィルタ ドキュメント
Tokenizer
Tokenizer
Indexer
Indexer
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
What’s New? • MySQL 5.6 – InnoDBでの全文検索インデックスのサポート • ACID準拠トランザクション、 MVCCサポート • MyISAM対して大幅な性能およびスケーラビリティ向上 • ストップワードのカスタマイズがより簡単に
• MySQL 5.7 – プラガブル全文検索パーサのサポート – CJK(中国語、日本語、韓国語)のサポート契約 • N-‐gram パーサ:中国語、日本語、韓国語 • MeCab パーサ: 日本語
9
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Oracle ConfidenMal – Internal/Restricted/Highly Restricted 10