How to search and return document name in Marklogic?
===

How Can I search contents of documents and return the corresponding document name in Marklogic? Suppose my document name is test.doc and it contains a text e.g "hello world". Now I am uploading this document in Marklogic Server and the content processor will generate the corresponding xml files. Now I am searching like this:-

    import module namespace search="http://marklogic.com/appservices/search" at "/Marklogic/appservices/search/search.xqy";
    declare variable $options:=
    <options xmlns="http://marklogic.com/appservices/search">
    <transform-results apply="raw"/>
    </options>;
    
    for $d in search:search("hello world", $options)/search:result
    return tokenize(data($d/@uri), "/")[last()]

It returns the corresponding xml and xhtml file names containing the text "hello world" but I want to return only the original document name (test.doc) not the corresponding xml file name. 