Thanx for the quick response Frank, I am sorry I forgot to mention that my search results are not sorted in the last mail.
Still after doing the suggested change; results are not sorted. Infact after doing the following changes <search:directory>testWebDAVServer/</search:directory> To <search:directory>/testWebDAVServer/</search:directory> I don't get any results. Regards, /Ashish -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Saturday, June 28, 2008 12:30 AM To: [email protected] Subject: General Digest, Vol 48, Issue 14 Send General mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://xqzone.com/mailman/listinfo/general or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of General digest..." Today's Topics: 1. Unable to sort results through lib-search (Ashish Kumar) 2. RE: Unable to sort results through lib-search (Frank Sanders) ---------------------------------------------------------------------- Message: 1 Date: Fri, 27 Jun 2008 17:08:43 +0530 From: "Ashish Kumar" <[EMAIL PROTECTED]> Subject: [MarkLogic Dev General] Unable to sort results through lib-search To: <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Hi, Pointers to the following problem will be highly appreciated. I am unable to sort search results using lib search. Also I see the api is broken for highlighting the results in lib-search. Any idea when it would be available. Here is the code which I am trying to sort the results. What I am missing here? 1. In lib-search-custorm.xqy I have set the $CONFIG AS define variable $CONFIG as element(cfg:config) { (: Configuration file -- Put whatever you want here, or nothing at all. :) <config xmlns="http://www.marklogic.com/ps/lib/lib-search/config"> <search> <base-criteria> <search:directories depth="1"> <search:directory>testWebDAVServer/</search:directory> </search:directories> </base-criteria> <sort-fields> <sort-field id="pName" type="xs:string" direction="ascending" >/Publisher/PublisherInfo/PublisherName</sort-field> </sort-fields> <max-summarize-matches>5</max-summarize-matches> <truncate-word-count>7</truncate-word-count> </search> </config> } /Publisher/PublisherInfo/PublisherName is the path from root. 2. Now when I fire my query for sort it does not work import module namespace search="http://www.marklogic.com/ps/lib/lib-search" at "lib-search.xqy" import module namespace search1="http://www.marklogic.com/ps/lib/lib-search" at "lib-search-custom.xqy" search:search-results( <search:search-criteria> <search:term><search:text>humana</search:text></search:term> <search:element><search:local-name>Body </search:local-name></search:element> <sort><sort-field type="xs:string"> pName </sort-field><sort-field-id>ChapterTitle</sort-field-id></sort> </search:search-criteria> , 1, 5) Thanx in Advance, /Ashish ------------------------------ Message: 2 Date: Fri, 27 Jun 2008 07:54:34 -0700 From: "Frank Sanders" <[EMAIL PROTECTED]> Subject: RE: [MarkLogic Dev General] Unable to sort results through lib-search To: "General Mark Logic Developer Discussion" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="us-ascii" Not sure of what results you're getting, but from the code you've posted it looks like you need to change your search-directory element from: <search:directory>testWebDAVServer/</search:directory> To <search:directory>/testWebDAVServer/</search:directory> -fs -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ashish Kumar Sent: Friday, June 27, 2008 7:39 AM To: [email protected] Subject: [MarkLogic Dev General] Unable to sort results through lib-search Hi, Pointers to the following problem will be highly appreciated. I am unable to sort search results using lib search. Also I see the api is broken for highlighting the results in lib-search. Any idea when it would be available. Here is the code which I am trying to sort the results. What I am missing here? 1. In lib-search-custorm.xqy I have set the $CONFIG AS define variable $CONFIG as element(cfg:config) { (: Configuration file -- Put whatever you want here, or nothing at all. :) <config xmlns="http://www.marklogic.com/ps/lib/lib-search/config"> <search> <base-criteria> <search:directories depth="1"> <search:directory>testWebDAVServer/</search:directory> </search:directories> </base-criteria> <sort-fields> <sort-field id="pName" type="xs:string" direction="ascending" >/Publisher/PublisherInfo/PublisherName</sort-field> </sort-fields> <max-summarize-matches>5</max-summarize-matches> <truncate-word-count>7</truncate-word-count> </search> </config> } /Publisher/PublisherInfo/PublisherName is the path from root. 2. Now when I fire my query for sort it does not work import module namespace search="http://www.marklogic.com/ps/lib/lib-search" at "lib-search.xqy" import module namespace search1="http://www.marklogic.com/ps/lib/lib-search" at "lib-search-custom.xqy" search:search-results( <search:search-criteria> <search:term><search:text>humana</search:text></search:term> <search:element><search:local-name>Body </search:local-name></search:element> <sort><sort-field type="xs:string"> pName </sort-field><sort-field-id>ChapterTitle</sort-field-id></sort> </search:search-criteria> , 1, 5) Thanx in Advance, /Ashish _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 4245 bytes Desc: not available Url : http://xqzone.marklogic.com/pipermail/general/attachments/20080627/a36d9b52/ smime-0001.bin ------------------------------ _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general End of General Digest, Vol 48, Issue 14 *************************************** _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
