5554 Posts in 1742 Topics by 1227 members
|Go to End|
21 October 2010 at 10:30am Last edited: 21 October 2010 10:33am
What I like most about SilverStripe is that it's easy to create templates with more than one content field, and for the site owner to edit that content.
If your page has custom fields on it the search currently cannot handle searching these. It will only search the default title, content fields
How can the site search find the content of custom fields? This is surely something most SilverStripe developers need to implement at some point?
things like the forum have got there own custom search forms with their own querying engines.
I looked at the forum search, then had to lie down. It'll take days to unravel that lot. I'd be most grateful if someone could post an example, or link to a recipe.
24 October 2010 at 12:43pm
I used a *hack* on a site recently that amalgamated the contents of my custom fields and stuck them in the MetaDescription field onBeforeWrite, which is searched by the default search.
I then created a custom db field to hold the actual meta description and replaced the field under the metadata tab with my own, as well a overriding the MetaTags fucntion to use my replacment field in it's return value.
I know this is a bit of a dirty hack, but if it's quick implentation you are after then it works well with very little overhead.
www.ssbits.com - Your one stop SilverStripe learning resource
26 October 2010 at 12:05am
I've got a basic recipe that I've posted in this thread, hope it helps...
27 October 2010 at 1:10am
Thanks guys. That gives me 3 options
1 - Sphinx
2 - Concatonate searchable fields into MetaDescription
3 - Custom search
I'd call 2 a 'quick fix' rather than a 'dirty hack'. It's probably more efficient than 3 because only one field is searched. You'd probably want to use an XML parser to strip the HTML tags out of the searchable content though.
If I was going to do one SilverStripe site then move on, I'd use 2. If I used shared hosting so couldn't install Sphinx then I'd use 3. But Sphinx has to be the way to go.
27 October 2010 at 2:00am
I have been wanting to get round to sphinx module for some time, please let us know how you get on. I'd like to upgrade all my search so that it includes search pdfs and dynamically created pages... so as I say I'd be very interested in your results...
27 October 2010 at 10:45am Last edited: 27 October 2010 10:48am
> please let us know how you get on
Sure, will do, when I get around to setting it up
The other bespoke CMS I work with uses Xapian, which is very fast + flexible + scalable and doesn't require a separate daemon. So it'll be interesting to see how Sphinx compares.
|Go to Top|