Hi Gary,

Maybe there are 2 cmName elements in the same fragment, one with a value of 
"SQLNorthwind" and one with a value of "Northwind"?

-Danny

From: [email protected] 
[mailto:[email protected]] On Behalf Of Gary Larsen
Sent: Monday, April 23, 2012 10:04 AM
To: 'MarkLogic Developer Discussion'
Subject: [MarkLogic Dev General] Question on cts:element-values

I noticed this case where cts:element-values() does not seem to be apply a 
constraining query.

Running this constraining query on test data finds one document, which contains 
one cmName value:

let $cq :=
    cts:and-query((
      cts:collection-query('content'),
      cts:element-value-query(xs:QName('cmName'), ('SQLNorthwind'))
    ))

But this query returns two values:  Northwind, SQLNorthwind

cts:element-values(xs:QName('cmName'),'', (), $cq)

I'm guessing it's finding a match on other documents due to the value 
similarity, but shouldn't the constraining query take precedence?  Maybe it's 
the underlying combination of 'unfiltered' and cts:word-query().

Thanks for any advice,

Gary

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to