Created
October 5, 2012 22:25
-
-
Save evanlenz/3842818 to your computer and use it in GitHub Desktop.
Code examples for article http://developer.marklogic.com/blog/path-range-indexes-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<widget xmlns="http://example.com/widgets"> | |
<part count="30"> | |
<name>Thingamajig</name> | |
</part> | |
</widget> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace wg = "http://example.com/widgets"; | |
cts:values(cts:path-reference("/wg:widget/wg:part/@count")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cts:search(collection(), cts:path-range-query("/wg:widget/wg:part/@count",">",20)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/wg:widget/wg:part[@count gt 20] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare namespace wg = "http://example.com/widgets"; | |
xdmp:query-trace(true()), | |
/wg:widget/wg:part[@count gt 20] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comparison contributed int range value constraint: /w:widget/w:part/@count > 20 | |
... | |
Executing search. | |
Selected 1 fragment to filter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment