Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created March 29, 2016 18:32
Show Gist options
  • Select an option

  • Save ableasdale/a19c2e206b3c21eaf314a8de74777f71 to your computer and use it in GitHub Desktop.

Select an option

Save ableasdale/a19c2e206b3c21eaf314a8de74777f71 to your computer and use it in GitHub Desktop.
An example of a positions heavy near query
let $q1 := cts:or-query(("0","5"))
let $q2 := cts:or-query(("1","6"))
let $q3 := cts:or-query(("2","7"))
let $q4 := cts:or-query(("3","8"))
let $q5 := cts:or-query(("4","9"))
let $q6 := cts:near-query(($q1,$q2),100)
let $q6 := cts:near-query(($q3,$q3),100)
let $q7 := cts:near-query(($q3,$q4),100)
let $q8 := cts:near-query(($q4,$q5),100)
let $q9 := cts:or-query(($q6,$q7))
let $qa := cts:or-query(($q8,$q9))
let $qb := cts:near-query(($q9,$qa),100)
return xdmp:estimate(cts:search(fn:doc("1.xml"),$qb))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment