Hi Will. This looks like a bug to me. I will file it on the MarkLogic side, but I still recommend sending [email protected] a mail about it.
-Danny -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Will Thompson Sent: Monday, May 23, 2011 3:33 PM To: General MarkLogic Developer Discussion Subject: [MarkLogic Dev General] Problem using operator to override searchable-expression This is basically what I'm trying to do: search:search("smith", <options xmlns="http://marklogic.com/appservices/search"> <searchable-expression>//doc</searchable-expression> <operator name="select"> <state name="note"> <searchable-expression>//note</searchable-expression> </state> </operator> </options>) But this returns an error: "XDMP-ARGTYPE: (err:XPTY0004) fn:in-scope-prefixes((<searchable-expression xmlns="http://marklogic.com/appservices/search">//doc</searchable-expression>, <searchable-expression xmlns="http://marklogic.com/appservices/search">//note</searchable-expression>)) -- arg1 is not of type element()" I assume the complaint is that it's expecting just one instead of a sequence. But as far as I can tell, this can't be avoided if you want to use <searchable-expression> as a child of <state>, since it will automatically include <searchable-expression>fn:collection()</searchable-expression> in addition to whatever is included in the state. This works fine if I use any other search option under <state>. Am I missing something? I'm running v.4.2-4. Thanks, Will _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
