Hi Judie, When you suspect that Search API is misbehaving it's always good to test your options node via search:check-options. In this case:
import module namespace search = "http://marklogic.com/appservices/search " at "MarkLogic/appservices/search/search.xqy"; search:check-options( <options xmlns="http://marklogic.com/appservices/search"> <term-option>stemmed</term-option> </options> ) => <search:report id="SEARCH-SCHEMAINVALID" xmlns:search="http://marklogic.com/appservices/search "><error:format-string xmlns:error="http://marklogic.com/xdmp/ error">XDMP-VALIDATEUNEXPECTED: (err:XQDY0027) validate strict { $opt } -- Invalid node: Found search:term-option but expected ... Per the options schema, <term-option> must be a child of the container <term>. If you fix that, you'll see consistent error handling. Thanks, -m On Oct 20, 2009, at 8:26 AM, judie pearline wrote: > Hi all, > > we are facing a contradiction between the behaviour of search:search > and cts:search. > > Consider a scenario where the stemmed search option was turned off > and the Word search option was made to true in the database admin > screen. Then the search performed using the query search:search > returns unstemmed search results whereas the cts:search query > returns error. > > Search:search > ---------------------- > search:search("is", > <options xmlns="http://marklogic.com/appservices/search"> > <term-option>stemmed</term-option> > </options> > ) > cts:search > ----------------- > cts:search(fn:collection(), cts:word-query("is", ("stemmed"))) > > Can you please explain the reason for this.Thanks. > > Regards, > Judie. > > Now, send attachments up to 25MB with Yahoo! India Mail. Learn > how._______________________________________________ > General mailing list > General@developer.marklogic.com > http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com http://xqzone.com/mailman/listinfo/general