Thanks Mark, I am now understanding this. I quite new to SS and PHP in general.
Do you have any ideas on how I can easily formulate links in my results to link to my various dataobjects pages, short of storing a url to each entry in the database?
I am also managing to index all Objects added to classestosearch in Sphinx. Specifying file content to be indexed for my dataobject is posing a problem.
I use the code you provided:
static $extensions = array(
'SphinxSearchable'
);
static $sphinx = array(
"search_fields" => array("Title","Summary"),
"mode" => "xmlpipe",
"external_content" => array("file_content" => array("Document", "getDocumentContent"))
);
static function getDocumentContent($documentId) {
$doc = DataObject::get_by_id("Document", $documentId);
if (!$doc || !$doc->File()) return "";
return $doc->File()->extractFileAsText();
}
No file contents are however indexed. Any ideas what I could be do wrong. I set $_FILE_TO_URL_MAPPING in my environment aswell.