Browse Source

Added logic to match unlabelled abstract fields

main
Simon Bowie 3 years ago
parent
commit
69027eda64
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      site/solr.php

+ 7
- 2
site/solr.php View File

$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;



Loading…
Cancel
Save