Hi Erik, Thanks for your response.
Come to the my specific requirement and that is : 1. I want to hit MarkLogic with the URL "/v1/search?q=Teacher&collection=Resources&format=xml&options=database-search&book_id=100" 2. In my database, there is an xml file which contains some page_ref_id (ex: pg1, pg2) associated with book_id=100 3. So, I have to get those page_ref_id(pg1, pg2) associated with book_id=100 4. Then, I have to get those page(.xml files) from Resource collection which contains the keyword q=Teacher and page_ref_id element with values pg1 and pg2 So, here I am looking for two things 1. How to pass addition custom parameters in search URL like &book_id=100( and more others) 2. How to achieve my goal which I have mentioned in above steps. Regards, Asit Nautiyal From: [email protected] [mailto:[email protected]] On Behalf Of Erik Hennum Sent: Tuesday, January 22, 2013 12:09 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] Refine my user search in MarkLogic 6 Hi, Asit: I'm not sure what you mean when you say "which is a specific number which I don't want to pass in the search URL. I want to pass this number internally." Any REST API takes input either from query parameters or from a payload. The MarkLogic REST API takes query criteria either as a string search as a URI parameter or as a structured search provided as a structuredQuery URI parameter or as an XML or JSON payload with POST. Thus, if your initial criteria is a string search and want to add additional query criteria, you have a few choices: * GET using a q parameter with the initial criteria and the appended additional criteria expressed as a string search * GET using both the q parameter with the initial criteria and a structuredQuery parameter with the additional criteria expressed as a structure search * POST using the q parameter with the initial criteria and a JSON or XML payload with the additional criteria expressed as a structure search The documentation has the details: http://docs.marklogic.com/guide/rest-dev/search#id_49329 If I've misunderstood the difficulty, please provide more detail about what you're trying to do. Hoping that's useful, Erik Hennum ________________________________ From: [email protected]<mailto:[email protected]> [[email protected]] on behalf of [email protected]<mailto:[email protected]> [[email protected]] Sent: Monday, January 21, 2013 4:35 AM To: [email protected]<mailto:[email protected]> Subject: [MarkLogic Dev General] Refine my user search in MarkLogic 6 Hi , In MarkLogic 6.0 search functionality I want to refine my search top of that results. The possible way is to pass a $option parameter in the search URL and write a custom code to refine the search results. But its applying only for first 10 by default results not for the entire results. So, is there any way, where I can tweak the MarkLogic 6 rest API's search queries along with my custom queries . For Example : "/v1/search?q=Journeys&collection=Resources&format=xml" This search return me those documents, which contains Journeys as keyword. Here I want only those documents which contains Journeys as keywords and also contains an element (ex : book_id , which is a specific number which I don't want to pass in the search URL. I want to pass this number internally ). So, Is there any way, where I can achieve my this goal? Regards, Asit Nautiyal 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
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
