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.ExtendedPersistenceContextPropagationInterceptor]
++++ 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