"query":"MATCH (n:Regesta) WHERE (n.ident=~ '.*(?i)%KEYWORD%.*') AND NOT id(n) in %CULLS% WITH distinct n as n ORDER BY n.app DESC RETURN id(n) as id, 'regest' as type, n.ident as title, n.app as app, n.rec as rec, n.text as tooltip"
},
{
"placeholder":"Search in entries",
"layer":"entry",
"option":"Entry (Person, Place, Thing, Event, other Entry)",
"query":"MATCH (n:IndexEntry) WHERE ((n.label=~ '.*(?i)%KEYWORD%.*') OR (n.path=~ '.*(?i)%KEYWORD%.*')) AND NOT id(n) in %CULLS% WITH distinct n as n ORDER BY n.app DESC RETURN id(n) as id, CASE WHEN \"IndexPerson\" in labels(n) THEN \"person\" WHEN \"IndexPlace\" in labels(n) THEN \"place\" WHEN \"IndexThing\" in labels(n) THEN \"thing\" WHEN \"IndexEvent\" in labels(n) THEN \"event\" ELSE \"entry\" END as type, n.label as title, n.app as app, n.rec as rec, n.path as tooltip"
},
{
"placeholder":"Search in lemmata",
"layer":"lemma",
"option":"Lemma",
"query":"MATCH (n) WHERE (n.lemma=~ '.*(?i)%KEYWORD%.*') AND NOT id(n) in %CULLS% WITH distinct n as n ORDER BY n.app DESC RETURN id(n) as id, \"lemma\" as type, n.lemma as title, n.app as app"
"query":"MATCH (s:Source) WHERE (s.title=~ '.*(?i)%KEYWORD%.*') AND NOT id(s) in %CULLS% WITH distinct s as s ORDER BY s.title DESC RETURN id(s) as id, 'Source' as type, s.title as title, s.app as app"
},
{
"placeholder":"Enter transliterated name",
"layer":"entity",
"option":"Entity",
"query":"MATCH (n:Entity) WHERE (n.name=~ '.*(?i)%KEYWORD%.*') AND NOT id(n) in %CULLS% WITH distinct n as n ORDER BY n.app DESC RETURN id(n) as id, CASE WHEN 'Dacia' in labels(n) THEN 'Dacia' WHEN 'MoesiaInf' in labels(n) THEN 'Moesia Inferior' WHEN 'MoesiaSup' in labels(n) THEN 'Moesia Superior' WHEN 'PannoniaSup' in labels(n) THEN 'Pannonia Superior' WHEN 'Dalmatia' in labels(n) THEN 'Dalmatia' END as type, n.name as title, n.app as app, n.praenomen+' '+n.nomen+' '+n.cognomen +(CASE WHEN n.gender='Male' THEN ', Male' ELSE ', Female' END) +(CASE WHEN n.citizen THEN ' / Citizen' ELSE '' END) +(CASE WHEN n.libertus THEN ' / Libertus' ELSE '' END) +(CASE WHEN n.veteranus THEN ' / Veteranus' ELSE '' END) +(CASE WHEN n.peregrine THEN ' / Peregrine' ELSE '' END) +(CASE WHEN n.slave THEN ' / Slave' ELSE '' END) +(CASE WHEN EXISTS (n.occupation) THEN ' / Occupation: '+n.occupation ELSE '' END) as tooltip"
...
...
@@ -62,9 +63,8 @@
"text":"Related Entities",
"icon":"fa-users",
"header":"Entities related with %PARENTS%",
"queryUnion":"UNWIND %PARENTSIDS% as egoid MATCH (e)-[r:related_with]->(ego) WHERE id(ego) = egoid WITH egoid, collect(distinct id(e)) as relids UNWIND relids as x WITH x, count(x) as c WITH collect(distinct x) as relations MATCH (n)-[r:related_with]->(ego) WHERE id(ego) IN %PARENTSIDS% AND id(n) in relations AND NOT id(n) in %CULLS% RETURN id(n) as id, CASE WHEN 'Dacia' in labels(n) THEN 'Dacia' WHEN 'MoesiaInf' in labels(n) THEN 'Moesia Inferior' WHEN 'MoesiaSup' in labels(n) THEN 'Moesia Superior' WHEN 'PannoniaSup' in labels(n) THEN 'Pannonia Superior' WHEN 'Dalmatia' in labels(n) THEN 'Dalmatia' END as type, n.name as title, collect(r.type) as relation, n.app as app, n.praenomen+' '+n.nomen+' '+n.cognomen as tooltip",
"queryIntersection":"UNWIND %PARENTSIDS% as egoid MATCH (e)-[r:related_with]->(ego) WHERE id(ego) = egoid WITH egoid, collect(distinct id(e)) as relids UNWIND relids as x WITH x, count(x) as c WHERE c=size(%PARENTSIDS%) WITH collect(distinct x) as relations MATCH (n)-[r:related_with]->(ego) WHERE id(ego) IN %PARENTSIDS% AND id(n) in relations AND NOT id(n) in %CULLS% RETURN id(n) as id, CASE WHEN 'Dacia' in labels(n) THEN 'Dacia' WHEN 'MoesiaInf' in labels(n) THEN 'Moesia Inferior' WHEN 'MoesiaSup' in labels(n) THEN 'Moesia Superior' WHEN 'PannoniaSup' in labels(n) THEN 'Pannonia Superior' WHEN 'Dalmatia' in labels(n) THEN 'Dalmatia' END as type, n.name as title, collect(r.type) as relation, n.app as app, n.praenomen+' '+n.nomen+' '+n.cognomen as tooltip"
},
"queryUnion":"UNWIND %PARENTSIDS% as egoid MATCH (e)-[r]->(ego) WHERE id(ego) = egoid WITH egoid, collect(distinct id(e)) as relids UNWIND relids as x WITH x, count(x) as c WITH collect(distinct x) as relations MATCH (n)-[r:related_with]->(ego) WHERE id(ego) IN %PARENTSIDS% AND id(n) in relations AND NOT id(n) in %CULLS% RETURN id(n) as id, CASE WHEN 'Dacia' in labels(n) THEN 'Dacia' WHEN 'MoesiaInf' in labels(n) THEN 'Moesia Inferior' WHEN 'MoesiaSup' in labels(n) THEN 'Moesia Superior' WHEN 'PannoniaSup' in labels(n) THEN 'Pannonia Superior' WHEN 'Dalmatia' in labels(n) THEN 'Dalmatia' END as type, n.name as title, collect(type(r)) as relation, n.app as app, n.praenomen+' '+n.nomen+' '+n.cognomen as tooltip",
"queryIntersection":"UNWIND %PARENTSIDS% as egoid MATCH (e)-[r]->(ego) WHERE id(ego) = egoid WITH egoid, collect(distinct id(e)) as relids UNWIND relids as x WITH x, count(x) as c WHERE c=size(%PARENTSIDS%) WITH collect(distinct x) as relations MATCH (n)-[r:related_with]->(ego) WHERE id(ego) IN %PARENTSIDS% AND id(n) in relations AND NOT id(n) in %CULLS% RETURN id(n) as id, CASE WHEN 'Dacia' in labels(n) THEN 'Dacia' WHEN 'MoesiaInf' in labels(n) THEN 'Moesia Inferior' WHEN 'MoesiaSup' in labels(n) THEN 'Moesia Superior' WHEN 'PannoniaSup' in labels(n) THEN 'Pannonia Superior' WHEN 'Dalmatia' in labels(n) THEN 'Dalmatia' END as type, n.name as title, collect(type(r)) as relation, n.app as app, n.praenomen+' '+n.nomen+' '+n.cognomen as tooltip"},