Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / September 2007

Tip: Looking for answers? Try searching our database.

Get the FTS index keywords list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
carignankg@gmail.com - 05 Sep 2007 15:20 GMT
Is there a way to get the Index keywords list?

here is what i need to do

Our database contains a relative small amount of documents so we need
an application that shows ListBox of keywords sorted by index
frequency.  The user selected on or many keywords from the ListBox
then launch the search.
Hilary Cotter - 05 Sep 2007 19:44 GMT
You can try something like this here:

USE [MyDatabase]
GO
declare test cursor for select PK from TableIWishToShread
open test
declare @PK int
declare @content varchar(max)
fetch next from test into @PK
while @@fetch_status=0
begin
select @content=TextData from TableIWishToShread where PK=@PK
insert into tblwords (word)
select *from dbo.ShredMe(@content)
where name not in (select word from tblwords)
fetch next from test into @PK
end
close test
deallocate test

the below script is used to build the inverted file index.

CREATE TABLE tblWordList(SubdocumentID int, WordID int, Position int)
Create table tblWords(WordID int not null identity primary key, Word
varchar(max),Little int)

Here is shredme:
USE [SonarProd]

GO

/****** Object: UserDefinedFunction [dbo].[ShredMe] Script Date: 09/05/2007
14:40:40 ******/

CREATE FUNCTION [dbo].[ShredMe](@postDescription [nvarchar](max))

RETURNS TABLE (

[Name] [nvarchar](200) NULL

) WITH EXECUTE AS CALLER

AS

EXTERNAL NAME [GoldShredder].[UserDefinedFunctions].[ShredMe]

GO

EXEC sys.sp_addextendedproperty @name=N'AutoDeployed', @value=N'yes' ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'FUNCTION',@level1name=N'ShredMe'

GO

EXEC sys.sp_addextendedproperty @name=N'SqlAssemblyFile',
@value=N'ShredMe.cs' , @level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'FUNCTION',@level1name=N'ShredMe'

GO

EXEC sys.sp_addextendedproperty @name=N'SqlAssemblyFileLine', @value=22 ,
@level0type=N'SCHEMA',@level0name=N'dbo',
@level1type=N'FUNCTION',@level1name=N'ShredMe'

Here is the assembly. http://www.indexserverfaq.com/goldshredder.dll

Signature

RelevantNoise.com - dedicated to mining blogs for business intelligence.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

> Is there a way to get the Index keywords list?
>
[quoted text clipped - 4 lines]
> frequency.  The user selected on or many keywords from the ListBox
> then launch the search.
Carignan - 06 Sep 2007 18:32 GMT
Great tks alot

but when i run the CREATE FUNCTION....

i'm getting this:
Msg 6208, Level 16, State 1, Procedure ShredMe, Line 1
CREATE FUNCTION failed because the parameter count for the FillRow
method should be one more than the SQL declaration for the table
valued CLR function.

> You can try something like this here:
>
[quoted text clipped - 79 lines]
> > frequency.  The user selected on or many keywords from the ListBox
> > then launch the search.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.