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

Gilles Fournié gilles.fournie at cirad.fr
Wed Feb 18 10:30:11 GMT 2015


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



More information about the Eprints-tech mailing list