H Oracle Textでのストップワード変換
この付録では、それぞれの演算子に対するストップワードの書換え(変換)について説明します。すべての表のストップワード式の列では、問合せ式または問合せ式のコンポーネントを示します。また、右側の列では、Oracle Textによる問合せの書換えを示します。
この付録の内容は次のとおりです。
H.1 ストップワード変換の理解
ストップワードまたはストップワードのみからなる句を問合せ演算子のオペランドとして使用すると、Oracle Textは式を書き換えてストップワードまたはストップワードのみからなる句を排除した後、問合せを実行します。
トークンstopwordは、ストップワードまたはストップワードのみからなる句を表します。
トークンnon_stopwordは、ストップワード以外のワード、ストップワード以外のワードのみからなる句、ストップワード以外のワードとストップワードの両方で構成される句のいずれかを表します。
トークンno_lexは、ストップワードでもなく、索引が作成されるワードでもない、単一文字または文字列を表します。たとえば、トークンno_lexの例として単独の文字+があります。
ストップワード式の列で問合せ式を示している場合、変換後の式no_tokenは、この問合せを入力するとヒットが戻らないことを意味します。
ストップワード式の列で複数の演算子のある問合せ式のコンポーネントを示している場合、変換後の式no_tokenは、no_tokenの値が変換後の式の次のステップに渡されることを意味します。
ストップワード式の列でオペランドとしてno_tokenが指定されている変換は中間の変換です(ここでは、no_tokenが前の変換の結果です)。この中間の変換は、元の問合せ式に少なくとも1つのストップワードおよび複数の演算子がある場合に適用されます。
たとえば、次のコンパウンド問合せ式について考えます。
'(this NOT dog) AND cat'
この式でのストップワードがthisのみの場合、Oracle Textは次の順に次の変換を適用します。
stopword NOT non-stopword => no_token
no_token AND non_stopword => non_stopword
結果式は次のとおりです。
'cat'
H.2 句問合せのストップワードについて
句問合せで使用する場合、ワードがストップワードかどうかに関係なく、ストップワードは1つのワードと一致します。たとえば、「in」および「to」がストップワードで、「throughout」がそうではない場合、問合せ「hiking in California」は次の句と一致します。
-
hiking in California
-
hiking to California
-
hiking throughout California
H.3 ワード変換
ストップワード式 | 変換後の式 |
---|---|
ストップワード |
no_token |
no_lex |
no_token |
最初の変換は、問合せ式でのストップワードまたはストップワードのみからなる句自体はヒットを戻さないことを意味します。
2番目の変換は、+のように索引が作成されない問合せ語句は、ヒットを戻さないことを表しています。
H.4 AND変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword AND stopword |
non_stopword |
non_stopword AND no_token |
non_stopword |
stopword AND non_stopword |
non_stopword |
no_token AND non_stopword |
non_stopword |
stopword AND stopword |
no_token |
no_token AND stopword |
no_token |
stopword AND no_token |
no_token |
no_token AND no_token |
no_token |
H.5 OR変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword OR stopword |
non_stopword |
non_stopword OR no_token |
non_stopword |
stopword OR non_stopword |
non_stopword |
no_token OR non_stopword |
non_stopword |
stopword OR stopword |
no_token |
no_token OR stopword |
no_token |
stopword OR no_token |
no_token |
no_token OR no_token |
no_token |
H.6 ACCUMulate変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword ACCUM stopword |
non_stopword |
non_stopword ACCUM no_token |
non_stopword |
stopword ACCUM non_stopword |
non_stopword |
no_token ACCUM non_stopword |
non_stopword |
stopword ACCUM stopword |
no_token |
no_token ACCUM stopword |
no_token |
stopword ACCUM no_token |
no_token |
no_token ACCUM no_token |
no_token |
H.7 MINUS変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword MINUS stopword |
non_stopword |
non_stopword MINUS no_token |
non_stopword |
stopword MINUS non_stopword |
no_token |
no_token MINUS non_stopword |
no_token |
stopword MINUS stopword |
no_token |
no_token MINUS stopword |
no_token |
stopword MINUS no_token |
no_token |
no_token MINUS no_token |
no_token |
H.8 MNOT変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword MNOT stopword |
non_stopword |
non_stopword MNOT no_token |
non_stopword |
stopword MNOT non_stopword |
no_token |
no_token MNOT non_stopword |
no_token |
stopword MNOT stopword |
no_token |
no_token MNOT stopword |
no_token |
stopword MNOT no_token |
no_token |
no_token MNOT no_token |
no_token |
H.9 NOT変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword NOT stopword |
non_stopword |
non_stopword NOT no_token |
non_stopword |
stopword NOT non_stopword |
no_token |
no_token NOT non_stopword |
no_token |
stopword NOT stopword |
no_token |
no_token NOT stopword |
no_token |
stopword NOT no_token |
no_token |
no_token NOT no_token |
no_token |
H.10 EQUIValence変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword EQUIV stopword |
non_stopword |
non_stopword EQUIV no_token |
non_stopword |
stopword EQUIV non_stopword |
non_stopword |
no_token EQUIV non_stopword |
non_stopword |
stopword EQUIV stopword |
no_token |
no_token EQUIV stopword |
no_token |
stopword EQUIV no_token |
no_token |
no_token EQUIV no_token |
no_token |
ノート:
問合せ実行計画を使用する場合は、すべてのEQUIVALENCE変換がEXPLAIN
表に表示されるわけではありません。
H.11 NEAR変換
ストップワード式 | 変換後の式 |
---|---|
non_stopword NEAR stopword |
non_stopword |
non_stopword NEAR no_token |
non_stopword |
stopword NEAR non_stopword |
non_stopword |
no_token NEAR non_stopword |
non_stopword |
stopword NEAR stopword |
no_token |
no_token NEAR stopword |
no_token |
stopword NEAR no_token |
no_token |
no_token NEAR no_token |
no_token |