Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Full Text

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Nov 21, 2003
4,772
US
So I must be doing something wrong.
I am trying to set up Full Text search on a database with a few hundred thousand records.
I have created the catalog, defined the index using the wizard, selected the columns I wanted to be able to search on, and waited the hours to create the index.

When I do a query like this, however:
SELECT * FROM MyTableName WHERE FREETEXT(*,'GIRL SCOUTS')

I get 0 records.
I should be getting a crapload of records.

I've also tried CONTAINS(*,'GIRL') and still got nothing.

Any thoughts? I must be missing something simple and stupid.


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #2
Oh... SQL Server 2008 Enterprise... (I know that's going to be the first thing asked... lol)


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
I haven't used Full Text search, but is it possible your database is case sensitive and that is affecting the search? Have you tried:

SELECT * FROM MyTableName WHERE FREETEXT(*,'Girl Scouts')

-sqlbill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
  • Thread starter
  • Moderator
  • #4
It's all caps in the fields... and it *shouldn't* matter... that's kind of the idea behind full text search...
<sighs>
But I did try your suggestion with the same results.


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
What is the compatibility level for your database?

Code:
SELECT compatibility_level
FROM sys.databases
where name = 'YourDatabaseNameHere'


-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
  • Thread starter
  • Moderator
  • #6
80


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Compatibility level = SQL2000. I suggest you try changing it to something higher, if you can. I haven't seen any documentation that the compatibility level affects full text indexing, but you never know.

I did recently read documentation that full text searches are significantly different between SQL2005 and SQL2008.

Changing the compatibility level can affect other aspects of the server. In fact, it could cause certain things to fail completely. If you can, I would suggest that you backup your database, restore it to a new DB and then change the compatibility level of the restored DB to see if this makes any difference.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
  • Thread starter
  • Moderator
  • #8
Changed compatibility to 100
Rebuilt the index
Still no search results.
I don't get what I'm doing wrong. <Sigh>


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
What do you get when you run this?

Code:
SELECT SERVERPROPERTY('IsFullTextInstalled')
SELECT FULLTEXTSERVICEPROPERTY('ISFULLTEXTINSTALLED')

Ideally, both should return 1.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
  • Thread starter
  • Moderator
  • #10
Both returned 1.


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
  • Thread starter
  • Moderator
  • #11
And, magically, it started working.

*SMH*


Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top