Trying to set up Full Text Search for SQL Server Via Script

I have to set up SQL full Text Search by script (no GUI)
I have been looking on the internet but I cant find a answer that works for me.

I have a simple table (ive simplified it) below that i want to use Full Text Search on:

  • Sql alias not giving expected result with join
  • SQL Server: Normal Index vs. Fulltext Index
  • TSQL - Parse Execution Plan to determine columns to be returned by a stored procedure
  • “SQL command not properly ended” error from UPDATE query
  • SQL 2008 setting compatibility level
  • best way to “glue” columns together
  •      DownloadTable
         ID int primary key idenity,
         Title varchar(30),
         Description varchar(100),
         Category Varchar(100),
         URL varchar(100)
    

    this is what I have done

         /*Enable Full Text Search*/
         EXEC sp_fulltext_database enable
    
         /*Create Search Catalog*/
         CREATE FULLTEXT CATALOG MySearchCat
         WITH ACCENT_SENSITIVITY = ON
         AUTHORIZATION [dbo]
    
         /*Create Full Text Index
         CREATE FULLTEXT INDEX ON [dbo]. [DownloadTable]
         (Title ,Description)
         KEY INDEX iD ON [Test]
         WITH CHANGE_TRACKING AUTO
         GO
    

    this is where i get stuck? is the Key Index suppose to be from my Download Table and there for be download.id? or is it suppose to be on the search catalog? I cant just make up a name as it doesnt work? but I cant use ID either?

    One Solution collect form web for “Trying to set up Full Text Search for SQL Server Via Script”

    create table 
    DownloadTable (
         ID int identity, constraint pk_DownloadTable primary key (id),
         Title varchar(30),
         Description varchar(100),
         Category Varchar(100),
         URL varchar(100)
         )
     /*Create Search Catalog*/
         CREATE FULLTEXT CATALOG MySearchCat
         WITH ACCENT_SENSITIVITY = ON
         AUTHORIZATION [dbo]
    
    
         CREATE FULLTEXT INDEX ON [dbo]. [DownloadTable]
         (Title ,Description)
         KEY INDEX pk_DownloadTable ON MySearchCat
         WITH CHANGE_TRACKING AUTO
         GO
    
    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.