Hi Erik
Thanks for the help. I have created the options and it worked fine for me. But I got results which is slightly deviating from my expectation. Options: custom-search <options xmlns="http://marklogic.com/appservices/search"> <transform-results apply="raw"/> </options> URL: http://<<Host>>:9000/v1/search?q=&options=custom-search&format=json<http://%3c%3cHost%3e%3e:9000/v1/search?q=&options=custom-search&format=json> Result (JSON): { snippet-format: "raw", total: 28252, start: 1, page-length: 10, results: [ { index: 1, uri: "/Test_1.xml", path: "fn:doc("/Test_1.xml")", score: 0, confidence: 0, fitness: 0, content: "<sample id="123"><name>Gnana</name><address>abc</address></sample>" }, { index: 2, uri: "/Test_2.xml", path: "fn:doc("/Test_2.xml")", score: 0, confidence: 0, fitness: 0, content: "<sample id="456"><name>Prakash</name><address>abc</address></sample>" }, ... ] } I am expecting even the content to be shown in JSON. Is there any way I can transform this content node into JSON? Thanks and Regards, Gnanaprakash Bodireddy -----Original Message----- From: Erik Hennum [mailto:[email protected]] Sent: Friday, December 21, 2012 8:08 PM To: Bodireddy, Gnanaprakash (Cognizant) Subject: RE: Reg Retrieving full document while performing search Hi, Gnanaprakash: You don't pass in transform-results as a URI parameter. Instead, you configure query options on the server before you search. To find out how to write query options to the server, please see: http://docs.marklogic.com/guide/rest-dev/search#id_48838 To find out more about the query options supported by the server, please see: http://docs.marklogic.com/guide/search-dev/search-api#id_36346 http://docs.marklogic.com/search:search#opt-transform-results Erik Hennum ________________________________________ From: [email protected]<mailto:[email protected]> [[email protected]] Sent: Friday, December 21, 2012 5:24 AM To: Erik Hennum Subject: RE: Reg Retrieving full document while performing search HI Erik Can you please help me in how I can pass transform-results as options in URL. Do I need to configure anything before passing transform-results? The below one is not working for me. http://<<Host>>:9000/v1/search?q=&format=xml&options=transform-results:raw<http://%3c%3cHost%3e%3e:9000/v1/search?q=&format=xml&options=transform-results:raw> Thanks and Regards, Gnanaprakash Bodireddy >> You can modify your query options to specify transform-results of apply="raw". By the way, you can also use extract-metadata in your query options to get fragments of the result document independent of whether the fragment contained a match on the criteria. Erik Hennum 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. 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
