EPrints Technical Mailing List Archive

Message: #02530


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

[EP-tech] Search, for partial matches


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@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.