The FLOWR is not likely to make it faster, as it has to do the same amount of
work.
I think you said that conceptDef is a fragment root, is that right?
//conceptDef looks for all conceptDef elements at all levels of the tree. If
you know the path to your conceptDef elements, that might help, as it will only
need to look where you tell it. For example:
doc("/NDFRT/NDFRT_Public_2009.05.12_TDE.xml")/foo/bar/conceptDef
[empty(definingConcepts/concept)]
If you know something more about the content of definingConcepts, you might be
able to do something clever in your test as well.
-Danny
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrew Welch
Sent: Thursday, November 19, 2009 8:40 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] search for non-existing elements
> doc("/NDFRT/NDFRT_Public_2009.05.12_TDE.xml")//conceptDef[empty(definingConcepts/concept)]
> This is taking about 10 seconds right now.
> Any suggestions ? Thanks !
...just a suggestion, but try rewriting it as a flowr expression, such as:
for $c in //conceptDef
where fn:empty($c/definingConcepts/concept)
return $c
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general