full text search indexing

  • Hi all,

    I have problem with indexing on a table that contains some tags for example :

    CREATE TABLE tblTest

    (

    stfId INT IDENTITY(1, 1)

    NOT NULL ,

    stfName NVARCHAR(50) NOT NULL ,

    stfTag NVARCHAR(MAX)

    )

    GO

    ALTER TABLE dbo.tblTest ADD CONSTRAINT

    PK_tblTest PRIMARY KEY CLUSTERED

    (

    stfId

    ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    GO

    CREATE FULLTEXT CATALOG [test]WITH ACCENT_SENSITIVITY = ON

    GO

    CREATE FULLTEXT INDEX ON [dbo].[tblTest] KEY INDEX [PK_tblTest] ON ([test], FILEGROUP [PRIMARY]) WITH (CHANGE_TRACKING AUTO)

    GO

    ALTER FULLTEXT INDEX ON [dbo].[tblTest] ADD ([stfTag])

    GO

    ALTER FULLTEXT INDEX ON [dbo].[tblTest] ENABLE

    GO

    INSERT INTO dbo.tblTest ( stfName, stfTag)

    VALUES('john book','book books john book')

    GO

    INSERT INTO dbo.tblTest ( stfName, stfTag)

    VALUES('us Dollar','us Dollar')

    GO

    INSERT INTO dbo.tblTest ( stfName, stfTag)

    VALUES('us Dollar to canada dollar','"us Dollar to Canada dollar"')

    GO

    I want to index a complete sentence : "us Dollar to Canada dollar" because when I run this query :

    SELECT *

    FROM dbo.tblTest

    WHERE CONTAINS(stfTag,'"dollar"')

    I don't want to show 'us Dollar to canada dollar' in results ! How can I do this ?

  • any one here !

  • farax_x (10/14/2011)


    any one here !

    Have patience. Professionals here on SQL Central manage to find some time from their busy schedule to share knowledge. It’s not a Customer Support portal where you log a ticket & SLA timer starts.

    I am sure somebody will respond to you shortly.

  • I know pal, but I just want to get my post up πŸ˜›

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply