Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text search index?
Message
From
27/07/2007 13:08:13
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
21/07/2007 11:22:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01242029
Message ID:
01244168
Views:
11
Cetin,

Thanks, this is exactly what I was looking for. I was successfully able to create my fulltext index and perform text searches on my SQL Server table.

Another question I have is, it appears that when I add text to an existing record or add a new record and text, the index does not seem to get updated because my query does not find this new data.

Should my fulltext index always update itself automatically? Or do I have to perform a function to make this happen?

Thanks,

Jerry





>>We have some Visual Foxpro tables that we have been converting to SQL Server tables. A few of these VFP tables have a PHD index on them that we use for text searching.
>>
>>Is there anyway of creating a text search index on a SQL Server table? Is there something built into SQl Server that allows you to text search? Or a third party product.
>>
>>Thanks,
>>
>>Jerry
>
>Jerry,
>You can use fulltext catalogs and indexes. Their creation differ between version (well SQL2000 ways still work but there is a warning that they're depreceated and might be removed in future versions). Assuming 2000:
>
>-Enable fulltext searching on you database
>
>exec sp_fulltext_database 'enable'
>
>-Create a catalog for fulltext
>
>exec sp_fulltext_catalog 'myCatalog', 'create'
>
>-Create fulltext for table
>
>exec sp_fulltext_table 'myTable', 'create', 'myCatalog', 'myPKIndexName'
>
>-Add columns for fulltext indexing
>
>exec sp_fulltext_column 'myTable', 'myColumn', 'add'
>
>-Activate and populate the index
>exec sp_fulltext_table 'myTable', 'activate'
>exec sp_fulltext_table 'myTable', 'start_full'
>
>Then your table is ready for fulltext searching. ie: Wth Northwind:
>
>use Northwind
>go
>exec sp_fulltext_database 'enable'
>go
>
>exec sp_fulltext_catalog 'myCatalog','create'
>exec sp_fulltext_table 'Customers', 'create', 'myCatalog', 'PK_Customers'
>exec sp_fulltext_column 'Customers', 'companyName', 'add'
>exec sp_fulltext_table 'Customers', 'activate'
>exec sp_fulltext_table 'Customers', 'start_full'
>
>
>Test selecting with this index:
>
>
>select * from customers where contains(companyNAme, 'food or box')
>select * from customers where contains(companyNAme, 'food near great')
>
etc
>Cetin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform