HI.

You would want to put range indexes on the min and max attributes
You could then use cts:element-attribute-range query to actually do your
CTS logic
http://docs.marklogic.com/cts:element-attribute-range-query





Kind Regards,
David Ennis


David Ennis
*Content Engineer*

[image: HintTech]  <http://www.hinttech.com/>
Mastering the value of content
creative | technology | content

Delftechpark 37i
2628 XJ Delft
The Netherlands
T: +31 88 268 25 00
M: +31 63 091 72 80

[image: http://www.hinttech.com] <http://www.hinttech.com>
<https://twitter.com/HintTech>  <http://www.facebook.com/HintTech>
<http://www.linkedin.com/company/HintTech>

On 2 February 2015 at 18:17, Dinesh <[email protected]> wrote:

> Hello MarkLogic experts,
>
> Sorry, one correction in below query/results
>
> Could you please advise how to use cts functions for the below sample
> results using MarkLogic.
>
> XML
>
> <entry min="100" max="999">
>
> <product>apple</product>
>
> </entry>
>
> <entry min="1" max="99">
>
> <product>orange</product>
>
> </entry>
>
> </root>
>
>
>
> Query:
>
> Query 1 : < 200   (Less than)
>
> Results should be: apple, orange
>
> Query 2 : > 200  (Greater than)
>
> Results should be: apple
>
>
>
>
>
> Regards,
>
> Dinesh
>
>
>
> _______________________________________________
> 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