Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a fulltext index on a view in SQL Server 2005
    text
    copied!<p>I am having troubles creating a fulltext index on a view in SQL Server 2005. Reviewing the documentation I have not found the problem. The error message I receive is: "'Id' is not a valid index to enforce a full-text search key. A full-text search key must be a unique, non-nullable, single-column index which is not offline, is not defined on a non-deterministic or imprecise nonpersisted computed column, and has maximum size of 900 bytes. Choose another index for the full-text key." I have been able to verify every requirement in the errorstring except the "offline" requirement, where I don't really know what that means. I'm pretty darn sure its not offline though.</p> <p>I have the script to create the target table, view, and index below. I do not really need a view in the sample below, it is simplified as I try to isolate the issue.</p> <pre> DROP VIEW [dbo].[ProductSearchView] DROP TABLE [dbo].[Product2] GO SET NUMERIC_ROUNDABORT OFF; SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON; GO CREATE TABLE [dbo].[Product2]( [Id] [bigint] NOT NULL, [Description] [nvarchar](max) NULL, CONSTRAINT [PK_Product2] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] GO CREATE VIEW [dbo].[ProductSearchView] WITH SCHEMABINDING AS SELECT P.Id AS Id, P.Description AS Field FROM [dbo].Product2 AS P GO -- this index may be overkill given the PK is set... CREATE UNIQUE CLUSTERED INDEX PK_ProductSearchView ON [dbo].[ProductSearchView](Id) GO -- This is the command that fails CREATE FULLTEXT INDEX ON [dbo].[ProductSearchView](Id, Field) KEY INDEX Id ON FullText WITH CHANGE_TRACKING AUTO; GO </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload