How to make a freetext search.
What changes we have to do with our database table .
Explain it Step by Step
Rahul Saxena
[email protected]
How to make a freetext search.
What changes we have to do with our database table .
Explain it Step by Step
Rahul Saxena
[email protected]
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
BYPsoftPosted Aug 23, 2007, 6:01 AM
Why you are re-posting my post? What is meaning of this?
san jaPosted Aug 23, 2007, 2:29 AM
You can do FULLTEXT search by enabling option from databse. you have to just right click on database and click on enable FULLTEXT after that you have to start fulltext index.
or u want it for perticular table u can do that by following.
Your table where you want to use full text search should have unique index on one column.
CREATE UNIQUE INDEX ft_yourindex ON your_schema].[your_table]([column_name]);
Create default full text catalog
CREATE FULLTEXT CATALOG [some_name] AS DEFAULT;
Create full text index finally
CREATE FULLTEXT INDEX ON [your_schema].[your_table_containing_unique_index_on_column]([any_column_from_that_table]) KEY INDEX ft_yourindex;
Finally use that index
SELECT [your_columns] FROM [your_table] WHERE CONTAINS ([full_text_index_column],'lookup_keyword');
BYPsoftPosted Aug 22, 2007, 4:37 AM
here are steps required to enable and use fulltext search on SQL Server:
- Enable fulltext search on your database by running
- EXEC sp_fulltext_database 'enable'
- It is possible also to use SQL Server Management studio, select your database, choose Properties and on Files check "Use Full text indexing";
- Your table where you want to use full text search should have unique index on one column.
- CREATE UNIQUE INDEX ft_yourindex ON [your_schema].[your_table]([column_name]);
- Create default full text catalog
- CREATE FULLTEXT CATALOG [some_name] AS DEFAULT;
- Create full text index finally
- CREATE FULLTEXT INDEX ON [your_schema].[your_table_containing_unique_index_on_column]([any_column_from_that_table]) KEY INDEX ft_yourindex;
- Finally use that index
- SELECT [your_columns] FROM [your_table] WHERE CONTAINS ([full_text_index_column],'lookup_keyword');
Hope it is clear now.