Tim, I believe that the first author in the sequence is used by default, 
anyway.  To test that, run a search with the <debug>true</debug> flag in your 
options node, and the output will contain a report that shows you exactly what 
the flwor expression was.  

Of course if you wanted the second one, you'd be out of luck, but for this case 
I think you'll get that behavior anyway.

--Colleen
________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Tim Finney 
[[email protected]]
Sent: Friday, December 02, 2011 1:59 PM
To: [email protected]
Subject: [MarkLogic Dev General] search:search sort operator

Hi All,

I have a lot of docs, each with one or more author elements. Is there an
easy way to tell search:search() to only look at the first author
element when returning search results ordered by author? Here's what my
sort operator looks like in the options node.

<operator name="sort">
    <state name="author">
      <sort-order direction="ascending" type="xs:string"
      collation="http://marklogic.com/collation/";>
        <element ns="my-ns" name="author"/>
      </sort-order>
    </state>
</operator>

Best,

Tim Finney


_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to