EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #03414
< 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
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Writing slightly more complex searches
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 26 Aug 2014 07:48:57 +0100
Shouldn't you be trying:
$results = $results1->union($results2, 'eprintid');
?
________________________________________
From: eprints-tech-bounces@ecs.soton.ac.uk [eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Ian Stuart [Ian.Stuart@ed.ac.uk]
Sent: 25 August 2014 10:19
To: eprints-tech@ecs.soton.ac.uk
Subject: [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.
*** 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/
- References:
- [EP-tech] Writing slightly more complex searches
- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- [EP-tech] Re: Writing slightly more complex searches
- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- [EP-tech] Writing slightly more complex searches
- Prev by Date: [EP-tech] Re: Writing slightly more complex searches
- Next by Date: [EP-tech] Re: Writing slightly more complex searches
- Previous by thread: [EP-tech] Re: Writing slightly more complex searches
- Next by thread: [EP-tech] Re: Writing slightly more complex searches
- Index(es):
