Some knowledge of SQL Server 2008 full-text search

Some knowledge of SQL Server 2008 full-text search

I. read a few good posts,

SQL Server 2008 Full-Text Search Overview (SQL Server 2008 full-text search Overview) http://www.cnblogs.com/galaxyyao/archive/2009/02/13/1390139.html

Full-text indexing http://www.cnblogs.com/liulun/articles/1368655.html


First copy the paragraph:

Q: Why Full-text search (full text search)?
A: Because the query to the text of the slow speed (not recommended to build in the text index is the truth)
Q: and 2005 different?
A; of course there are differences, have added a former name of the integrated. 05 years ago a separate index file and engine 08 is integrated into the filegroup gone.
Q: What is the principle?
A: based on keywords (keyword)
Q: and the general index of the relationship?
A: The purpose is to improve query speed. Many features and full-text indexing Index (Index) as
    full-text search using semantic search (which sounds very advanced technology it), but also for binary files.
Q: dim?
A: To give a simple example, the paper found, fuzzy matching, but also a large number of fast row rank.

 

Second point of view on some stuff and then go msdn: 

Full-Text Indexing Overview
http://msdn.microsoft.com/zh-cn/library/cc879306.aspx

 

Some copy the following quotation as follows:

1. In SQL Server 2008, Full-Text Engine is fully integrated into the database engine. Full-Text Engine is located in the SQL Server process (sqlservr.exe), rather than in a separate process (msftesql.exe) in. Through the Full-Text Engine integrated into the database engine, improved full manageability, query optimization of the mix and improved overall performance. From: http://msdn.microsoft.com/zh-cn/library/ms142587.aspx

2. The steps for creating a full-text search, too lazy shots, and see people has been completed, a direct reference to it, but the second page and my local is not the same, I can not be here right full text retrieval built directly on the table the default gave grayed out, only in storage in the full-text index catalog catalog in the indexing.   http://www.sql-server-performance.com/2010/full-text-search-2008/

3. Start full-text search catalog that should correspond to a directory on your hard drive, and directory concepts locune similar, but in fact wrong, Starting with SQL Server 2008, full-text catalog is a virtual object and does not belong to any group of files. Full-text catalog is a logical concept of a set of full-text indexing. Source from:
http://msdn.microsoft.com/zh-cn/library/ms142497.aspx

4. You can only create full-text index for table or indexed view, can not create a full-text index to normal view.

It is a special type of full-text index of the index-based functional marker, generated by the text engine and maintenance. To create a full-text search on a table or view, that table or view must have a unique, single-column index is not a Null. Full-Text Engine requires this unique index to map each row in the table to a unique compressible key. Full-text index may include char, varchar, nchar, nvarchar, text, ntext, image, xml, varbinary and varbinary (max) column.

5. To create a full-text index in Table A, there is a premise that you must already have at least one unique index on the table A, that is, the table on A if no index, never expect to create full-text index on a table A .

6.SQL Server 2008, full-text index size only by the computer running SQL Server instances available memory resource limits. http://msdn.microsoft.com/zh-cn/library/cc879306.aspx

7. Query multiple columns (full text search)
by specifying a list of columns to search, you can use the CONTAINS predicate to query multiple columns. These columns must be from the same table.

用括号, SELECT Name, Color FROM Production.Product WHERE CONTAINS((Name, Color), 'Red');

或者用*号, SELECT Name, Color FROM Production.Product WHERE CONTAINS(*, 'Red');

Source from: http://msdn.microsoft.com/zh-cn/library/ms142488.aspx 

9. queries a plurality of columns of a plurality of tables

只能 CONTAINS or CONTAINS了, 如 WHERE CONTAINS(t1.Name, 'Red') or CONTAINS(t2.Name, 'Red');

10. The full-text query performance optimization

Use ALTER FULLTEXT CATALOG REORGANIZE to reorganize the full-text catalog.

ALTER FULLTEXT CATALOG customer REBUILD WITH ACCENT_SENSITIVITY=OFF

More direct look at this right: http://msdn.microsoft.com/zh-cn/library/cc879244.aspx

11. The Executive prefix search http://msdn.microsoft.com/zh-cn/library/ms142492.aspx

You can use full-text search to search with the prefix specified word or phrase.

When performing a prefix search will return all items that contain the column beginning with the specified prefix text. For example, to search for all the rows contain the prefix top (e.g. topple, topping and top itself), the query is as follows:

SELECT * FROM Product WHERE CONTAINS (ProductName , ' "auto *"');
will return all the asterisk (*) before the specified text matches the text.

Note: If you do not add double quotation marks around the text and asterisks (such as CONTAINS (DESCRIPTION, 'top *')), the full-text search will not put an asterisk as a wildcard.

When the prefix term is a phrase, each of the marking of the phrase are seen as a separate prefix words. Returns all rows with words beginning with the prefix these words. For example, the prefix term "light bread *" will find rows with "light breaded", "lightly breaded" or "light bread" of the text, but will not return "Lightly toasted bread".

 

Reproduced in: https: //www.cnblogs.com/flysun0311/archive/2011/11/25/2262868.html

Guess you like

Origin blog.csdn.net/weixin_33701617/article/details/93444239