Hi Mano,
I recommend looking at the “Creating Alerting Applications” chapter in the 
Application Developer’s Guide 
(http://developer.marklogic.com/pubs/4.1/books/dev_guide.pdf).  It describes 
alerting applications, the Alert API, cts:reverse-query, and references a 
sample alerting application shipped with the product.

To briefly answer your questions, when the cts:contains with the 
cts:reverse-query returns true, it means that the node would match the query 
specified if you queried it with that query.  In an alerting application, you 
would look at nodes (for example, you might look at new documents that are 
added in a particular directory) and if those documents match your query, you 
would do some action (for example, send an email to the person who stored the 
query).

Hope that helps,
-Danny


From: [email protected] 
[mailto:[email protected]] On Behalf Of mano m
Sent: Friday, October 23, 2009 6:17 AM
To: [email protected]
Subject: [MarkLogic Dev General] cts:reverse-query() in Alerting

Hi,

I am doing samples in Alerting.

1. I have created a serialized cts:query XML and stored in database.
 URI : /queries.xml
<queries>

          <cts:text>Java</cts:text>
  </cts:word-query>
</queries>

2.Now executed the following code will return "true"

let $node := fn:doc("/queries.xml")
let $query := <xml-element>{cts:word-query("Java")}</xml-element>
return
cts:contains($query, cts:reverse-query($node))

1. How can we use this cts:reverse-query() in alerting application?

2. Whether cts:reverse-query() can be called in alert Rules?

Please send me if there is any sample related to cts:reverse-query() in 
alerting. Thanks in advance.

Regards,
Mano


________________________________
Add whatever you love to the Yahoo! India homepage. Try 
now!<http://in.rd.yahoo.com/tagline_metro_3/*http:/in.yahoo.com/trynew>
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to