06-23-2021 12:59 AM
Hi Team,
I inserted a document into alfresco having a metadata format as in the attached image.
The document is getting created with the given input. But when I try searching the doucment using the OOTB API, I am getting an bad request error mentioning the details as "Unrecognized Character escape '*'".
So I tried creating the file by removing the second asterisk(*) mark from the document metadata. Attaching the text used in doucment metadata:
So the file has been created suucessfully and I'm able to search the file too.
But the file still contains one asterisk mark in it only the second one has been removed and still it does not throw the error now. What could it be? What is the default alfresco search behaviour? Can anyone please suggest me what is the actual reason for this to happen?
Thanks!
06-23-2021 02:27 AM
I assume you are translating that documentMetaData JSON into some form of "actual" Alfresco properties, because otherwise that would only me indexed fulltext content, and not metadata at all.
Also, it would have been good to know HOW you are searching via the default APIs, e.g. what your queries looked like. So I only can assume that you use the literal value as a query term, i.e.
"Test$*?@!%)(_+-=~\*\"';//?.>,<"
In this case, assuming the query language is fts-alfresco, there should be no error. In case you did actually run a CMIS query in the form of
SELECT * FROM cmis:document D JOIN acme:aspect A ON D.cmis:objectId = A.cmis:objectId WHERE A.cmis:clientName = 'Test$*?@!%)(_+-=~\*"\';//?.>,<'
Then I could understand the error, because in CMIS QL, there is no support for escaping an asterisk, as it is not a special character.
So, please do provide more details, or we can only guess like I did...
Explore our Alfresco products with the links below. Use labels to filter content by product module.