Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
XQuery Full Text
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where fn:contains($p, "church")
return $p
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where fn:matches($p, "church")
return $p
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where $p contains text "church"
return $p
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $p in fn:collection("vwwp_tei")//tei:p
where $p contains text "church" using stemming
return $p
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
ft:mark(//tei:p[.//text() contains text "church"])
xquery version "3.1";
declare namespace tei = "http://www.tei-c.org/ns/1.0";
for $text score $score in (fn:collection("vwwp_tei")//tei:p)[. contains text "church"]
order by $score descending
return <hit score='{ format-number($score, "0.00") }'>{ $text }</hit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment