How to enable full text search on SQL Server database?


I have already created SQL Server database, but when I am trying to run a query that requires full-text search enabled database, it is not working and throwing error

Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'tblLocation' because it is not full-text indexed.

So, how can I enable full-text index to remove above error?


Asked by:- neena
0
: 5668 At:- 6/23/2021 12:11:12 PM
SQL Sql-server enable full-text indexing







1 Answers
profileImage Answered by:- vikas_jk

Before enabling Full-Index search on a database table, you must have installed Full-Text search feature on SQL Server, if you think you haven't installed it, you can follow below steps

  • On the Microsoft Windows Server system open the Control Panel > Programs and Features.
  • Locate and select/highlight the Microsoft SQL Server version.
  • Click Change.
  • The installation wizard will open and choose Add / Modify.
  • Click Next until the Feature Selection dialog
  • Select the SQL Full-Text Search feature and install it.

Once you have installed SQL Full-Text Search feature, you can follow this step to enable or disable Full-Text indexing on Particular table of database

  • Expand the server group, expand Databases, and expand the database that contains the table you want to enable for full-text indexing.
  • Expand Tables, and right-click the table that you want to disable or re-enable for full-text indexing.
  • Select Full-Text index, and then click Enable Full-Text index or Disable Full-Text index. (If you haven't defined Full-Text Index on the table, you may have to do that first)
    define-full-text-index-sql-server-min.png

To Enable a database for full-text indexing, you can use below sample query

USE Northwind
EXEC sp_fulltext_database 'enable'

Where 'NorthWind' is database name.

 

2
At:- 6/23/2021 3:29:51 PM
Thanks, I had Full-Text already installed on SQL Server, so defined Full-text on table and it worked as needed. 0
By : neena - at :- 6/24/2021 11:01:56 AM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use