Try adding the following to your options element:

            <term xmlns="http://marklogic.com/appservices/search";>
                <term-option>case-sensitive</term-option>
                <term-option>diacritic-sensitive</term-option>
                <term-option>punctuation-sensitive</term-option>
                <term-option>whitespace-sensitive</term-option>
                <term-option>unstemmed</term-option>
                <term-option>unwildcarded</term-option>
            </term>

SS

From: [email protected] 
[mailto:[email protected]] On Behalf Of ambika arumugam
Sent: Wednesday, September 07, 2011 10:32 PM
To: General MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] search:search API no exact match on results

Hi all,

In search:search API, I would like to perform a exact search in the element 
'name'. I am creating a constraint for the element name.

This is the query i am running,

xquery version "1.0-ml";
import module namespace search = "http://marklogic.com/appservices/search";
    at "/MarkLogic/appservices/search/search.xqy";

let $g:=<options xmlns="http://marklogic.com/appservices/search";>
<constraint name="name">
            <word type="xs:string" facet="false">
              <element name="name"/>
            </word>
        </constraint>
</options>

return search:search('name:"A-Rehim"',$g,1,30)

And it gets me the results for A-Rehim and also A Rehim. But i want the results 
only for A-Rehim. Is the API runs this way or is it possible to make 
search:search API do a exact match.

Regards,
Ambika


 NOTICE: This email message is for the sole use of the intended recipient(s) 
and may contain confidential and privileged information. Any unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended recipient, please contact the sender by reply email and destroy all 
copies of the original message.


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

Reply via email to