[librecat-dev] cql query for record with no projects

Nicolas Steenlant Nicolas.Steenlant at UGent.be
Tue May 28 13:09:17 CEST 2019


There's no support for existential queries in cql, we work around it by
adding boolean fields like 'has_project exact 1'.

Regards, Nicolas

On Tue, 2019-05-28 at 08:51 +0000, Patrick Hochstenbach wrote:
> Hi
> 
> I don’t think CQL supports these type of ‘null’ values or ‘exists’
> queries. What you can do is do a raw query. E.g. the elastic search
> store can do this:
> 
> 
> my $hits = $store->bag->search(
>     query => {
>         # All records that have a project field
>         exists => {
>             field => ‘project'
>         }
>     } ,
>     limit => 1000);
> 
> BR 
> Patrick
> 
> > On 27 May 2019, at 13:47, Jonathan NORRIS <jnorris at ist.ac.at>
> > wrote:
> > 
> > Hey,
> > 
> > I am trying to retrieve all records with a project field but can't
> > figure out the CQL for it. Does anybody know how to write CQL to
> > get a result like "project != null"?
> > 
> > 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/
> 
> _______________________________________________
> 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/



More information about the librecat-dev mailing list