1956 Posts in 1235 Topics by 602 members
|Go to End|
24 August 2010 at 5:23am
Has any had any success extending the built in search engine, i.e. searchForm.php? I have an extension of Page which has extra content areas which the user can update in the CMS. The search engine doesn't look for anything other than the standard variables in sitetree as can be seen in the file \sapphire\core\model\MySQLDatabase.php and the public function searchEngine.
I tried editing it and haven't found a way to make it work without coming up with a harsh sql error.
[User Error] Couldn't run query: SELECT count(*) FROM "SiteTree_Live" WHERE ("SiteTree_Live"."ClassName" IN ('TripleColumnPage','HomeRSSAggregatingPage','TestimonialsPage')) AND ( MATCH (ColumnOne,ColumnTwo,ColumnThree,BottomContent) AGAINST ('tewst*' IN BOOLEAN MODE) + MATCH (ColumnOne,ColumnTwo,ColumnThree,BottomContent) AGAINST ('tewst*' IN BOOLEAN MODE) ) Unknown column 'ColumnOne' in 'where clause'
Line 536 in /home/kathyw/public_html/synergy_silverstripe_blank_dev/sapphire/core/model/MySQLDatabase.php
I can see that where sapphire is trying to create the SQL term it is having trouble joining the two database tables. Has anybody had any luck extending the search form in this way?
I have used Symfony framework and with that there is an option to bring up the SQL query on screen to help with debugging. does anyone know of such a query with silverstripe.
27 August 2010 at 11:29am
okay I have since found this post which is more sophisticated and established idea,
|Go to Top|