frkitten99
Programmer
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?
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?