It may because it thinks the "?" is a wildcard.
Try this out:
cts:search(fn:collection("test"),cts:and-query((cts:element-value-query(xs:QName("link"),"http://www.google.com?a=b",
"exact"))))
Best,
Rob
Rob Szkutak
Associate Consultant
MarkLogic Corporation
[email protected]
Cell +1.716.562.8464
www.marklogic.com<http://www.marklogic.com>
________________________________
From: [email protected]
[[email protected]] on behalf of Roy Chowdhury, Soumadri
[[email protected]]
Sent: Thursday, December 17, 2015 12:30 PM
To: [email protected]
Subject: [MarkLogic Dev General] cts:search not matching values which contains
'?'
Hi,
I have 2 documents in the database with following structure in "test",
/dummy1.xml
-------------------
<doc>
<link>http://www.abc.com</link>
</doc>
/dummy2.xml
-------------------
<doc>
<link>http://www.google.com?a=b</link>
</doc>
When I run the following search query it returns no result,
cts:search(fn:collection("test"),cts:and-query((cts:element-value-query(xs:QName("link"),"http://www.google.com?a=b"))))
while the following one fetches result
cts:search(fn:collection("test"),cts:and-query((cts:element-value-query(xs:QName("link"),"http://www.abc.com"))))
What could be the reason for 1st query not bringing any result?
Regards,
Soumadri Roy
"This e-mail and any attachments transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential , proprietary or
privileged information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this e-mail or any action taken in reliance on this e-mail is
strictly prohibited and may be unlawful."
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general