title: Retrieve the field values from a MarkLogic search
body: <p>I have an XQuery FLOWR search in MarkLogic like the below which returns paginated matching documents in a collection ordered based on a field</p>
  
  <pre><code>let $options := 
    &lt;options xmlns="http://marklogic.com/appservices/search"&gt;
      &lt;transform-results apply="raw"/&gt;
      &lt;additional-query&gt; 
        {cts:collection-query("http://example.com/myCollectionName")} 
      &lt;/additional-query&gt;
      &lt;sort-order direction="descending" &gt;
        &lt;field name="myCustomFieldA" /&gt;
      &lt;/sort-order&gt;
       &lt;debug&gt;true&lt;/debug&gt; 
    &lt;/options&gt;
  
  for $searchResults in search:search("someQuery", $options, 1, 10)
  return $searchResults
  </code></pre>
  
  <p>I have several custom fields setup on the documents with coresponding field range indexes and I would like to retrieve the values in the fields for the matching documents, rather than the document itself. Something like the following?</p>
  
  <pre><code>for $searchResults in search:search("someQuery", $options, 1, 10)
  return get-field-values($searchResults, ("myCustomFieldA", "myCustomFieldB"))
  </code></pre>
  
  <p>How would I return these field values?</p>