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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FULLTEXT, Match(), and records with null values

Status
Not open for further replies.

frkitten99

Programmer
Feb 21, 2005
6
US
Hi, all

It appears that the Match() function ignores records with a null value for a particular field (in my case, 's.name'). How can I get it to return all relevant records, including ones with null values? I've added a full text index on the tables with all applicable columns. Here's my SQL:

SELECT p.presentationId, p.guid, p.name, p.instructorName, p.courseIdentifier, p.section, p.isAvailable,
p.isDeleted, p.archiveId, p.semesterId, p.title, p.scheduledStartDateTime, a.name AS archive,
s.name AS semester
FROM presentation p
LEFT OUTER JOIN archive a
ON p.archiveId = a.archiveId
LEFT OUTER JOIN semester s ON
p.semesterId = s.semesterId
WHERE MATCH (p.name,p.instructorName,p.courseIdentifier,p.section,p.instructorEmail,p.title,p.location,a.name,s.name) AGAINST ('Carol' In BOOLEAN MODE)

I have two records that contain "Carol" in the instructorName column. One record has a null semester value (allowed) and the other has a text value. Only the record with the text value is returned. Also note that both have null archive values as well.

Any thoughts on why this might be the case?
 
Have you tried:
[tt]
WHERE
MATCH(p.name) AGAINST ('Carol' IN BOOLEAN MODE)
OR MATCH(p.instructorname) AGAINST ('Carol' IN BOOLEAN MODE)
OR MATCH(p.courseientifier) AGAINST ('Carol' IN BOOLEAN MODE)
...
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top