It's now fixed.
Note that the syntax follows SQL92 here, you have to say:
SELECT * FROM document WHERE dc:created >= DATE '2007-01-01'
or
SELECT * FROM document WHERE dc:created >= TIMESTAMP '2007-01-01
12:30:00+03:00'
for instance.
Florent
On 2 Mar 2007, at 20:14, Vincent Dutat wrote:
Ok, thanks.
Florent Guillaume wrote:
Ok but there really is a bug on our side, I'm fixing it now.
I'll keep you posted.
Florent
On 2 Mar 2007, at 17:34, Florent Guillaume wrote:
Ah yes, the format that Jackrabbit accepts is very strict, see
http://jackrabbit.apache.org/api-1/org/apache/jackrabbit/util/
ISO8601.html
You'll have to use for example:
2007-01-31T12:00:00.000+01:00
Florent
On 2 Mar 2007, at 16:38, Vincent Dutat wrote:
Hi,
I tried already to give the date in the ISO form like
"2007-01-31" but it does not work, neither "2007-01-31
12:00:00". Here is the Lucene warning extracted from server.log:
2007-03-02 16:33:30,766 DEBUG
[org.nuxeo.ecm.webapp.search.SearchBusinessDelegate]
<searchWithNXQL> NXQL: SELECT * FROM NoteDeService WHERE
ns:date_publication = "2007-07-02 12:00:00"
2007-03-02 16:33:30,766 DEBUG
[org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterce
ptor] ++++ LongLivedSessionPropagationInterceptor
2007-03-02 16:33:31,501 WARN
[org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder]
Unable to coerce '2007-07-02 12:00:00' into a DATE.
2007-03-02 16:33:31,595 DEBUG
[org.nuxeo.ecm.webapp.search.SearchBusinessDelegate]
<searchWithNXQL> results contains 0 docs
Florent Guillaume wrote:
Ok I didn't find any bug in our code. The dates are passed as
strings directly to the backend that interprets it. It must
mean that when you generate the SQL expression you generate
dates like "04/07/2002" which are incorrect (or at least
confusing because locale-dependent), the only format supported
everywhere with certainty is the ISO one, like "2007-02-20
12:00:00". So you should generate your NXQL queries with this
format.
Florent
On 1 Mar 2007, at 20:35, Vincent Dutat wrote:
Hi, I got the following warning :
2007-03-01 20:32:48,703 WARN
[org.apache.jackrabbit.core.query.lucene.LuceneQueryBuilder]
Unable to coerce '04/07/2002' into a DATE.
Florent Guillaume wrote:
Hi Vincent,
Could you check in the logs what query is executed? For
instance (here for a full-text query):
2007-02-28 18:50:03,312 INFO
[org.nuxeo.ecm.core.jcr.JCRQuery] execute XPath query: //
element(*, ecmnt:document)[jcr:contains(.,'*toto*')]
It's possible that there is a bug in the NXQL -> JCR
conversion...
Also, what unwanted results do you get?
Florent
On 28 Feb 2007, at 11:27, Vincent Dutat wrote:
Hi,
I am having problems with NXQL when query contains a where-
clause with a date. It looks like the '=' does not work.
For example, I created a document on Feb 20 2007 and the
following query does not work :
SELECT * FROM document WHERE dc:created = "2007-02-20"
But the following one works but it also gives me unwanted
results :
SELECT * FROM document WHERE dc:created >= "2007-02-20"
--Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com http://www.nuxeo.org +33 1 40 33 79 87
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm