Просмотр исходного кода

Added logic to match unlabelled abstract fields

main
Simon Bowie 4 лет назад
Родитель
Сommit
69027eda64
1 измененных файлов: 7 добавлений и 2 удалений
  1. +7
    -2
      site/solr.php

+ 7
- 2
site/solr.php Просмотреть файл

$output['title'] = $title[1]; $output['title'] = $title[1];


// Search for the abstract in the content element and display it // Search for the abstract in the content element and display it
preg_match('/Abstract.*\n(.*)\n/', $content, $abstract);
$output['abstract'] = $abstract[1];
if (preg_match('/Abstract.*\n(.*)\n/', $content, $abstract)){
$output['abstract'] = $abstract[1];
}
else {
preg_match('/\(.\) \\n\\n(.*)\\n/', $content, $abstract);
$output['abstract'] = $abstract[1];
}


return $output; return $output;



Загрузка…
Отмена
Сохранить