Skip to content

Commit

Permalink
Closes openaire#1148: Optimize performance for DFG funder
Browse files Browse the repository at this point in the history
  • Loading branch information
marekhorst committed Sep 15, 2020
1 parent 3181f49 commit 53d6b98
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ WHERE fundingclass1="RCUK" and middle = grantid

union all
--DFG
select jdict('documentId', docid, 'projectId', id, 'confidenceLevel', 0.8,'textsnippet',j2s(prev,middle,next)) as C1, docid, id, fundingclass1, grantid from
(setschema 'docid,prev,middle,next' select c1, textwindow2s(regexpr("\n",filterstopwords(keywords(c2)),"\s"),10,2,7,"\w{3}\s\d{1,4}" ) from pubs where c2 is not null), grants
where lower(regexpr("\b(\w{3}\s\d{1,4})\b",middle)) = grantid and
regexprmatches("support|project|grant|fund|thanks|agreement|research|acknowledge|centre|center|nstitution|program|priority|dfg|german|dutch|deutche",lower(j2s(prev,middle,next))) group by docid, id
select jdict('documentId', docid, 'projectId', id, 'confidenceLevel', 0.8,'textsnippet', prev||" "||middle||" "||next) as C1, docid, id, fundingclass1, grantid from
(setschema 'docid,prev,middle,next' select c1, textwindow2s(filterstopwords(keywords(c2)),10,2,7,"\w{3}\s\d{1,4}") from pubs where c2 is not null), grants
where lower(regexpr("\b(\w{3}\s\d{1,4})\b",middle)) = grantid and
regexprmatches("support|project|grant|fund|thanks|agreement|research|acknowledge|centre|center|nstitution|program|priority|dfg|german|dutch|deutche",lower(prev||" "||next)) group by docid, id
--DFG

union all
Expand Down

0 comments on commit 53d6b98

Please sign in to comment.