-
Bug
-
Resolution: Won't Fix
-
Low
-
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)
- Install it on a cloud instance
- 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
- 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.
- 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.