If you can more fully specify the path or use indexes, you can get better performance testing for equality (if you are looking for an exact match).
Presuming you have
<doc userID="Jack" date="2004-01-23"> </doc>
You would retrieve faster with value indexes on the @userID and @date attributes
and using a query like:
/[EMAIL PROTECTED]"Jack" and @date="2004-01-23"]
There are similar optimizations available if userID and date are child nodes of <doc> instead of attributes.
-Terry
Upayavira wrote:
Boris Rousseau wrote:
Thanks guys.
In fact, once embedded into my code there is no problem with the command interpreter.
However, I still have one issue:
I want to retrieve all the documents from the collection where the userID is
Jack and the date is 2004-01-23
Would the following query be correct?
//doc([contains(userID,"Jack")] and [contains(date,"2004-01-23")])
//doc[contains(userID,"Jack") and contains(date,"2004-01-23")]
or if you can (because the previous will have to scan your whole document):
/doc[contains(userID,"Jack") and contains(date,"2004-01-23")]
Upayavira