cancel
Showing results for 
Search instead for 
Did you mean: 

search via cmis over aspect with ':' char

pluttero
Champ in-the-making
Champ in-the-making
Dear all,
I'm experiencing a strange behavior while searching with CMIS, using CONTAINS() function.
I have a custom aspect ("dummyAspect"), with a string attribute ("dummyAttrib") which might contain : (colon) character. If, for example, I fill it with string "uffauffa", I find one record (correct result) issuing this query:

SELECT * FROM cp:dummyAspect  where CONTAINS('cp:dummyAttrib:\'uffa*fa\'')

If I modify the aspect from "uffauffa" to "uffa:uffa", the above query finds 0 results.
In order to find 1 record again, I must issue

SELECT * FROM cp:dummyAspect  where CONTAINS('cp:dummyAttrib:\'uffa:*fa\'')

Basically, it seems that the * wildcard does not consider the ":".
Any suggestion?
I do not get any WARNING/ERROR from alfresco logs

My environment is:
alfresco 4.2.c
I'm querying via apache chemistry workbench 0.9
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
you should  escape character ":",like following

SELECT * FROM cp:dummyAspect where CONTAINS('cp:dummyAttrib:\'uffa\:*fa\'')

pluttero
Champ in-the-making
Champ in-the-making
Hi kaynezhang,
the query with ":" works, my problem is when ":" is inside the value, and I'm querying with
SELECT * FROM cp:dummyAspect where CONTAINS('cp:dummyAttrib:\'uffa*fa\'')
I would expect it to find values like "uffa:uffa" while it does not.
Thank you