前回、トレースフラグを検証しましたが、SP2 の中でもう一つ興味をそそられるものがありました。ryuchan.hatenablog.com
https://support.microsoft.com/en-us/kb/2958429
Improved full text index diagnostics
In some cases it may be difficult to understand how results of certain full text queries are returned. The full text search subsystem interacts with external word-breakers and stop-lists, and as a result of this interaction the positional information for the keywords in a document may be different from what is observed in the actual text. This is highly relevant when doing 'phrase' or 'NEAR' searches since the delta between the words is used in internal calculations to find matching documents.
In SQL Server 2012 SP2 a new Dynamic Management Function (DMF) was added to provide access to positioning information for keywords indexed in a document. The new DMF is similar to existing DMF sys.dm_fts_index_keywords_by_document, and has the following syntax:
sys. dm_fts_index_keywords_position_by_document
(
DB_ID('database_name'), OBJECT_ID('table_name')
)
Instead of occurrence count, it returns information about each occurrence and its position in the indexed document.
This information can be used to look at the mapping between the text and the internal index which will show the difference in delta, if any, for the search phrase. This can help understanding results from phrase search.
キーワードの文書内での出現位置が確認できるんですね。これ既に稼働しているシステムに適用した場合、きちんと動作するんだろうか?フルテキストインデックスを再作成しないと動作しないんですかね。(多分、再作成なんだろうなぁ。)あ、SQL Server 2012 SP2 の環境また消しちゃった。ちょっと作るの面倒臭い。なので検証はなしです。時間があったら、覚えてたら、検証してみます。
※全文検索の SQL Server 本、最近出てないですね。
Pro Full-Text Search in SQL Server 2008
- 作者: Hilary Cotter,Michael Coles
- 出版社/メーカー: Apress
- 発売日: 2008/12/02
- メディア: ペーパーバック
- クリック: 4回
- この商品を含むブログを見る