Page 1 of 1

Full Text search not working...

Posted: Wed Jul 20, 2005 11:09 am
by dardsemail
Hi,

I am trying to conduct a full text search on a field in my DB.

The Query is structured as such:

Code: Select all

SELECT * FROM helpsources_tb WHERE MATCH (description) AGAINST ('test')
I have set up the 'description' field with a FULL TEXT index.

I have added a record with the value 'This is a test.' to the table.

When I search using the above query, I get 0 rows returned.

I'm perplexed as to why this isn't working. Any suggestions for troubleshooting?

Thanks!

Posted: Wed Jul 20, 2005 12:27 pm
by timvw
as the manual says... if there are too many positive records (i believe a 50% treshold) no records will be returned at all...

Posted: Wed Jul 20, 2005 1:46 pm
by dardsemail
Ah... very interesting. I hadn't seen that - thanks for the head's up.

I'll try and add a couple more records and see what happens.

Thanks again!

Posted: Wed Jul 20, 2005 1:59 pm
by dardsemail
I added some more rows with the following descriptions:

This is a test.
yet another.
doing another.
one more time
let's see what

When I search on 'another' I don't get anything. In fact, the only search that gives me any results is the search on 'test'.

Very strange... I can't seem to get any other results on any other searches for any of the other words.

Any thoughts?

Posted: Thu Jul 21, 2005 1:44 am
by AGISB
There are a lot of problems when testing full text search with a low number of words.

the 50% limit was already mentioned. There are also words with less than 4 letters excluded and certain word are considered trivial like 'and' 'or' probably 'another' as well.

Try adding real sentences of a certain length with some unusual words