EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01361
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Creating searches in EPrints?
- To: eprints <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Creating searches in EPrints?
- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- Date: Fri, 07 Dec 2012 12:14:05 +0000
Is this documented anywhere? I'm not finding anything...
If I have the following defined for an eprint dataObject:
{
'name' => 'broker',
'type' => 'compound',
'multiple' => 1,
'fields' => [
{ sub_name => 'orgid', 'type' => 'text' },
{ sub_name => 'orgname', 'type' => 'text' },
{ sub_name => 'repoid', 'type' => 'text' },
{ sub_name => 'reponame', 'type' => 'text' },
{ sub_name => 'sword', 'type' => 'boolean' },
{ sub_name => 'sent', 'type' => 'time', },
{ sub_name => 'return', 'type' => 'url' },
{ sub_name => 'live', 'type' => 'time', },
{ sub_name => 'target', 'type' => 'url' },
{ sub_name => 'note', 'type' => 'text' },
{ sub_name => 'archiver', 'type' => 'boolean' },
],
},
I should be able to create a search thus:
my $dso = $session->get_repository->get_dataset("archive");
my $searchexp1 = EPrints::Search->new(
satisfy_all => 1,
session => $session,
dataset => $dso,
);
$searchexp1->add_field( $dso->get_field("broker_sword"), 'TRUE' );
$searchexp1->add_field( $dso->get_field("broker_sent"), '2000-' );
$searchexp1->add_field( $dso->get_field("broker_live"), '' );
my $results1 = $searchexp1->perform_search;
As I understand it, this should list only those records where one or
more of the broker elements has the sub_field "sword" set true, and the
sub_field "sent" defined and after the year 2000, and the sub_field
"live" is empty
.... unfortunately, I'm getting records where sub_field "sword" is true,
but none of the broker elements have a "sent" sub_field
Is there anything out there? -- 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.
- Follow-Ups:
- [EP-tech] Re: Creating searches in EPrints?
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- [EP-tech] Re: Creating searches in EPrints?
- Prev by Date: [EP-tech] Re: VM requirements
- Next by Date: [EP-tech] Very odd screen coming up on EPrints 3.3.10. Help!?
- Previous by thread: [EP-tech] Re: VM requirements
- Next by thread: [EP-tech] Re: Creating searches in EPrints?
- Index(es):
