Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Full-text not findind obvious records

I have a column which has full-text. When I execute this:

select * FROM myTable WHERE CONTAINS(myTable.colDesc, '"word"')

OR

select * FROM myTable WHERE CONTAINS(myTable.colDesc, 'word')

It only finds one record. I have created multiple records with the word "word" in it and even created a duplicate record of the only record that is returned, however, still, only one record is returned. It's as if the records are not being added to the catalog. I also tried removing the catalog and the full-text attribute and adding it back. Still same result.

How do I fix this? :)
0
nightzeus
Asked:
nightzeus
  • 3
1 Solution
 
jim_munaCommented:
try this
select * FROM myTable WHERE myTable.colDesc like '%word%'
thanks
0
 
nightzeusAuthor Commented:
I tried that already and it works.
0
 
nightzeusAuthor Commented:
But, I need to use full-text searches
0
 
nightzeusAuthor Commented:
NEVERMIND, I figured it out.

I was using this:

EXEC sp_fulltext_catalog   'myCatalog','create'  
EXEC sp_fulltext_table     'myTable', 'create', 'myCatalog', 'PK_myTable'
EXEC sp_fulltext_column    'myTable', 'colDesc, 'add'
EXEC sp_fulltext_table     'myTable','activate'
EXEC sp_fulltext_catalog   'myCatalog', 'start_full'

But when I used this, everything started working:

CREATE FULLTEXT CATALOG myCatalog AS DEFAULT;
GO
CREATE FULLTEXT INDEX ON dbo.myTable(colDesc) KEY INDEX PK_myTable;
GO
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now