| 1 |
<?php |
<?php |
| 2 |
// $Id: apachesolr_search.module,v 1.1.2.6.2.111.2.24 2009/09/23 10:04:51 robertDouglass Exp $ |
// $Id: apachesolr_search.module,v 1.1.2.6.2.111.2.25 2009/10/19 14:32:52 robertDouglass Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 569 |
$extra['comments'] = format_plural($doc->comment_count, '1 comment', '@count comments'); |
$extra['comments'] = format_plural($doc->comment_count, '1 comment', '@count comments'); |
| 570 |
// Allow modules to alter each document and its extra information. |
// Allow modules to alter each document and its extra information. |
| 571 |
drupal_alter('apachesolr_search_result', $doc, $extra); |
drupal_alter('apachesolr_search_result', $doc, $extra); |
| 572 |
|
$fields = array(); |
| 573 |
|
foreach ($doc->getFieldNames() as $field_name) { |
| 574 |
|
$fields[$field_name] = $doc->getField($field_name); |
| 575 |
|
} |
| 576 |
$results[] = array( |
$results[] = array( |
| 577 |
'link' => url($doc->path), |
'link' => url($doc->path), |
| 578 |
'type' => apachesolr_search_get_type($doc->type), |
'type' => apachesolr_search_get_type($doc->type), |
| 583 |
'extra' => $extra, |
'extra' => $extra, |
| 584 |
'score' => $doc->score, |
'score' => $doc->score, |
| 585 |
'snippet' => $snippet, |
'snippet' => $snippet, |
| 586 |
|
'fields' => $fields, |
| 587 |
); |
); |
| 588 |
} |
} |
| 589 |
|
|