Hi Pradeep,

Have you tried creating a bucket range constraint for your date range?  There 
are a few examples in the Search Dev Guide 
(http://developer.marklogic.com/pubs/4.1/books/search-dev-guide.pdf) starting 
around page 49.

-Danny

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Pradeep Maddireddy
Sent: Tuesday, May 25, 2010 8:50 AM
To: General
Subject: [MarkLogic Dev General] Search API additional Query

Hi..!

 I have a requirement where I have to fetch documents which satisfy
one of  the following conditions
Q1.  price = 100
Q2.  publish-date Before(less than)  2009-01-01

and Q3.  Belong to Collection "Books"

basically  (Q1 OR Q2) AND Q3

I am building the search term price:100 and passing it as search term.
As the search API doesn't support greater than and less than I am
building cts:element-range-query and collections-query and passing it
in additional_query part of options Node

but this becomes  Q1  AND  (Q2 AND Q3).

Is there any work around for this other than building a
element-range-query for Q1 as well and passing it as additional Query.

It could have been helpful, if we had an or-part and and-part in
additional query.

Thanks
Pradeep Maddiredy






Thanks
Pradeep Maddireddy
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to