OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cmis message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Commented: (CMIS-660) Clarification needed onthe use of quotes in a CONTAINS() query to search on phrases



    [ http://tools.oasis-open.org/issues/browse/CMIS-660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=19649#action_19649 ] 

David Choy commented on CMIS-660:
---------------------------------

Quotes around the text search expression provide an isolation between parameter-parsing for CONTAINS() and the text search expression syntax.  If they are removed, then an escape for "," would be needed in the text search expression. For the 1.0 text search syntax, this can happen in a <word>.  This would also create a constraint on future text search syntax.  We could switch from a quoted expression in 1.0 to an unquoted expression in 1.1, and may switch it back later if we wish.  From an implementation standpoint, such change is relatively minor. From a usability standpoint however, flipflopping may not be desirable, unless removing the quotes and introducing an escape for "," buy us something in return.

For phrase, it seemed that either single quotes or double quotes would work.  Perhaps it is a matter of usability: whether one form is more desirable than the other, and adding to the discussion, whether it is desirable to support both.

> Clarification needed on the use of quotes in a CONTAINS() query to search on phrases
> ------------------------------------------------------------------------------------
>
>                 Key: CMIS-660
>                 URL: http://tools.oasis-open.org/issues/browse/CMIS-660
>             Project: OASIS Content Management Interoperability Services (CMIS) TC
>          Issue Type: Improvement
>          Components: Domain Model
>    Affects Versions: Draft 0.70
>            Reporter: Jane Doong
>            Assignee: Ethan Gur-esh
>            Priority: Minor
>
> Clarification needed on the use of quotes in a CONTAINS() query to search on phrases.
> Spec:
> 2575  BNF grammar structure:: CONTAINS ( [ <qualifier> ,] ' <text search expression> ' )
> 2413  <phrase> ::= <quote> <word> [ {<space> <word>} ... ] <quote>
> 2422  <quote> ::= "'" !! Single-quote only, consistent with SQL-92 string literal
> 2597  Within a word or phrase, each (single-)quote must also be escaped by a preceding backslash "\"
> The spec specifically states that <quote> is single-quote only.
> My questions is on specifying a phrase inside the CONTAINS(). 
> Since the entire text search expression is enclosed in single quotes, 
> I question whether a phrase should again be enclosed in single quotes, or should it be in double-quotes.
> According to spec:
>  Word search:    CONTAINS('house')
>  Phrase search : CONTAINS(' 'my house' ')
> Should phrases be in double-quotes? ==> CONTAINS(' "my house" ')

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]