Class PrototypeSearchService


  • @Deprecated
    public class PrototypeSearchService
    extends AbstractResource
    Deprecated.
    since 5.10. Use the official REST API that lives in confluence-rest-resources.
    A service providing search results using the Confluence search with various parameters.
    • Method Detail

      • doSearch

        public javax.ws.rs.core.Response doSearch​(String query,
                                                  String type,
                                                  String search,
                                                  int startIndex,
                                                  Integer pageSize,
                                                  Integer maxResults,
                                                  String spaceKey,
                                                  Set<String> attachmentType,
                                                  Set<String> label,
                                                  boolean groupResults,
                                                  boolean searchParentName,
                                                  String preferredSpaceKey,
                                                  Integer maxResultsPerGroup)
        Deprecated.
        Search Confluence using the given parameters.
        Parameters:
        query - Query string.
        type - Content types to search for. Can be one of: PAGE, COMMENT, BLOG, ATTACHMENT, PERSONAL_INFORMATION, SPACE_DESCRIPTION, PERSONAL_SPACE_DESCRIPTION, RAW or USER_STATUS. You can specify multiple types by passing a comma separated list like: &type=mail,blog
        search - The type of search. Can be one of: name, site (case sensitive, if no match is found site is assumed).
        startIndex - Start index for site/ungrouped name searches.
        pageSize - Max size of page for site/ungrouped name searches.
        spaceKey - Keys of spaces to search in. If not specified, Confluence searches in all spaces.
        attachmentType - Attachment types to search in. If not specified, Confluence searches all attachments. Can be one or more of: PDF IMAGE, XML, HTML, TEXT, WORD, EXCEL, POWERPOINT, JAVA_SOURCE, JAVA_ARCHIVE, ZIP. You can specify multiple types like this: ?attachmentType=image&attachmentType=pdf
        label - Filters the results for content with the specified labels, if not specified all results are returned. Format is namespace:label, e.g. global:label. Namespaces: global, my, team, and system.
        groupResults - indicates whether results should be grouped (default is true) for name searches
        searchParentName - indicates whether search should include the parent name (e.g. a page title for an attachment) for name searches
        preferredSpaceKey - the space key that is used to search by
        Returns:
        the search results, starting at startIndex up to pageSize
      • doSiteSearch

        public javax.ws.rs.core.Response doSiteSearch​(String query,
                                                      String type,
                                                      String spaceKey,
                                                      Set<String> attachmentType,
                                                      Set<String> label,
                                                      int startIndex,
                                                      Integer pageSize)
        Deprecated.
        Site wide Confluence search.
        Parameters:
        query - query string
        type - content types to search for
        spaceKey - keys of spaces to search in, if not specified it searches in all spaces
        attachmentType - attachment types to search in, if not specified it searches all attachments
        startIndex - start index of search results
        pageSize - max page size of search results
        label - Filters the results for content with the specified labels, if not specified all results are returned. Format is namespace:label, e.g. global:label. Namespaces: global, my, team, and system.
      • doContentNameSearch

        public javax.ws.rs.core.Response doContentNameSearch​(String query,
                                                             String type,
                                                             String spaceKey,
                                                             Set<String> attachmentType,
                                                             Set<String> label,
                                                             boolean groupResults,
                                                             boolean searchParentName,
                                                             String preferredSpaceKey,
                                                             int startIndex,
                                                             Integer pageSize,
                                                             Integer maxResultsPerGroup)
        Deprecated.
        Search is performed on the name of content only e.g. title of page, name of attachment
        Parameters:
        query - query string
        type - content types to search for
        spaceKey - keys of spaces to search in, if not specified it searches in all spaces
        attachmentType - attachment types to search in, if not specified it searches all attachments
        label - Filters the results for content with the specified labels, if not specified all results are returned. Format is namespace:label, e.g. global:label. Namespaces: global, my, team, and system.
        groupResults - indicates whether results should be grouped (default is true)
        searchParentName - indicates whether search should include the parent name (e.g. a page title for an attachment)
        startIndex - start index of search results (ignored when groupResults is true)
        pageSize - max page size of search results (ignored when groupResults is true)
      • doUserSearch

        public javax.ws.rs.core.Response doUserSearch​(String query,
                                                      int maxResults,
                                                      boolean showUnlicensed)
        Deprecated.
        User specific search. Searches on username and full name.
        Parameters:
        query - query string
        maxResults - maximum number of search results
      • doGroupSearch

        public javax.ws.rs.core.Response doGroupSearch​(String query,
                                                       int maxResults)
        Deprecated.
        Group specific search. Searches on group name.
        Parameters:
        query - The group name (or the start of the group name)
        maxResults - maximum number of search results
      • doUserOrGroupSearch

        public javax.ws.rs.core.Response doUserOrGroupSearch​(String query,
                                                             int maxResults)
        Deprecated.
        User and group specific search. Searches on username, full name and group name.
        Parameters:
        query - The name (or the start of the name)
        maxResults - maximum number of search results