Hi,

I have a REST endpoint up and can query documents so that the elements returned 
are limited by the following Options.xml file:


<search xmlns="http://marklogic.com/appservices/search";>
  <qtext>test</qtext>
  <options xmlns="http://marklogic.com/appservices/search";>
    <extract-document-data selected="include">
      <extract-path>/audit/auditor</extract-path>
 <extract-path>/audit/date</extract-path>
    </extract-document-data>
    <return-results>false</return-results>
  </options>
</search>


I call the REST endpoint using:


curl --anyauth --user admin:admin -X POST -i -H "Content-type: application/xml" 
-H "Accept: multipart/mixed; boundary=BOUNDARY" -d @./Options.xml 
http://localhost:8111/LATEST/search


However, am I right that this is not the best way to do it as POST requests 
never get cached, whereas if I used a GET cache the requests could be cached?? 
However, is it possible to run the above constraint using GET rather than POST? 
I tried setting a predefined search using something like the following:


curl --anyauth --user admin:admin -T "Options.xml" -H "Content-type: 
application/xml" http://localhost:8111/LATEST/config/query/test


However, I just get an error. Is it possible to POST the Options.xml and then 
use GET to actually retrieve the data?


Thanks.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to