Thanks, yes I considered that ... but the reason I'm not using it is because I 
want to use the search capibilities such as wildcarding and case insensitivity. 
  Turning those into pure xquery expressions then results in searches that dont 
perform very well (atleast for me).
 
 
 
 

________________________________

From: [email protected] on behalf of Glidden, Douglass A
Sent: Tue 12/22/2009 8:25 AM
To: [email protected]
Subject: RE: [MarkLogic Dev General] How to get cts:element-value-query() 
tonotdecend to the depths of Hades


David,
 
I realize I'm a little late with my answer, but just to throw another option 
into the pool, did you consider getting rid of the cts:search completely?  That 
is, if I were doing something like this, I would be inclined to do it entirely 
with XPath:

        fn:doc("doc")/doc[name="Sub Part"]

I realize your real query is probably significantly more complex than your 
example, but it's just another idea to consider.

Doug Glidden 
Software Engineer 
The Boeing Company 
[email protected] 


________________________________

From: [email protected] 
[mailto:[email protected]] On Behalf Of Lee, David
Sent: Monday, December 21, 2009 08:16
To: [email protected]
Subject: [MarkLogic Dev General] How to get cts:element-value-query() to 
notdecend to the depths of Hades



I have a XML doc (not my own design) something like

<doc>

   <name>Title</name>

   <part>   

       <name>Part</name>

       <subpart>

            <name>Sub Part<name>

    </subpart>

   </part>

  ...

 

</doc>

 

 

I want a cts:search  query that will match <name>Title</name> but not <name>Sub 
Part<name> or other names.

 

cts:search( doc("doc")/doc , cts:element-value-query( xs:QName("name") , "Sub 
Part")  )   

 

matches when I do not want it to.   How can I restrict cts:element-value-query 
from matching descendant  nodes ?

I looked at adding an and-not-query but that wont work because its possible for 
multiple name elements to have the 

same value and I dont want a match discarded just because it matched in 
multiple places.

 

Any suggestions ?

 

 

 

 

 

 

----------------------------------------

David A. Lee

Senior Principal Software Engineer

Epocrates, Inc.

[email protected] <mailto:[email protected]> 

812-482-5224

 

 

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

Reply via email to