EPrints Technical Mailing List Archive

Message: #03947


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Search API and name fields (or compound)


I don't think this is possible, I'm afraid.  The way I approach this kind of problem is to iterate over the repository and generate a report.  You could do worse than start with the SCONUL report and modify it to do what you want (save the IDs of items with no author, rather than counting the documents).

http://wiki.eprints.org/w/SCONUL_Report


--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services




On 18 Feb 2015, at 10:30, Gilles Fournié wrote:

> Hi,
> 
> I am trying to write a script to do a search on a dataset.
> I would like to find entries where the author field has not been set.
> 
> I tried :
> 
>    $search->add_field(
>       fields => $dataset->get_field('author'),
>       match => 'EX',
>       value => {family=>'', given=>''}
>    );
> 
> and
> 
>    $search->add_field(
>       fields => $dataset->get_field('author'),
>       match => 'EX',
>       value => {family=>'NULL', given=>'NULL'}
>    );
> 
> but neither work (they find nothing although there are database entries 
> with both author_family and author_given null).
> 
> Could anybody tell me how I should write the condition ?
> 
> Thanks,
> GF
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/