Allow all non-whitespace characters in a search word, and allow unbalanced quotes and parentheses

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • V4.01_CS02
    • Affects Version/s: V4.01_CS01
    • Component/s: ABNF, URL Conventions
    • None
    • Environment:

      Applied

    • Hide

      Clients can send unbalanced expressions in $search to simplify type-ahead use cases if these unbalanced expressions are sent as OData string literals, i.e. enclosed in single quotes, and single quotes within the string need to be doubled to escape them.

      Services can announce this feature via term property Capabilities.SearchRestrictions/AllowUnbalancedExpressions (boolean, default false).

      Show
      Clients can send unbalanced expressions in $search to simplify type-ahead use cases if these unbalanced expressions are sent as OData string literals, i.e. enclosed in single quotes, and single quotes within the string need to be doubled to escape them. Services can announce this feature via term property Capabilities.SearchRestrictions/AllowUnbalancedExpressions (boolean, default false).
    • Show
      https://github.com/oasis-tcs/odata-abnf/pull/18/files https://www.oasis-open.org/committees/download.php/65500/odata-v4.01-wd06-part2-url-conventions-2019-06-20.docx  

      The ABNF rule for searchWord is overly restrictive, allowing only Unicode letters, numbers, and some punctuation characters. Character sequences with other characters need to be enclosed in double-quotes to pass the ABNF, i.e. be formulated as a searchPhrase.

      However double-quoted "phrases" typically have special meaning for search engines, e.g. use exact, non-fuzzy match, meaning that $search=word and $search="word" have different results.

      Also when used for type-ahead the search expression will typically be incomplete while the user is typing, and the user's expectation is to already see matching proposals while typing. All these search requests should give a search result and none of them should lead to an error:

      $search="
      $search="b
      $search="bl
      $search="blu
      $search="blue
      $search="blue%20
      $search="blue%20p
      $search="blue%20pi
      $search="blue%20pil
      $search="blue%20pill
      $search="blue%20pill"
      

       Same for unbalanced parentheses.

       

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: