[MarkLogic Dev General] How to get accurate fragment counts using xdmp:estimate when the QName is a variable

McBeath, Darin W (ELS-STL) D.McBeath at elsevier.com
Tue Sep 14 13:05:58 PDT 2010


I'm running into a problem getting accurate fragment counts.

 

I've simplified the problem to the following basic example:

 

The following query returns me the value I would expect.

 

xdmp:estimate(//skos:ConceptScheme)

 

However, if I have a variable $eQName which is essentially the QName for
skos:ConceptScheme

 

xdmp:estimate(//$eQName)

 

returns me every fragment in the DB.

 

Similarly, if I keep skos:ConceptScheme as a string value and assign it
to $sName,

 

xdmp:estimate(//$sName)

 

returns me every fragment in the DB.

 

 

I would think someone has already ran into this situation, so any
insight/advice would be appreciated.  I've contemplated expanding out
the $eQName to the actual 'string' and then doing an xdmp:eval on the
estimate, but before venturing down that path I was curious if anyone
had a better approach.

 

Thanks.

 

Darin.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20100914/b0c73cea/attachment.html 


More information about the General mailing list