全文検索では、単語の先頭部分を検索できる機能があります。これは「プレフィクス検索」と呼ばれます。プレフィクス検索を実行するには、検索するプレフィクスを指定した後に、アスタリスクを付けます。これは「プレフィクス単語」と呼ばれます。
CONTAINS 句のキーワードは、フレーズに含まれていないかぎり、プレフィクス検索では使用できません。
クエリ文字列に複数のプレフィクス単語 (フレーズ内のプレフィクス単語も含む) を指定することもできます (たとえば、'"shi* fab"'
など)。
次の例は、MarketingInformation テーブルを問い合わせて、プレフィクス shi で始まる項目を検索します。
SELECT ID, ct.score, Description FROM MarketingInformation CONTAINS ( MarketingInformation.Description, 'shi*' ) AS ct ORDER BY ct.score DESC; |
ID | score | Description |
---|---|---|
906 | 2.295363835537917 |
<html><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>Visor</title></head><body lang=EN-US><p><span style='font-size:10.0pt;font-family:Arial'>Lightweight 100% organically
grown cotton construction. 「Shi」elds against sun and precipitation. Metallic ions in the fibers inhibit bacterial growth, and help neutralize odor.</span></p></body></html>
|
901 | 1.6883275743936228 | <html><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252"><title>Tee 「Shi」rt</title></head><body lang=EN-US><p><span style='font-size:10.0pt;font-family:Arial'>We've improved the design of this perennial
favorite. A sleek and technical 「shi」rt built for the trail, track, or sidewalk. UPF rating of 50+.</span></p></body></html>
|
903 | 1.6336529491832605 | <html><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252"><title>Tee 「Shi」rt</title></head><body lang=EN-US><p><span style='font-size:10.0pt;font-family:Arial'>A sporty, casual 「shi」rt made of recycled water bottles. It will serve you equally well on trails or around town. The fabric has a wicking finish
to pull perspiration away from your skin.</span></p></body></html>
|
902 | 1.6181703448678983 | <html><head><meta http-equiv=Content-Type content="text/html; charset=windows-1252"><title>Tee 「Shi」rt</title></head><body lang=EN-US><p><span style='font-size:10.0pt;font-family:Arial'>This simple, sleek, and lightweight
technical 「shi」rt is designed for high-intensity workouts in hot and humid weather. The recycled polyester fabric is gentle on the earth
and soft against your skin.</span></p></body></html>
|
テキストインデックスで shield という単語が出現する頻度は shirt よりも低いため、ID 906 のスコアが最も高くなります。
![]() |
DocCommentXchange で意見交換できます
|
Copyright © 2013, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |