October 14, 2011 at 7:11 am
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 ?
October 14, 2011 at 9:50 pm
any one here !
October 15, 2011 at 12:34 am
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.
October 15, 2011 at 1:52 am
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