Hi,
On 1/12/07, David Johnson <[EMAIL PROTECTED]> wrote:
More interesting details - I printed out the publishDate for each Story. It
seem that the upper bound is being properly matched, and it is the lower
bound that is being ignored.
Interesting, thanks for the efforts to track this!
I did some more testing on this with the following code snippet:
Repository repository = new TransientRepository();
Session session = repository.login(
new SimpleCredentials("admin", "admin".toCharArray()));
Node test = session.getRootNode().addNode("test");
session.save();
for (int i = 0; i < 1000; i++) {
Node node = test.addNode("node" + i);
node.setProperty("date", Calendar.getInstance());
session.save();
QueryManager manager = session.getWorkspace().getQueryManager();
String xpath = "//[EMAIL PROTECTED] >
xs:dateTime('2001-01-01T00:00:00.000Z')]";
Query query = manager.createQuery(xpath, Query.XPATH);
NodeIterator iterator = query.execute().getNodes();
if (iterator.getSize() != i + 1) {
System.out.println((i + 1) + " != " + iterator.getSize());
while (iterator.hasNext()) {
System.out.println(iterator.nextNode().getPath());
}
break;
}
}
test.remove();
session.save();
session.logout();
The query works as expected all the way to 225 created /test/nodeN
nodes, but after that the date comparison just gets ignored and the
query returns all the nodes (including everything in /jcr:system) in
the workspace.
Very strange indeed, perhaps this is a Lucene issue? I'll dig deeper...
BR,
Jukka Zitting