Hi, Manoj: The options you provide seem to be missing the namespace (and a quote) for the parse function, but I assume that's a copy and paste error.
As you've probably already found, custom constraints are explained by: http://docs.marklogic.com/guide/search-dev/search-api#id_49750 My first step would be to set the <debug> flag to true in the options. If that doesn't help, some detail about your parse and finish facet functions might be useful. Erik Hennum ________________________________ From: general-boun...@developer.marklogic.com [general-boun...@developer.marklogic.com] on behalf of manoj viswanadha [manoj.viswana...@gmail.com] Sent: Thursday, July 18, 2013 3:39 AM To: MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Creating custom facets using custom constarints in Rest API Hi all, I am exploring the options of creating custom facets. I got the option of using custom constarints mentioned in REST API document. I am using the below options: < constraint name="lesson"> < custom facets="true"> < parse apply="parse" ns= " at="/facets.xqy" /> <finish-facet apply="finish-facet" ns="http://marklogic.com/rest-api/transform/facets" at="/facets.xqy"/> </search:custom> <range collation="http://marklogic.com/collation//S2" type="xs:string" facet="true"> <facet-option>ascending</facet-option> <facet-option>limit=10</facet-option> <path-index>*:level[@level_number=2]/*:title</path-index> </search:range> </constraint> The Service i am calling is: http://localhost:portno/v1/search?q=&options=test&format=xml&collection=Resources&view=facets When i use custom option i am not getting results and when i remove custom option i am able to get results. Does custom constraints work for facets? Can anyone help me in this. I want to change the default structure of facets. Thanks in advance, Manoj.
_______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general