cancel
Showing results for 
Search instead for 
Did you mean: 

cmis-alfresco search providing incorrect results

jas_bolton
Champ in-the-making
Champ in-the-making

When using a Node Browser cmis-alfresco search certain characters appear to be interpreted as wild cards:

As an example, a folder exists in Alfresco named ANameFollowedbyaChar“SecondName.Given “ is an illegal search (results in 09170367 line 1:42 no viable alternative at character '“'), this is replaced in the search with _x20ac_

SELECT cmisSmiley Tongueath FROM cmis:folder WHERE IN_TREE('AFolder' ) AND CONTAINS('cmis:name:ANameFollowedbyaChar_x20ac_SecondName*')

the search locates the folder , but would also locate a folder with a similar name, e..g ANameFollowedbyaChar€SecondName.

The search appears to be using _x20ac_ as a wildcard. This behavior is consistent when search for several non standard chars.e.g when using values “ (_x20ac_) , €    (_x201c _) , -(_x002D_) in the search statement  , the folder ANameFollowedbyaChar“SecondName would be located.

Why is the search treating these values as a wildcards ?

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

These characters are NOT treated as wildcards but as simple punctuation characters which will be treated basically just like a whitespace would in CONTAINS queries. This is a feature of the full text search engine and intended. If you use exact match queries with = then those characters are treated as unique literals and will not cause these kind of matches.

View answer in original post

1 REPLY 1

afaust
Legendary Innovator
Legendary Innovator

These characters are NOT treated as wildcards but as simple punctuation characters which will be treated basically just like a whitespace would in CONTAINS queries. This is a feature of the full text search engine and intended. If you use exact match queries with = then those characters are treated as unique literals and will not cause these kind of matches.