Hi,
The default search columns for SiteTree is set to
'SiteTree' => '"Title","MenuTitle","Content","MetaDescription"', (/framework/search/FulltextSearchable.php)
I tried to set it to only have Title and Content.
'SiteTree' => '"Title","Content"',
When I run /dev/build?flush, it says
Index SiteTree.SearchFields: changed to fulltext ("Title","Content") (from fulltext ("Title","MenuTitle","Content","MetaDescription"))
Index SiteTree_Live.SearchFields: changed to fulltext ("Title","Content") (from fulltext ("Title","MenuTitle","Content","MetaDescription"))
Index SiteTree_versions.SearchFields: changed to fulltext ("Title","Content") (from fulltext ("Title","MenuTitle","Content","MetaDescription"))
Then When I try to do a search, it throws a DB error:
[User Error] Couldn't run query: SELECT DISTINCT ClassName, "SiteTree_Live"."ID", ParentID, Title, MenuTitle, URLSegment, Content, LastEdited, Created, _utf8'' AS "Filename", _utf8'' AS "Name", MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('test') + MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('test') AS "Relevance", CanViewType FROM "SiteTree_Live" WHERE ( MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('test*' IN BOOLEAN MODE) + MATCH (Title, MenuTitle, Content, MetaDescription) AGAINST ('test*' IN BOOLEAN MODE) AND ShowInSearch 0) ORDER BY "Relevance" DESC LIMIT 0, 10 Can't find FULLTEXT index matching the column list
GET /search/SearchForm?Search=test
Any ideas?
Why the query still contains MenuTitle & MetaDescription ?
Peter