Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 03b6ead

Browse files
authored
Merge pull request #14347 from cawrites/update-fulltext-column
Update column name to reflect current Product.Document Table
2 parents 4a065a5 + cb582a7 commit 03b6ead

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

docs/relational-databases/search/create-and-manage-full-text-indexes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Create and Manage Full-Text Indexes | Microsoft Docs"
33
ms.custom: ""
4-
ms.date: "03/14/2017"
4+
ms.date: "03/31/2020"
55
ms.prod: sql
66
ms.prod_service: "search, sql-database"
77
ms.technology: search
@@ -111,15 +111,15 @@ SELECT INDEXPROPERTY( OBJECT_ID('table_name'), 'index_name', 'IsFulltextKey' );
111111

112112
**Example**
113113

114-
The following example inquires whether the `PK_Document_DocumentID` index is used to enforce the uniqueness of the full-text key column, as follows:
114+
The following example inquires whether the `PK_Document_DocumentNode` index is used to enforce the uniqueness of the full-text key column, as follows:
115115

116116
```sql
117117
USE AdventureWorks
118118
GO
119-
SELECT INDEXPROPERTY ( OBJECT_ID('Production.Document'), 'PK_Document_DocumentID', 'IsFulltextKey' )
119+
SELECT INDEXPROPERTY ( OBJECT_ID('Production.Document'), 'PK_Document_DocumentNode', 'IsFulltextKey' )
120120
```
121121

122-
This example returns 1 if the `PK_Document_DocumentID` index is used to enforce uniqueness of the full-text key column. Otherwise, it returns 0 or NULL. NULL implies you are using an invalid index name, the index name does not correspond to the table, the table does not exist, or so forth.
122+
This example returns 1 if the `PK_Document_DocumentNode` index is used to enforce uniqueness of the full-text key column. Otherwise, it returns 0 or NULL. NULL implies you are using an invalid index name, the index name does not correspond to the table, the table does not exist, or so forth.
123123

124124
### Find the identifier of the full-text key column
125125

@@ -135,7 +135,7 @@ SELECT OBJECTPROPERTYEX(OBJECT_ID( 'table_name'), 'TableFulltextKeyColumn' ) AS
135135

136136
The following example returns the identifier of the full-text key column or NULL. NULL implies that you are using an invalid index name, the index name does not correspond to the table, the table does not exist, or so forth.
137137

138-
```sql
138+
```sql
139139
USE AdventureWorks;
140140
GO
141141
SELECT OBJECTPROPERTYEX(OBJECT_ID('Production.Document'), 'TableFulltextKeyColumn');
@@ -156,7 +156,7 @@ SELECT @key_column AS 'Unique Key Column';
156156
GO
157157
```
158158

159-
This example returns a result set column named `Unique Key Column`, which displays a single row containing the name of the unique key column of the Document table, DocumentID. Note that if this query contained an invalid index name, the index name did not correspond to the table, the table did not exist, and so forth, it would return NULL.
159+
This example returns a result set column named `Unique Key Column`, which displays a single row containing the name of the unique key column of the Document table, DocumentNode. Note that if this query contained an invalid index name, the index name did not correspond to the table, the table did not exist, and so forth, it would return NULL.
160160

161161
## Index varbinary(max) and xml columns
162162
If a **varbinary(max)**, **varbinary**, or **xml** column is full-text indexed, it can be queried using the full-text predicates (CONTAINS and FREETEXT) and functions (CONTAINSTABLE and FREETEXTTABLE), like any other full-text indexed column.

docs/relational-databases/search/get-started-with-full-text-search.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Get Started with Full-Text Search | Microsoft Docs"
3-
ms.date: "08/22/2016"
3+
ms.date: "03/31/2020"
44
ms.prod: sql
55
ms.prod_service: "search, sql-database"
66
ms.technology: search
@@ -49,10 +49,17 @@ To set up full-text search by using a wizard, see [Use the Full-Text Indexing Wi
4949
2. Before you can create a full-text index on the Document table, ensure that the table has a unique, single-column, non-nullable index. The following [CREATE INDEX](../../t-sql/statements/create-index-transact-sql.md) statement creates a unique index, `ui_ukDoc`, on the DocumentID column of the Document table:
5050

5151
```sql
52-
CREATE UNIQUE INDEX ui_ukDoc ON Production.Document(DocumentID);
52+
CREATE UNIQUE INDEX ui_ukDoc ON Production.Document(DocumentNode);
5353
```
5454

55-
3. After you have a unique key, you can create a full-text index on the `Document` table by using the following [CREATE FULLTEXT INDEX](../../t-sql/statements/create-fulltext-index-transact-sql.md) statement.
55+
3. Drop the existing full-text index on the `Document` table by using the following [DROP FULLTEXT INDEX](../../t-sql/statements/drop-fulltext-index-transact-sql.md) statement.
56+
57+
```sql
58+
DROP FULLTEXT INDEX ON Production.Document
59+
GO
60+
```
61+
62+
4. After you have a unique key, you can create a full-text index on the `Document` table by using the following [CREATE FULLTEXT INDEX](../../t-sql/statements/create-fulltext-index-transact-sql.md) statement.
5663

5764
```sql
5865
CREATE FULLTEXT INDEX ON Production.Document
@@ -66,6 +73,8 @@ To set up full-text search by using a wizard, see [Use the Full-Text Indexing Wi
6673
GO
6774
6875
```
76+
77+
6978

7079
The TYPE COLUMN defined in this example specifies the type column in the table that contains the type of the document in each row of the column 'Document' (which is of binary type). The type column stores the user-supplied file extension - ".doc", ".xls", and so forth - of the document in a given row. The Full-Text Engine uses the file extension in a given row to invoke the correct filter to use for parsing the data in that row. After the filter has parsed the binary data of the row, the specified word breaker parses the content. (In this example, the word breaker for British English is used.) For more information, see [Configure and Manage Filters for Search](../../relational-databases/search/configure-and-manage-filters-for-search.md).
7180

0 commit comments

Comments
 (0)