cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Query Full Text with special Characters

jonatan_guillen
Champ in-the-making
Champ in-the-making
I'm doing the CMIS query:

SELECT * FROM cmis:document WHERE CONTAINS('\'test-property: value\'')



When I run this query, Alfresco do full text search: "test-property:" OR "value" . I want to search complete phrase.

There any problem with '-' or ':' in full text search??
1 REPLY 1

parashiftaustra
Confirmed Champ
Confirmed Champ
If you want to do a full text phrase search, then you need to escape your term with quotes like you have done in your example. The text will still be tokenized and have special characters omitted.

If you're trying to search by property, then you should use that as an extra clause in your query, rather than using the contains predicate.

For instance, finding all the documents containing the phrase `lorem ipsum` and with the creator set to `admin`:

SELECT * FROM cmis:document WHERE CONTAINS('\'lorem ipsum\'') AND cmis:createdBy = 'admin'


If you want to search for documents that contain both the term lorem and ipsum, you can use the uppercase AND operator:

SELECT * FROM cmis:document WHERE CONTAINS('lorem AND ipsum')

Hope this helps!