Full text search application (1)

zhaozj2021-02-11  199

Basic knowledge 1. There is no full text retrieval in the Desktop version of SQL Server7. 2. A table can only have a full text search. 3. The retrieved table must have a single column unique index. 4. The full text index is stored in the file system, not in the database. 5. The process of updating the full text index is more than a regular index, and it is not as updated by the database system as a regular index. 6. Fully text index is included in full text catalog (full-text catalog), each database can contain one or more directories, but a directory cannot belong to multiple databases. 7. Full text search can only be created on real tables, cannot be a view, system table, and temporary table. 8. The full text search will ignore some noise words, such as A, THE, AND, Chinese 'and', 'Yes', etc. in English. 9. If you contain NOISE Words in the query, an error is raised and these Noise Words should be removed in the application. Start full text search service. Method A: Open the Support Services folder in the Enterprise Manager, select Start in the Right-click menu of Full-Text Search. Method B: Select Microsoft Search in the Services drop-down list of SQL Server Service Manager and click the Start / Continue button. Method C: Use NET Start Mssearch command line mode. Use full text search patriants (full-text indexing wizard). Step1. Select the retrieved database, in the Tools menu, select Full-Text Indexing, enter the Welcome screen, click Next. Step2. Select the retrieved table and click Next. Step3. Select a unique index and click Next. STEP4. Select the column of the index, click Add, which is displayed in the right column. Click Next. STEP5. Select the directory (select the existing directory, or create a new directory), click Next. STEP6. Select or create a population schedule, click Next. Step7. Click Finish. Use SQL-DMO (Take VB as an example) Step1. Select Microsoft SqldMo Object Library in the project's reference. Step2. Create a SQLServer object. Dim objsql assebjsqldmo.sqlserverobjsql.connect "localhost", "sa", "" STEP3. Create a new directory and add it to the indexed database directory. Dim objCatalog As New SQLDMO.FullTextCatalog 'pubs database objSQL.Databases make full-text search ( "pubs"). EnableFullTextCatalogs' Create a new directory objCatalog.Name = "ftcPubsTest"' of the new directory to the directory set objSQL.Databases ("PUBS"). FullTextCatalogs.add Objcatalogstep4. Create a full text index on the table.

Dim objTable As New SQLDMO.Table 'specified table being indexed Set objTable = objSQL.Databases ( "pubs"). Tables ( "authors")' specify a directory name and a unique index name objTable.FullTextCatalogName = "ftcPubsTest" objTable.UniqueIndexForFullText = " UPKCL_auidind "objTable.FullTextIndex = True 'specified column objTable.Columns indexed (" au_lname "). FullTextIndex = TrueobjTable.Columns (" au_fname "). FullTextIndex = True' on the activated text indexing table objTable.FullTextIndexActive = Truestep5 start the full-text Catalog objCatalog.Start SQLDMOFullText_Full use stored procedures step1. the pubs for the full-text retrieval database uSE Pubsgosp_fulltext_database 'enable'step2. create a new directory sp_fulltext_catalog' ftcPubsTest ',' create'step3. specifies the index table sp_fulltext_table ' authors ',' create ',' ftcPubsTest ',' UPKCL_auidind'step4. specifying indexed column sp_fulltext_column 'authors', 'au_lname', 'add'sp_fulltext_column' authors ',' au_fname ',' add'step5. it active The full text index sp_fulltext_table 'authors', 'activate'step6. Start full text directory sp_fulltext_catalog' ftcpubstest ',' start_full'http://www.9cbs.net/develop/read_article.asp? Id = 8894

http://www.9cbs.net/develop/read_article.asp?id=8894

转载请注明原文地址:https://www.9cbs.com/read-4208.html

New Post(0)