0

the cts:element-value-query in MarkLogic 7 does not work like MarkLogic 8, I would like to return the documents that have an element without attention to its value my query is like:

cts:search(collection("My-Collection"),cts:element-value-query(xs:QName("Element1"), ""))

I would like to return all of the documents that have the Element1 in MarkLogic 7!!??

grtjn
  • 20,254
  • 1
  • 24
  • 35
Kindle Q
  • 944
  • 2
  • 19
  • 28

1 Answers1

2

Try:

cts:search(
  collection("My-Collection"),
  cts:element-query(xs:QName("Element1"), cts:and-query(()) )
)

Should work in all MarkLogic versions.

HTH!

grtjn
  • 20,254
  • 1
  • 24
  • 35