EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03941


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

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


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