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

CQL searching for intersections of users and content has unexpected results

    XMLWordPrintable

Details

    • Major

    Description

      Issue Summary

      /api/search and the /api/content/search both return unexpected results when searching for intersections of type=user and type=content

      Steps to Reproduce

      1. Make a CQL search for an intersection of user and content types.

      Expected Results

      • type = page AND type = user returns all pages.
      • type = page OR type = user returns all pages.
      • type IN (page,user) returns all pages.
      • type != page AND type = user, this returns all content types except pages. Content types include page, blog, attachment, comment.

      Actual Results

      Examples:

      • type = page AND type = user returns all the pages. This is the expected behavior.  The same goes for any other combination with user (blogpost+user, space+user, and user+page, user+blogpost, user+space), these ignore the user filter. 
      • type = page OR type = user returns only all the users, instead of all users+pages. Same for any other combination, these all return the users and ignore the other filter.
      • type IN (page,user) returns only all the users, instead of all users+pages. Same for any other combination, these all return the users and ignore the other filter.
      • type != page AND type = user, this returns an unexpected number of results, except when the user is at the front (ex.: type != user AND type = page), which all work correctly.

      This is reproducible on Data Center: no

      Workaround

      • Break CQL queries into separate subqueries on type=user or type=content.
      • Use /wiki/api/content/search REST API for content search. This API doesn't return users.

      Attachments

        Issue Links

          Activity

            People

              ywang2@atlassian.com Ying Wang
              nmcginley nmcginley
              Votes:
              11 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: