Hi Danny,

I need a facet to be generated for my:a my:name that excludes my:b
my:name, so indexing my:a wouldn't give me that.

Bob

>Hi Bob,
>
>Another idea is to try and create the range index on the parent
elements instead of on the my:name element.  In your example, you could
create 2 indexes on:

>my:a
>my:b

>Then when you wanted to look for the a's, do a cts:element-value-match
against my:a, and against my:b to look for b's.

>It should index the string value of my:a and my:b, which is the
equivalent of doing an fn:data(/path/to/my:a).

>I am not sure this will work, but seems worth a try.

>-Danny

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Runstein,
Robert E. (Contr) (IS)
Sent: Friday, July 10, 2009 2:21 PM
To: [email protected]
Subject: [MarkLogic Dev General] Re: Restricting an element range index
to a child of another element

Unfortunately not. 

Bob

>Can you add an attribute to the elements you want included?  A field
word lexicon has support for including only 
>those elements with a certain attribute.



On Jul 9, 2009, at 2:58 PM, "Runstein, Robert E. (Contr) (IS)"
<[email protected]  > wrote:

> Hi,
>
> I have documents like the following:
>
> <my:doc>
>   <my:a>
>     <my:name>Bob</my:name>
>   </my:a>
>   <my:b>
>     <my:name>George</my:name>
>   </my:b>
> </my:doc>
>
> I would like to create an element range index that will index the 
> my:name values under my:a, but not the my:name values under my:b
>
> I cannot change the namespaces to differentiate between them.  Is 
> there a way to do this or do I have to index all the my:name values 
> and filter out the ones that came from the my:b element?  Thanks.
>
> Bob
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to