[EP-tech] EPrints Search - Latest Items
James Kerwin
jkerwin2101 at gmail.com
Mon Apr 27 16:06:22 BST 2020
Hello All,
I hope everyone is well in body and mind.
I need some help with the EPrints search function. I have been asked to add
a box to the repository homepage that lists the latest coronavirus-related
deposits.
I'm hoping to search via keywords for "coronavirus" and "covid-19". I also
want to search for either of these terms in titles. To do this I'm
currently butchering a copy of cgi/latest_tool.
I can get the keywords part to work using:
$c->{latest_rona_modes} = {
default => { citation => "noauth" },
fplatest => {
citation => "popular", max => 5,
#citation => "result", max => 3,
filters => [
#{ meta_fields => [ "full_text_status","full_text_status" ], value =>
("none"||"public") }
{ meta_fields => [ "keywords" ], value => "covid-19"}
This also works with "title" as you would expect.
What I really want is to do a search where the keywords can be "covid-19"
OR "coronavirus" as well as including some allowance for adding an:
"OR title LIKE '%covid-19%' OR title LIKE 'coronavirus' in MYSQL-speak.
Am I able to do this using the EPrints::Search plugin? I've tried reading
the codumentation and experimenting with it, but I'm not getting very far.
If it's not possible I can think of a number of bodges for it, but decided
it was best to attempt the proper way first.
Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200427/78cc554c/attachment.html
More information about the Eprints-tech
mailing list