From a49546108ab8337447ea3085b6f1d3c26aceebef Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 24 Sep 2019 14:52:37 -0400 Subject: [PATCH] Add method to retrieve first indexed date. --- module/VuFind/src/VuFind/RecordDriver/SolrDefault.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php index f4ea71715db..ab5c367796b 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php @@ -135,6 +135,16 @@ class SolrDefault extends DefaultRecord parent::__construct($mainConfig, $recordConfig, $searchSettings); } + /** + * Get the date this record was first indexed (if set). + * + * @return string + */ + public function getFirstIndexed() + { + return $this->fields['first_indexed'] ?? ''; + } + /** * Get highlighting details from the object. * -- GitLab