[EP-tech] Re: DOI search - exact match?
Sebastien Francois
sf2 at ecs.soton.ac.uk
Tue Oct 23 15:05:06 BST 2012
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
> <http://dx.doi.org/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 at 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20121023/75d582a7/attachment.html
More information about the Eprints-tech
mailing list