Hello All,

I am new to search api and i am having trouble in implementing one
functionality. There are basically two things that i am stuck with:

   1. Can i have two operators in the options?
   2. I have a code which looks something like this:

           <operator name="sort">
                        <state name="relevance">
                                <sort-order>
                                        <score/>
                                </sort-order>
                        </state>
                        <state name="date">
                                <sort-order direction="descending"
type="xs:date" collation="">
                                        <element ns="
http://www.marklogic.com/app/meta"; name="Date"/>
                                </sort-order>
                                <sort-order>
                                        <score/>
                                </sort-order>
                        </state>
                </operator>
                <operator name="JournalOnlineFirst">
                        <state name="true">

<searchable-expression>/Publisher[.//JournalOnlineFirst]</searchable-expression>
                        </state>
                </operator>

If my URL has an reads something like this
"localhost:1234://..../q=issn:1573-4803
journalonlinefirst:true&api_key=asdbfdas2342sfda" i want the api to fetch
me those docs which are of the type JournalOnlineFirst. But i get the error
as :"

XDMP-ARGTYPE: (err:XPTY0004)
fn:in-scope-prefixes((<searchable-expression
xmlns="http://marklogic.com/appservices/search";>/Publisher[.//JournalOnlineFirst]</searchable-expression>,
<searchable-expression
xmlns="http://marklogic.com/appservices/search";>fn:collection()</searchable-expression>))
-- arg1 is not of type element()"

Please suggest how to achieve the result because i am stuck at this place.
I have also tried something like this.

"<operator name="JournalOnlineFirst">
                        <state name="true">
                        </state>
                </operator>

<searchable-expression>/Publisher[.//JournalOnlineFirst]</searchable-expression>".


Here i dont get the result, but i dont get the error as well. Please let me
know where i am going wrong. Thanks in advance.
Regards
Amit
_______________________________________________
General mailing list
[email protected]
http://community.marklogic.com/mailman/listinfo/general

Reply via email to