EPrints Technical Mailing List Archive

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

Message: #01230


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

[EP-tech] Re: DOI search - exact match?


Can you use a custom script?

my $q = $session->param( ...name of the <form> param... );

my $list = $session->dataset( 'archive' )->search(
    filters => [ { meta_fields => [ "id_number" ], value => $q, match => 'EX' } ]
);

if( $list->count == 0 )
{ ... }
elsif( $list->count > 1 )
{ ... }

my $match = $list->item( 0 );

...

Make sure you have your metadata clean cause people sometime use different formats for DOI's (doi:// etc..)

Seb

On 22/10/12 11:07, Thomas Haines wrote:
Hello all,

   we are trying to make searches on the id_number field exact, so that even DOIs with special characters e.g. / return an exact match - will search for those characters, not strip them out or ignore them. For example searching for 10.1039/c0dt01389g will return "ignoring 10".

   Has anyone already worked on this? Is there a way to make the search function not ignore any of the string, but simply look for an exact match in the particular database field?

  What we want is for a search request containing a DOI, searching the id_number field, will return either one result if there is an exact match, or nothing if not.

thanks,

Tom Haines
Electronic Information Resources Developer
Library Systems Team
INSRV
Cardiff University

hainest@cf.ac.uk
x70435


*** 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/