Uploaded image for project: 'Atlassian Intelligence'
  1. Atlassian Intelligence
  2. AI-232

Content properties for filtering contents in CQL does not bring expected results

XMLWordPrintable

    • Severity 3 - Minor
    • 1

      Summary

      Content properties filters is made searchable via CQL but the results are not the expected:

      in the sample app:

      "keyConfigurations": [
                {
                  "propertyKey": "cc-eco-test-prop",
                  "extractions": [
                    { "objectName": "user.givenName", "type": "string", "alias": "Vorname" },
                    { "objectName": "user.familyName", "type": "string", "alias": "Familienname" }
                  ]
                },
                {
                  "propertyKey": "aggregates",
                  "extractions": [
                    {
                      "objectName": "content.likes",
                      "type": "number",
                      "alias": "contentLikes"
                    },
                    ...
      

       

      If the search is performed like space = JWPLAYER and Vorname = "JOHN DOE"

      https://domain.atlassian.net/wiki/rest/api/content/search?cql=space=JWPLAYER%20and%20Vorname=%22JOHN%20DOE%22
      
      • It should return data 

       

      Instead, when the search is the opposite space = JWPLAYER and Vorname != "JOHN DOE"

      https://domain.atlassian.net/wiki/rest/api/content/search?cql=space=JWPLAYER%20and%20Vorname!=%22JOHN%20DOE%22
      
      • It should not return any data, but it does.
      • It looks like the result is inverted.

      How to Replicate

      Create Confluence Connect app with searchable content property (sample app is attached)

      1. Install it on a cloud instance
      2. Perform search
        https://domain.atlassian.net/wiki/rest/api/content/search?cql=space=JWPLAYER%20and%20Vorname!=%22JOHN%20DOE%22
        

      Expected Results

      No data is returned

      Actual Results

      Data is returned

      Workaround

      1. Since CQL is sometimes not reliable enough for enumeration use case, we suggest use the “Get content by type for space” API as an alternative. The APP can call: GET /wiki/rest/api/space/{spaceKey}/content/{type}  to fetch all the contents in a space and then filter the contents by content property.
      2. Search and indexing is not 100% reliable when the system is under heavy load. Since the indexing error could be random and transient, another work around is to re-try updating or creating the content property for a few times, and hopefully it will be indexed successfully.

              ywang2@atlassian.com Ying Wang
              71f1dad54ffe Wagner M.
              Votes:
              32 Vote for this issue
              Watchers:
              24 Start watching this issue

                Created:
                Updated:
                Resolved: