Hi Ambika, That is because, by default, if it sees a wildcarded expression, it will try and run a wildcarded search if your indexes support it. If you do not want that, explicitly set the options. Try using an unwildcarded term-option. Something like:
xquery version "1.0-ml"; import module namespace search = "http://marklogic.com/appservices/search" at "/MarkLogic/appservices/search/search.xqy"; search:search("hello w*", <options xmlns="http://marklogic.com/appservices/search"> <term> <term-option>unwildcarded</term-option> </term> <debug>true</debug> </options>) -Danny From: [email protected] [mailto:[email protected]] On Behalf Of ambika arumugam Sent: Monday, October 03, 2011 2:24 AM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Reg: Wildcarded phrased search Hi all, I am using search:search API, to perform wild-carded phrased search. My understanding is phrased search exactly matches the string between quotes. While i perform wild-carded phrased search it gives precedence to wild-carded character rather performing a phrased search of the word as such between quotes. This is the query search:search('"Developing P*"', (), 1, 20 ) where it gives me results matching Developing Plan, Developing Physics, Developing Plaque. The expected result is Developing P*. Is there any way to give precedence to phrased search in a scenario like this. Regards Ambika
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
