Hi,

I have following query on search:search

I am running this command:
let $suggestions := search:search($query,$options)
return
$suggestions

Which gives me the following output:

Response:

<search:response total="1" start="1" page-length="10" 
xmlns:search="http://marklogic.com/appservices/search";>
  <search:result index="1" uri="/xyz.xml" 
path="fn:doc(&quot;/xyz.xml&quot;)/x/*:y/*:z/*:a[1]/*:title" score="513" 
confidence="0.896676" fitness="1">
    <search:snippet>
      <search:match 
path="fn:doc(&quot;/xyz.xml&quot;)/x/*:y/*:z/*:a[1]/*:/*:title"><search:highlight>HOLDER</search:highlight></search:match>
    </search:snippet>
  </search:result>
  <search:result index="2" uri="/xyz.xml" path="fn:doc(&quot;/xyz.xml&quot;) 
;)/x/*:y/*:z/*:a[2]/*:/*title" score="513" confidence="0.896676" fitness="1">
    <search:snippet>
      <search:match 
path="fn:doc(&quot;/xyz.xml&quot;)/x/*:y/*:z/*:a[2]/*:/*title"><search:highlight>HOLDER</search:highlight>
 OF A PEN
     </search:match>
    </search:snippet>
  </search:result>
  <search:qtext>Holder</search:qtext>
</search:response>

Now I want the response as

<search:highlight>HOLDER</search:highlight>
<search:highlight>HOLDER</search:highlight> OF A PEN

That is :
search:response/search:result/search:snippet/search:match/text() - how to get 
this?

I have tried :
let $suggestions := search:search($query,$options)
return
$suggestions// search:response/search:result/search:snippet/search:match/text()

But no results is the output.

Thanks,
Pragya



**************** 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