Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-39566

CQL query fails when using a semicolon

    XMLWordPrintable

Details

    Description

      Issue

      Performing a CQL search with a semicolon generates an error

      Examples
      Error code
      {
      statusCode: 400,
      data: {
      authorized: false,
      valid: true,
      errors: [ ]
      },
      message: "Could not parse cql : title=test:"
      }
      
      Report from DoS

      Entering title~"somethingwithacolon:" throws an error. It's because in a Lucene query, the ':' marks a key and a value, so 'macroName:jira' is the Lucene syntax to search for pages that contain a JIRA macro. It does however work if you use '=' instead of '' (eg title="somethingwithacolon:"), or if you put double and single quotes around the value - title"'somethingwithacolon:'" - that stops Lucene from trying to interpret it as a key/value pair.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rlouie Robert Louie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: