Hi,I am trying to define an operator sort:postedon to sort the search results 
in descending order of the date (json-property is postedon). I am using ML8 and 
my data is JSON files only. Following is my xml file
<options xmlns="http://marklogic.com/appservices/search";> <search:operator 
name="sort">     <search:state name="postedon">        <search:sort-order 
direction="descending" type="xs:date">           <search:element ns="" 
json-property="postedon"/>        </search:sort-order>        
<search:sort-order>           <search:score/>        </search:sort-order>     
</search:state> </search:operator></options>
And I am applying this search option using following command
curl -v -X PUT  --digest --user admin:admin  -H "Content-type: application/xml" 
-d @./SortOrder.xml 'http://localhost:8040/v1/config/query/sortorder'
On running the command I am getting the following error








{"errorResponse":{"statusCode":500, "status":"Internal Server Error", 
"messageCode":"INTERNAL ERROR", "message":"XDMP-DOCNONSBIND: 
xdmp:get-request-body(\"xml\") -- No namespace binding for prefix search at  
line 1 . See the MarkLogic server error log for further detail."}}
Following is the entry in the server log
2015-05-09 21:05:49.176 Notice: carsearch: XDMP-DOCNONSBIND: 
xdmp:get-request-body("xml") -- No namespace binding for prefix search at  line 
12015-05-09 21:05:49.176 Notice: carsearch: in 
/MarkLogic/rest-api/endpoints/config-query.xqy, at 42:9 [1.0-ml]2015-05-09 
21:05:49.176 Notice: carsearch:   $headers = map:map(<map:map 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:map="http://marklogic.com/xdmp/map";><map:entry 
key="content-type"><map:value xsi:type="xs:string">ap...</map:map>)2015-05-09 
21:05:49.176 Notice: carsearch:   $method = "PUT"2015-05-09 21:05:49.176 
Notice: carsearch:   $params = map:map(<map:map 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:map="http://marklogic.com/xdmp/map";><map:entry 
key="named-option"><map:value xsi:type="xs:string">so...</map:map>) I am 
following the examples in manuals 
athttps://docs.marklogic.com/guide/search-dev/query-options#id_30002
is the namespace "http://marklogic.com/appservices/search"; right?
Any tips to resolving it would be useful.regards,Puneet                         
                  
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to