ADDING ATTACHMENT (blank calling of Solr)
2012-10-28_18:10:00 DASP.update: id:3wms5w/file/81 OR sm_parent_document_id:3wms5w/file/81
RUNNING OF CRON JOB
2012-10-28_18:11:04 DASP.update: 3wms5w/node/62
http://my-comp.int/
3wms5w
62
node
book
Strana knihy
cs
node/62
http://my-comp.int/node/62
ttt
test.docx
test.docx
ppmr
ppmr
ppmr
ppmr
22
1
0
0
0
0
cs
2012-10-28T15:43:45Z
2012-10-28T17:10:06Z
2012-10-28T17:10:06Z
24
2012-10-28_18:11:05 DASP.update: 3wms5w/file/81-62
http://my-comp.int/
3wms5w
81
file
file
Soubor
und
test.docx
test.docx Pocet sessions a jobů v databázi - IOPS
test.docx
ppmr
ppmr
ppmr
ppmr
22
1
0
0
0
0
cs
2012-10-28T17:10:06Z
2012-10-28T17:10:06Z
2012-10-28T17:10:06Z
http://my-comp.int/upload0/upload0/test.docx
http://my-comp.int/upload0/upload0/test.docx
2012-10-28T17:10:06Z
2012-10-28T17:10:06Z
{"entity_type":"node","nid":"62","type":"book","title":"ttt"}
node-book
node
application/vnd.openxmlformats-officedocument.wordprocessingml.document
80106
SAVING NODE AFTER DELETING ATTACHMENT
2012-10-28_18:11:43 DASP.update: id:3wms5w/file/81 OR sm_parent_document_id:3wms5w/file/81
code
// in apachesolr_attachments_solr_document add field
// for our file_delete hook
$filedocument->sm_file_entity_id = apachesolr_document_id($file->fid, $entity_type);
// file delete hook is called when file reference count is 0
function apachesolr_attachments_file_delete($file) {
static $failed = FALSE;
if ($failed) {
return FALSE;
}
try {
$sm_file_entity_id = apachesolr_document_id($file->fid, 'file');
$solr = apachesolr_get_solr();
$solr->deleteByQuery("sm_file_entity_id:$sm_file_entity_id AND entity_type:file AND hash:" . apachesolr_site_hash());
$solr->commit();
return TRUE;
}
catch (Exception $e) {
watchdog('Apache Solr Attachments', "On file delete: " . nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);
// Don't keep trying queries if they are failing.
$failed = TRUE;
return FALSE;
}
}