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