[EP-tech] Search, for partial matches

Ian Stuart Ian.Stuart at ed.ac.uk
Tue Jan 21 15:21:27 GMT 2014


I want to perform a search... however I want to search for
a) all records where *part* of the field matches, and
b) I do not want that search to be case-sensitive

   my $email = 'Ian';
   my $ds = $session->get_repository->get_dataset('foo');
   my $searchexp = EPrints::Search->new(
       session => $session,
       dataset => $ds,
   );
   $searchexp->add_field( $ds->get_field('email'), $email );
   warn $searchexp->render_description->toString;
   my $results = $searchexp->perform_search;
   warn "found " . $results->count . " records\n";

returns 0 matches, even though there is at least one user (me) with an 
email address of "ian.stuart at ed...." in the dataset foo

Any suggestions?
(as the dataset isn't part of the normal EPrints system, indexing 
worries me [and I don't know who to set it up either, but that's another 
story])

-- 

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.



More information about the Eprints-tech mailing list