cancel
Showing results for 
Search instead for 
Did you mean: 

cmis CONTAINS with * wildcard and trailing space

pluttero
Champ in-the-making
Champ in-the-making
Dear All,
I'm experiencing a strange behaviour with this cmis query:

select * from cp:myAspect  where CONTAINS  ('cpSmiley TongueTitle:foobar*')

Basically I want everything matching a Title containing 'foobar' then anything. The above query works as expected.

If then I issue:

select * from cp:metadatiPratica  where CONTAINS  ('cpSmiley TongueTitolo:allegat *')

the query is the same as the first one, but with a trailing space. In this case I get the following error:

"maxClauseCount is set to 10000"

I observe the same behaviour with chemistry workbench 0.9.0 and  via java api.

Now, having a space followed by *, is probably not correct, because CONTAINS is already tokenizing (right?), but I would not expect this error.

Thanks
1 REPLY 1

kaynezhang
World-Class Innovator
World-Class Innovator
The expression you embedded in CMIS-SQL using the contains() predicate function is full text search query text .
If you use 'cpSmiley TongueTitolo:allegat *'(with trailing space),alfresco will treat it as two terms(phrases) combined using "OR"("OR" is the default connective),then it will match all documents of type "cp:metadatiPratica".