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:

E-Commerce Modules /

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Custom Fields added to Site Search

Go to End

7 Posts   2717 Views

Terry Apodaca

Community Member, 112 Posts

10 March 2011 at 7:51am

I have the Ecommerce Module installed and working great. Client loves it!

One thing I need to figure out how to do is add custom fields the Site Search. On the Product page (CMS) I have given the client a few new fields that don't come standard with the default module. The issue is they want those to be searchable on the front end and from what I can tell the Site Search will only search the Title fields and the Content fields...not the others

Is there something I can do to get the Custom Fields added to the Site Search?


Community Member, 102 Posts

11 March 2011 at 9:43am

I asked the same question a while back...

...but I still haven't got around to implementing Sphinx.

Terry Apodaca

Community Member, 112 Posts

15 March 2011 at 10:51am

Yeah, I can't do the Sphinx module.

There has to be an easier way to add custom fields to the front facing search. They allow it in the CMS, and now it's easy to add regular DataObjects, but since this module is on the SiteTree and uses specific searches I can't get it to work.


Community Member, 24 Posts

22 June 2011 at 10:42pm

Have a look at SearchContext, not sure how it relates to the default Site Search.

With this I have managed to search all dataobjects of a certain class, through multiple fields and return a DOset of qualifying DOs, with pagination.

Don't have the code for it at the moment, but SearchContext is probably what you want to be looking at, was easy enough to edit the given example.


Forum Moderator, 224 Posts

6 November 2011 at 11:58pm

Hey Terry

If you are still looking for an answer to your question then I might be able to help.


Terry Apodaca

Community Member, 112 Posts

8 November 2011 at 5:43am


I figured out a workaround, probably not the best, but something that worked and was really invisible to the Client. I'd really like to know what you have for a solution though...for future projects.


Community Member, 2 Posts

24 November 2011 at 9:33pm

This has been an issue for me on several sites. I have not been able to find a reasonable fix for searching custom fields. Any input would be greatly appreciated.