Yashmeet,

Have you tried adding <cts:option 
xmlns:cts="http://marklogic.com/cts";>punctuation-insensitive</cts:option>?

-Will

From: [email protected] 
[mailto:[email protected]] On Behalf Of Yeshmeet Singh
Sent: Sunday, July 01, 2012 11:56 PM
To: [email protected]
Subject: [MarkLogic Dev General] Wildcard Search Problem

Hi,

I am using the following query to fetch results from the above attached xml. 
The problem I am facing is my returns results from the data that have “?” but 
if the “?” comes immediately after a single(‘) or double(“) quotes then the 
results are not coming up.

declare namespace wl = "namespace";
let $elem := fn:QName(namespace, 'head')
let $title :='can i have a word with you?'
let $options := (<cts:option 
xmlns:cts="http://marklogic.com/cts";>unwildcarded</cts:option>)
let $restriction := cts:collection-query('dictionaryId')
let $t :=
element cts:and-query {
                element cts:element-value-query {
                    element cts:element  { $elem },
                    element cts:text { $head },
                    $options
                },
        $restriction
    }
let $t :=cts:query($t)
let $x :=cts:search(/wl:data,$t)
return $x

$x shows me (can i have a word with you?). But it does not return (can i have a 
word with “you”?) from the xml data.

Thanks
Yashmeet Singh

**************** CAUTION - Disclaimer *****************

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely

for the use of the addressee(s). If you are not the intended recipient, please

notify the sender by e-mail and delete the original message. Further, you are 
not

to copy, disclose, or distribute this e-mail or its contents to any other 
person and

any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken

every reasonable precaution to minimize this risk, but is not liable for any 
damage

you may sustain as a result of any virus in this e-mail. You should carry out 
your

own virus checks before opening the e-mail or attachment. Infosys reserves the

right to monitor and review the content of all messages sent to or from this 
e-mail

address. Messages sent to or from this e-mail address may be stored on the

Infosys e-mail system.

***INFOSYS******** End of Disclaimer ********INFOSYS***


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

Reply via email to