[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] EPrints Search - Latest Items



https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fbin%2Flift_embargos&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C73262c8d957a44c8389b08d7eac381b6%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=S0G3qnX7tK3Kmlw4%2FlWwkaPH8COeYb%2FbH7PVZDVxWck%3D&reserved=0

and

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FSearch&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C73262c8d957a44c8389b08d7eac381b6%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=dkgF%2FMJTLhMoDyDdAEj5Bu8dsboV9JN1r2Bo%2FRAY7bY%3D&reserved=0

should be a good starting point

Il 27/04/20 17:06, James Kerwin via Eprints-tech ha scritto:
> 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
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C73262c8d957a44c8389b08d7eac381b6%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=fEN3B4c0buIfaRDXDZQGZk0UyfEsFcvfAM1ZwqruIyA%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C73262c8d957a44c8389b08d7eac381b6%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=OosS3%2F1tkMdUNsZNdQWr%2FxnGJNKicFVYvMJSyFtGvxI%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200427/6b1878bd/attachment-0001.html