Thanks a lot. It worked for me.
On Wed, Jan 30, 2013 at 9:49 PM, Charles Greer <[email protected]> wrote:
> Hi Manoj, to add a little more scaffolding,
>
> In QConsole, you can enter this:
>
> <anytag>{cts:word-query("sentences") }</anytag>
>
> And it will return the XML representation needed in the REST options.
>
> Charles
>
>
>
>
> On 01/30/2013 07:57 AM, Erik Hennum wrote:
>
> Hi, Manoj:
>
> search:additional-query doesn't take an embedded XQuery expression.
>
> Embedded expressions work when you call search:resolve in XQuery, but only
> because the embedded expression is serialized to XML during construction of
> the complete search:options structure.
>
> That is, when you execute the same call in XQuery, what's really passed to
> search resolve is:
>
> <search:additional-query>
>
> <cts:word-query><cts:text>sentences</cts:text></cts:word-query>
> </search:additional-query>
>
> That's the form in which the REST client has to pass the additional query.
>
> (The REST API doesn't evaluate any expressions embedded within an XML payload
> because that would open the door for injection attacks.)
>
>
> Hoping that helps,
>
>
> Erik Hennum
>
> ________________________________
> From: [email protected]
> [[email protected]] on behalf of manoj viswanadha
> [[email protected]]
> Sent: Wednesday, January 30, 2013 3:39 AM
> To: MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] additional-query in ML-6 rest api
>
> Hi all,
>
> I have tried passing options into ML-6 restapi with additional-query.
>
> I just tried a Cts:word-query into additional-query but it is not taken into
> main query
> and does not filter the results based on options with additional-query
>
> <options xmlns="http://marklogic.com/appservices/search"
> <http://marklogic.com/appservices/search>>
> <additional-query>
> {cts:word-query("sentences") }
> </additional-query>
> </options>
>
> Can anyone help me how i can use <additional-query> if i am wrong?
>
> Thanks,
> Manoj
>
>
>
>
> _______________________________________________
> General mailing
> [email protected]http://developer.marklogic.com/mailman/listinfo/general
>
>
> --
> Charles Greer
> Senior Engineer
> MarkLogic [email protected]
> Phone: +1 707 408 3277www.marklogic.com
>
>
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general