tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

FTS Queries using = and multiple values fail on Alfresco 5.1.1 #1151

Open gsteimer opened 8 years ago

gsteimer commented 8 years ago

In alfresco 4.2.x the wizard admin generates a query to get one or more pages in a certain form. A query is generated like this:

(TYPE:aw\:page  AND (@aw\:pageSetName:"Simple CR" AND @aw\:pageId:( "pg2" "pg3"))) AND NOT ASPECT:\{http\://www\.alfresco\.org/model/content/1\.0\}workingcopy

This query works. In alfresco 5.1.1, however, this query is transformed to:

(TYPE:aw\:page  AND (=aw\:pageSetName:"Simple CR" AND =aw\:pageId:( "pg2" "pg3"))) AND NOT ASPECT:\{http\://www\.alfresco\.org/model/content/1\.0\}workingcopy

which doesn't work. Interestingly though, if I change the =aw\:pageId:( "pg2" "pg3") to @aw\:pageId:( "pg2" "pg3"), the query does work.

Essentially though, I think the fix here is to better separate out multiple values when using the = syntax. This query does work on alfresco 5.1.1 and 4.2.x:

(TYPE:aw\:page  AND (=aw\:pageSetName:"Simple CR" AND (=aw\:pageId:"pg2" OR =aw\:pageId:"pg3"))) AND NOT ASPECT:\{http\://www\.alfresco\.org/model/content/1\.0\}workingcopy
ghost commented 8 years ago

@gsteimer @mikeblum This seems similar to the fix we just did?

mikeblum commented 8 years ago

@mikeblum - look into this

gsteimer commented 8 years ago

Note - I was able to fix the AW Admin issue that prompted this by simply changing how we were querying for pages. Leaving this here, but lowering the priority since there's a workaround.