You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Ian Ashley <ia...@opentext.com> on 2013/06/06 21:47:23 UTC
Freetext search escaping
Dear all,
I think that the query parser does not handle the escaping properly in CONTAINS searches. The queries below fail at the parsing stage
SELECT cmis:objectId FROM Picture WHERE CONTAINS('Don\'t eat or drink this')
SELECT cmis:objectId FROM Picture WHERE CONTAINS('Do not eat\\drink this')
Regards,
Ian
Re: Freetext search escaping
Posted by "Huebel, Jens" <j....@sap.com>.
Please see section 2.1.14.3 of the CMIS spec.
Text search needs double escaping:
Example:
A query statement that contains a full-text search for the literal
string "John'sPresentation-Version2" may be
composed as:
SELECT ... FROM ... WHERE ...
CONTAINS('John\\\'sPresentation\\-Version2')
Jens
On 06.06.13 21:47, "Ian Ashley" <ia...@opentext.com> wrote:
>Dear all,
>
>I think that the query parser does not handle the escaping properly in
>CONTAINS searches. The queries below fail at the parsing stage
>
>SELECT cmis:objectId FROM Picture WHERE CONTAINS('Don\'t eat or drink
>this')
>SELECT cmis:objectId FROM Picture WHERE CONTAINS('Do not eat\\drink this')
>
>Regards,
>Ian
>