Closed amareshjoshi closed 2 years ago
This may not be possible from the humcore
plugin because all searching is done by calling Solr and Solr has to store the entire subject. The humcore code just send search terms to Solr and Solr send back the results.
In file class-humcore-deposit-search-results.php
class Humcore_Deposit_Search_Results {
// ...
// line 217
$results = $solr_client->get_search_results( $restricted_search_terms, $search_facets, $this->pag_page, $sort, $this->pag_num );
But may need to do some more checking in Solarium (Solr API)
Or we could just format the matching subject when it is displayed in screens.php: 1073
foreach ( $highlights as $field => $highlight ) {
//
// for Subject ONLY we extract the subject from "1234:Music:topic"
if($field == "Subject"){
$subject_list = array();
foreach ( $highlight as $fast_subject ){
[$id, $subject, $topic] = explode(":", $fast_subject);
$subject_list[] = $subject;
}
$highlight = $subject_list;
}
echo '<dt>' . $field . '</dt>';
echo '<dd>... ' . implode( ' ( ... ) ', $highlight ) . ' ...</dd>';
}
@amareshjoshi We can close this right?
@mikethicke not yet. This is the issue we talked about at yesterday's meeting. I couldn't complete it because Solr is down (so I can't test). Once it's back up I'll finish it off and close it.
Search results in CORE Deposits display a "search summary" for each match found under the section heading: "Search term matches:"
The Subject line in this section is section is displaying incorrectly. e.g.
see attached screenshot: