Hi, newbie to XQuery and Marklogic here. I'm trying to do something like the 
following:

                ...
                $englishQuery := search:parse($queryString, $englishOptions),
                $germanQuery := search:parse($queryString, $germanOptions),
                $query := cts:query( cts:or-query((cts:query($englishQuery), 
cts:query($germanQuery)))),
                $results := search:resolve($query, 
bhccSearch:getSearchOptions($target, $page))
                return ...

I have content which is English, and other content which is German, and I am 
trying to build queries which will search both the English and German content, 
and then build a cts:or-query from those, and finally build a cts:query from 
the cts:or-query which I can use with search:resolve to return results. I keep 
getting errors like this:

XDMP-ARGTYPE: (err:XPTY0004) cts:query(cts:or-query((cts:word-query("pa", 
("lang=en"), 1), cts:word-query("pa", ("lang=de"), 1)))) -- arg1 is not of type 
element()

So I guess the cts:or-query constructor is not returning me an element as 
needed by the cts:query constructor. Can someone explain why this is and how I 
should handle this?

Cheers,

Adam
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to