AnsweredAssumed Answered

Alfresco 4 greater (>) and lesser (<) operator not working

Question asked by namoo on Nov 8, 2011
Hi

I&#39;m migrating Alfresco Community 3.4.d to Alfresco 4.0.b.
The following Web Script, which has greater operator with query, was working with Alfresco Community 3.4.d


var docquery = "SELECT * FROM cmis:document WHERE cmis:creationDate >= TIMESTAMP &#39;2011-11-04T16:09:58.438-07:00&#39;";
var def = {
   query: docquery,
   language: "cmis-alfresco"
};

var results = search.query(def);
&#8230;
&#8230;

But, when I tried with Alfresco Community 4.0.b. It&#39;s not working. So I tried RESTful service on Alfresco Community 4.0.b:

http://127.0.0.1:8080/alfresco/service/cmis/query?q=SELECT%20*%20FROM%20cmis:document%20WHERE%20cmis:creationDate%20%3E=%20TIMESTAMP%202011-11-04T16:09:58.438-07:00

and it returns following response:


<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/">
<author><name>admin</name></author>
<generator version="4.0.0 (b 3835)">Alfresco (Community)</generator>
<icon>http://127.0.0.1:8080/alfresco/images/logo/AlfrescoLogo16.ico</icon>
<id>http://www.alfresco.org/rss/atom/urn:uuid:resultset</id>
<link rel="service" href="http://127.0.0.1:8080/alfresco/service/cmis'/>
<link rel="self" href="http://127.0.0.1:8080/alfresco/service/cmis/query?q=SELECT%20*%20FROM%20cmis:document%20WHERE%20cmis:creationDate%20%3e=%20TIMESTAMP%20%272011-11-04T16:09:58.438-07:00%27'/>
<title>Result set for SELECT * FROM cmis:document WHERE cmis:creationDate &gt;= TIMESTAMP &apos;2011-11-04T16:09:58.438-07:00&apos;</title>
<updated>2011-11-07T17:09:43.144-08:00</updated>
<opensearch:totalResults>0</opensearch:totalResults>
<opensearch:startIndex>0</opensearch:startIndex>
<opensearch:itemsPerPage>-1</opensearch:itemsPerPage>
<cmisra:numItems>0</cmisra:numItems>
</feed>

However, when I used only &#39;=&#39; operator it returns matching cm:content.

Your help will be very appreciated.
Thank you!

Outcomes