EPrints Technical Mailing List Archive

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

Message: #03413


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

[EP-tech] Re: Writing slightly more complex searches


Given these two searches:

  my $search1 = EPrints::Search->new(
    satisfy_all => 1,
    session     => $session,
    dataset     => $dso,
  );
  $search1->add_field( $dso->get_field("published"), 'pub', 'EQ' );
  my $results1 = $search1->perform_search;

  my $search2 = EPrints::Search->new(
    satisfy_all => 1,
    session     => $session,
    dataset     => $dso,
  );
  $search2->add_field( $dso->get_field("refereed"), 'TRUE' );
  my $results2 = $search2->perform_search;

  my $results = $search1->union($search2, 'eprintid');

Why am I getting the error

  Can't locate object method "union" via package "EPrints::Search" at...

when I run the script?

(Eprints 3.3.12 and referring to http://wiki.eprints.org/w/API:EPrints/Search and http://wiki.eprints.org/w/API:EPrints/List )

--

Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
EDINA,
The University of Edinburgh.

http://edina.ac.uk/

This email was sent via the University of Edinburgh.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.