22976 Posts in 11702 Topics by 2826 members
|Go to End|
16 August 2013 at 1:45am Last edited: 22 August 2013 10:49pm
Been trying to find the best way to integrate some dataobject fields in the Fulltext site search. I'm using 3.1 rc1 and the site is hosted on a shared hosting site so no access to install services (like solr) adding modules is fine.
Looking at the documentation for 3.1 regarding search it seems to intimate that by adding
private static $create_table_options = array(
'MySQLDatabase' => 'ENGINE=MyISAM'
to a data object that it will be included in the fulltext site search. (granted i may be reading/understanding it wrong)
20 August 2013 at 10:50pm
Anyone my lack of experience is starting to show again trying to deal with searching on the site, i'd like to not have multiple search boxes. Any help?
22 August 2013 at 9:52am
22 August 2013 at 10:54pm
I have done this in the past by overwriting the default search method on your controller to search for both page objects and other dataobjects.
I then merged the results sets into one DataObjectSet (this was in SS 2.1) and then returned that to the results page.
It is important though that your returned objects have properties that mirror a page object (title, content, link,etc). Otherwise it can cause issues in the search results (and merging the object sets).
I did write a tutorial for 2.1 here: http://www.i-lateral.com/tutorials/extending-fulltextsearch-for-dataobjects/
I don't think you would need to do a load of work to get it running on 3.
30 August 2013 at 7:06pm
Thanks for your help Mo, much appreciated.
I still never really managed to get it working confidently but it looks like i'm not getting the job i needed it for now so im giving this a rest till i get some spare time to try and work it out again.
|Go to Top|