Forum search is erroring on SS 3.02 with mysql 5.5 #35

Closed
obj63mc opened this Issue Oct 12, 2012 · 9 comments

Projects

None yet

5 participants

@obj63mc
obj63mc commented Oct 12, 2012

Currently when testing with a new base ss 3.02 and the latest of the forum module, search is returning an error with the following issue with the query -

[User Error] Couldn't run query: SELECT Post.ID, Post.Created, Post.LastEdited, Post.ClassName, ForumThread.Title, Post.Content, Post.ThreadID, Post.AuthorID, ForumThread.ForumID, MATCH ("Post"."Content") AGAINST ('cigar') AS RelevancyScore FROM Post JOIN ForumThread ON Post.ThreadID = ForumThread.ID JOIN {ForumHolder::baseForumTable()} ForumPage ON ForumThread.ForumID=ForumPage.ID WHERE MATCH ("ForumThread"."Title", "Post"."Content") AGAINST ('cigar' IN BOOLEAN MODE) OR Post.AuthorID IN (1, 388, 2132, 5567, 17759, 24923, 30144, 31001, 32712, 32782, 33149, 33687, 33995, 34110, 34153, 34263, 34703, 35511, 35619, 35659, 36032, 36117, 36181, 36475, 38186, 38333, 38495, 38681, 38699, 39055, 39979, 40200, 41924, 42497, 43283, 43639, 44088, 44185, 45270, 45453, 45885, 46182, 46377, 46630, 46674, 47016, 47632, 47663, 47918, 49775, 49908, 51095, 51705, 52459, 53219, 53236, 53350, 53433, 53941, 55172, 55786, 56366, 56379, 56707, 56732, 56761, 58881, 58972, 60599, 61228, 61558, 61727, 64195, 66126, 66187, 67193, 67337, 67806, 68247, 68677, 68787, 68847, 69288, 69428, 69860, 70021, 70149, 70338, 70643, 70823, 70957, 71397, 72167, 72458, 72880, 73276, 74586, 74840, 74998, 76860, 77148, 78323, 78356, 79220, 80377, 80722, 80943, 81889, 82252, 82275, 82424, 82779, 82819, 83071, 83396, 83572, 84190, 84198, 84448) AND ForumPage.ParentID='6' ORDER BY RelevancyScore DESC You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{ForumHolder::baseForumTable()} ForumPage ON ForumThread.ForumID=ForumPage.ID
GET /cigar-talk/search?Search=cigar
Line 568 in C:\projects\cigarworld\framework\model\MySQLDatabase.php

@wilr
Member
wilr commented Oct 12, 2012

Yeah, the module doesn't support search in 3.0 just yet - See #32. @kmayo-ss - any ETA on getting search working?

@kmayo-ss
Contributor

Will check to see if I can find any updates on search it is related to work on the full text search module which will also need to be installed.

@kmayo-ss
Contributor

The Fulltext search module is located at https://github.com/silverstripe-labs/silverstripe-fulltextsearch and it uses Solr so the server will need to be able to run Java I am not aware of anyone setting it up to work with forums yet but documentation is located in Solr.md in the docs

@wilr
Member
wilr commented Oct 16, 2012

The goal of the fulltext search module was to be able to plug and play different backends (Solr, Lucence, Sphinx..) considering the idea of all the search providers extending that module, I'm happy to have it as a requirement but it needs to get to a place were the Fulltextsearch API is more than alpha and we need to document the integration. Forum has probably one of the most expansive uses of fulltext search out of the core modules so would be a good test of the FTS API

@nbenn
Contributor
nbenn commented Jan 2, 2013

How is forum search coming along? I played around with fulltextsearch and solr, but so far have not been successful in searching forum posts.. I find search a fairly important feature in a forum. Does anyone have any progress updates?

@nbenn
Contributor
nbenn commented Jan 4, 2013

Being very much interested in restoring search, I created a fork (https://github.com/nbenn/silverstripe-forum/commits/) and started messing around. I also posted some thoughts on the SilverStripe Forum (http://www.silverstripe.org/forum-module-forum/show/21882). I'd be happy to hear from anyone who is interested in making the forum module usable for SilverStripe 3.

@camfindlay
Contributor

Some simple out of the box search for this would be good, maybe it can be replaced by fulltextsearch as an optional extra? @nbenn I see you have commited some work to your master branch. I would suggest making a separate branch named '35-forumsearch', move your changes to that branch, squash commits and submit as a pull request to the main forum repo. That would at least create a starting point for conversation about your approach to coding this.

@camfindlay
Contributor

I'm having a go at fixing this, have got basic search working as per @nbenn fork and have fixed up the pagination.

@camfindlay
Contributor

Should be fixed with #64 I am going to close this issue. If it remains a problem please open a fresh issue :) I ended up using the ORM, filterAny and some :partialmatch helpers.

@camfindlay camfindlay closed this Apr 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment