SQL server-uses the word breaker feature in SQL Server to implement field keyword extraction (the ability of word segmentation is very low, use with caution)

Source: Internet
Author: User

the Create full-text indexStart the service

In the SQL Server Configuration Management tool, locate the 'SQL Full-text Filter Daemon Launcher ' service that is started with the local user.

Create a full-text catalog

Open the database you want to create a full-text catalog-storage-Full-text catalog-right-click New full-text catalog

Create a full-text catalog with a statement

[Fd_housesearch]onDEFAULT[dbo]      

You can also create a full-text catalog from a stored procedure, and you can specify the location on the disk where the full-text catalog file resides, as follows:

Use[Pratice]GO--How to create a full-text index 1:-------------Open Full-text indexing and create full-text indexing directory full-text catalog creation path is D:\fulltext--Fulltext_pratice is your own custom full-text catalog nameExec[Sys].[Sp_fulltext_database]@action=‘Enable‘--varchar (20)--If a full-text catalog already exists in the database Fulltext_pratice to drop it first--EXEC [SYS]. [sp_fulltext_catalog] @ftcat = ' fulltext_pratice ',--sysname--@action = ' drop '--varchar (20)Exec[Sys].[Sp_fulltext_catalog]@ftcat=‘Fulltext_pratice‘,-- sysname  @action =  " Span style= "color: #ff0000; line-height:1.5; " >create--< Span style= "color: #008080; line-height:1.5; " > varchar (
                                                    
                                                      @path 
                                                     = n "d:\fulltext - - nvarchar (101)       
                                                    

Of course, when you use SSMs to create a full-text catalog, you'll also have an option to choose a directory location where the full-text index resides.

To create a full-text index

Right-click the table that needs to create the full-text index-full-text index-Define full-text index

1. The full-text index must have a unique non-null index, where the primary key is selected.

2. Select the column that requires full-text search, and select the word breaker language, because this field is mainly used to store Chinese, so it is also selected in Simplified Chinese.

Word breaker: The word breaker is used for linguistic analysis of full-text search data, to find the boundaries of words, that is, how to break up a very long piece of content into everyday words or characters. For example, "full-Text Search", may be broken into "full text", "Search", "full", "text", "search", "rope" and other words and phrases in line with the normal Chinese habits.

3. Select the Tracking method, where automatic tracking is selected, and the index is automatically populated when the table changes.

4. Select the full-text catalog, index file, non-indexed Word table

Non-indexed Word table: In the hyphenation just said how to break the word, here is the word is saved in a table, the place to select the system default Stoplist.

---query the hyphenation table from  sys.dm_fts_index_keywords (db_id (object_id (")  ) 
"

From the fourth step of the link:

From Sys.dm_fts_index_keywords (db_id (object_id (' target table '))  

Here is my word breaker effect:

SQL server-uses the word breaker feature in SQL Server to implement field keyword extraction (the ability of word segmentation is very low, use with caution)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.