[librecat-dev] counting only internal publications in index view

Vitali Peil vitali.peil at uni-bielefeld.de
Thu May 3 07:01:22 CEST 2018


Hi Jonathan,

I believe you have to use "extern<>1". The reason is that the field is
not present if the corresponding box is not checked.

Best,

Vitali


Am 02.05.2018 um 16:09 schrieb Jonathan NORRIS:
>
> Hello,
>
> I'm trying to only display the count of the internal publications in
> the index view for 'publications', 'data publications' and 'open
> access publications'.
>
> If edited the Helper.pm file in a layer. I've added "extern=1" to the
> cql queries in the 'get_statistics' function. This is where I believe
> the numbers are gotten from.
>
>
> subget_statistics{
> my($self) = @_;
> my$hits= LibreCat->searcher->search('publication',
> {cql =>["status=public", "type<>research_data", "extern=0"]});
> my$reshits= LibreCat->searcher->search('publication',
> {cql =>["status=public", "type=research_data", "extern=0"]});
> my$oahits= LibreCat->searcher->search('publication',
> {cql =>["status=public", "fulltext=1", "type<>research_data",
> "extern=0"]});
> return{
> publications =>$hits->{total},
> researchdata =>$reshits->{total},
> oahits =>$oahits->{total},
> projects =>$self->project->count(),
> };
> }
>
>
> I've restarted the application and still only the total number of
> publications are displayed. Is there a step I am missing here?
>
>
> Thanks,
>
> Jonathan
>
> IST Austria
>
>
>
> _______________________________________________
> librecat-dev mailing list
> - send list mails to librecat-dev at lists.uni-bielefeld.de
> - to unsubscribe or change options, visit https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev
> - project website: http://librecat.org/

-- 
Vitali Peil
Deputy Head Acquisitions Department
Subject Librarian
Office U3-200/E1-144, Tel. +49521-106-4010/6125
Bielefeld University Library

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20180503/3aadbcd7/attachment.html>


More information about the librecat-dev mailing list