Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Built in search functionality bug - use of word 'as'

Go to End

3 Posts   519 Views


Community Member, 31 Posts

13 June 2014 at 5:51am

I have an issue with search in a SS 3.1 install, I wouldn't have thought an issue like this would exist in the core code and that it must be affected by something I have done however, other than some minor overloading of the SearchFrom() and getResults() methods on my Page class (neither of which effect the query building logic at all) it is a total stock usage of the search functionality.

If I search for "[some word] as [some word]" (i.e 'cat as dog' or 'foo as bar') I get a fatal error (see the first attached image). Also, far less important, if I do the same in dev mode I also get a deprecated method notice (see the second attached image).

I am fairly certain something weird is going on with the use of the word 'as' and SS's query building logic is mistaking it for part of an SQL statement e.g. `fieldname`AS 'labelname' I think this because of this part of the error message:

"AGAINST ('foo AS "bar')", NULL"

Notice that my 'as' word has been capitalised and is then followed by a single space and opening double quotes (as if it is about to wrap my label in quotes)

Is this a bug?

You may think 'who cares, hardly anyone will be searching for [someword] as [someword]... but I am having this issue on a live, customer facing website for a telecoms company... so the search "pay as you go" happens on a daily basis!

Any help greatly appreciated.

Kind regards,



Forum Moderator, 267 Posts

17 June 2014 at 4:44pm

This to me looks like a bug and I have been able to replicate on a fresh copy of 3.1.5.

Would be worth raising a bug over at


Community Member, 31 Posts

17 June 2014 at 8:26pm

Thanks for clarifying this is still an issue in the core code of SS 3.1 @camfindlay

I have raised a bug as suggested -

Lets hope someone is able to provide a fix