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.

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

Can Silverstripe search file

Go to End

3 Posts   1517 Views


Community Member, 24 Posts

6 May 2010 at 6:42pm

My client has a need to be able to include text from PDF's in site searchs. Does anyone know if this possible using the standard silverstripe search?

I found this page but can't seem to find much more on it.

Any help would be greatly appreciated.


Forum Moderator, 5521 Posts

6 May 2010 at 10:32pm

The built in search cannot search pdf text so you'll have to use Sphinx which you can download via svn - A bit more documentation is available in the readme file / docs bundled with the module.


Forum Moderator, 1849 Posts

7 May 2010 at 9:00pm

no, but you do not need any exe's to do so, you can use php functions to get the text content of a pdf ( and then you can change "function results($data, $form)" in Page.php to add items to the results based on what you find.

foreach ($arrPDFs as $pdf)
	$p = new Page();
	$p->Title = "Title"; //update with value from current pdf
	$p->URLSegment = "URLSegment"; //update with value from current pdf
	$p->Content = "Content"; //update with value from current pdf
	$p->Name = "Name"; //update with value from current pdf
	$p->Relevance = 1;//not sure about this one
	$p->CanViewType = 'Anyone';