SQL Server 1: full-text search (1) This chapter introduces the full-text index under SQL Server 2008 R2, which can be used for character type columns (such as varchar and text) in data) index, and full-text search and query through the index. First, we will briefly introduce the differences between regular indexes and full-text indexes. For example, OK. Next we will use the stored procedure provided by SQL Server to create a full-text index. The specific steps are as follows: (1) start the full-text processing function of the database (sp_fulltext_datebase );
(2) create a full-text directory (sp_fulltext_catalog );
(3) register the table (sp_fulltext_table) that requires full-text indexing in the full-text directory );
(4) Name of the full-text search column in the table (sp_fulltext_column)
(5) create a full-text index for the table (sp_fulltext_table );
(6) Fill in the full-text index (sp_fulltext_catalog ).
Next, we will use an example to demonstrate it step by step:
SQL Server full-text search OK, now the full-text search SQL Server Code This part has been completed. In fact, in SQL Server 2008 R2, there is no need for the above Code to operate the stored procedure to create a full-text index. It comes' Full text catalogs' , We can create a full-text index manually (the implementation process is to call the stored procedure, but it is omitted here). First, find the directory storage-> full text catalogs, create a new full text catalog, such as opening it, and select the columns to be indexed in full text. After saving the column, you can perform full text search as shown in the preceding figure. This chapter introduces the full-text index under SQL Server 2008 R2. It can index character-type columns (such as varchar and text) in data and query full-text search through indexes. First, we will briefly introduce the differences between regular indexes and full-text indexes. For example, OK. Next we will use the stored procedure provided by SQL Server to create a full-text index. The specific steps are as follows: (1) start the full-text processing function of the database (sp_fulltext_datebase );
(2) create a full-text directory (sp_fulltext_catalog );
(3) register the table (sp_fulltext_table) that requires full-text indexing in the full-text directory );
(4) Name of the full-text search column in the table (sp_fulltext_column)
(5) create a full-text index for the table (sp_fulltext_table );
(6) Fill in the full-text index (sp_fulltext_catalog ).
Next, we will use an example to demonstrate it step by step:
SQL Server full-text search OK. Now the full-text search SQL server code has been completed. In fact, in SQL Server 2008 R2, there is no need for the above Code to operate the stored procedure to create a full-text index. It comes' Full text catalogs' , We can create a full-text index manually (the implementation process is to call the stored procedure, but it is omitted here). First, find the directory storage-> full text catalogs, create a new full text catalog, such as opening it, and select the columns to be indexed in full text. After saving the column, you can perform full text search as shown in the preceding figure.