diff --git a/neoflask/queries.py b/neoflask/queries.py index 90cd4fe6..58c9ef13 100644 --- a/neoflask/queries.py +++ b/neoflask/queries.py @@ -55,11 +55,13 @@ class REFEREED_PREPRINTS(Query): MATCH (revservice)-[:HasPaper]->(vizpaper:VizPaper) WITH vizpaper.doi AS doi MATCH (a:Article {doi: doi}) -WITH a WHERE ( toLower(apoc.convert.toString(a.published_journal_title)) = toLower($published_in) ) OR ($published_in = '') +WITH a +ORDER BY a.version DESC +WITH a.doi AS doi, COLLECT(a)[0] AS a WITH DISTINCT id(a) AS id, a.publication_date AS pub_date,