Hi Sunil,


I think it is best if you try to create a test case that mimics the
problem, something you could post here. It is easier to help on real code.
Perhaps there is something else going on that interferes with what you
expect to see.



Kind regards,

Geert



*Van:* [email protected] [mailto:
[email protected]] *Namens *
[email protected]
*Verzonden:* maandag 12 november 2012 20:47
*Aan:* [email protected]
*Onderwerp:* [MarkLogic Dev General] Issue with cts:element-values()



Hi,



I have set up an element-value lexicon on an element, say ‘id’, on a set of
documents that have an element ‘name’ too. And some of these documents are
mapped to a collection, say ‘x’

Now, I want to extract ids of docs that have name “tom” in them based on
the lexicons set. I have an issue related to cts:element-values() of the
following structure.



cts:element-values(

                                        xs:QName("id"),

                                        (),

                                        (),

                                        cts:and-query((


                cts:element-value-query(xs:QName("name"),”tom”),


cts:collection-query((“x”))

                                                        ))

                                    )



Some times this is not yielding expected results. Interestingly, when I
take out the constraint of collection-query(), results are as expected. But
when I verified, ALL the intended documents are properly mapped to the
collection, ‘x’. I have verified this using,
xdmp:document-get-collections(“/some_document_uri/test.xml”). Could there
be any reason, why ‘id’ of document that has <name>tom</name> in it is not
being fetched from lexicon, though the document is properly mapped to
collection ‘x’?



Thanks,

*Sunil Chengalva*

This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. If you are not the intended recipient(s), please reply to the
sender and destroy all copies of the original message. Any unauthorized
review, use, disclosure, dissemination, forwarding, printing or copying of
this email, and/or any action taken in reliance on the contents of this
e-mail is strictly prohibited and may be unlawful.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to