New site under development:
Environment: SS3.1.5, Windows Server 2012, MSSQL 2012, PHP 5.4
We've written FulltextSearchable::enable() into _config.php and created the fulltext index in SQL
Running a search returns no results for any Page or HomePage class records.
Dump of ClassInfo::dataClassesFor('SiteTree') shows the following:
Array ( [SiteTree] => SiteTree [BlogEntry] => BlogEntry [BlogTree] => BlogTree [BlogHolder] => BlogHolder [ErrorPage] => ErrorPage [RedirectorPage] => RedirectorPage [VirtualPage] => VirtualPage [SubsitesVirtualPage] => SubsitesVirtualPage [UserDefinedForm] => UserDefinedForm )
This results in the MSSQL->searchEngine() function producing $fullQuery as follows (only SiteTree half shown):
... UNION SELECT DISTINCT "SiteTree_Live"."ID", 'SiteTree' AS "Source", Rank AS "Relevance" FROM "SiteTree_Live" INNER JOIN CONTAINSTABLE("SiteTree_Live", (*), 'module') AS "ft" ON "SiteTree_Live"."ID"="ft"."KEY" WHERE ("SiteTree_Live"."ShowInSearch"!=0) AND ("SiteTree_Live"."SubsiteID" IN (0)) AND ("SiteTree_Live"."ClassName" IN ('SiteTree', 'BlogEntry', 'BlogTree', 'BlogHolder', 'ErrorPage', 'RedirectorPage', 'VirtualPage', 'SubsitesVirtualPage', 'UserDefinedForm', 'File')) ORDER BY "Relevance" DESC
What it's looking for is match from SiteTree_Live where the ClassName matches an item in the IN() list, and neither Page nor HomePage are in that list. This shouldn't possibly be intended default behaviour?
I can force HomePage into the ClassName list by adding a column to the $db array but this shouldn't have to happen. So why is Page not in the list?