From 5fe1bedd8b8b309bcfca435c2ec4295667a173fb Mon Sep 17 00:00:00 2001 From: Gilles Crettenand Date: Fri, 19 Jun 2015 10:22:28 +0200 Subject: [PATCH] durations are now in minutes --- Lib/Search/BookSearch.php | 2 +- NetBiblio.php | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Lib/Search/BookSearch.php b/Lib/Search/BookSearch.php index 67b829b..3eed0bf 100644 --- a/Lib/Search/BookSearch.php +++ b/Lib/Search/BookSearch.php @@ -306,7 +306,7 @@ class BookSearch $s = new BookSearch(); $s->addFilterQuery(1, 'visible'); $s->setFacetRangeField($field); - $s->setFacetRange(0, 250, 1); + $s->setFacetRange(0, 250 * 60, 30); // to avoid useless calculation, only set this 'normal' facet $s->addFacetField('visible'); $results = $s->getResults(0, 0); diff --git a/NetBiblio.php b/NetBiblio.php index 83855a5..bab4c43 100644 --- a/NetBiblio.php +++ b/NetBiblio.php @@ -591,9 +591,9 @@ class NetBiblio extends WebService * ° reader : filter by 'reader' * ° motsMatieres : filter by 'motsMatieres' * - * ° duration : exact duration in hours, duration are saved as float in Solr - * ° durationMin : minimal duration in hours - * ° durationMax : maximal duration in hours + * ° duration : exact duration in minutes + * ° durationMin : minimal duration in minutes + * ° durationMax : maximal duration in minutes * * ° count : number of results we want * ° page : page to start at (0 is the first) @@ -753,8 +753,9 @@ class NetBiblio extends WebService } /** - * This method returns the list of all volunteer readers that read book - * in the database. + * This method returns the list of durations in minutes but with 30 minutes gaps + * and the count of books in each group. + * * @return array */ public function ListOfDurations()