com.atlassian.confluence.plugins.rest.resources
Class SearchService
java.lang.Object
com.atlassian.confluence.plugins.rest.resources.AbstractResource
com.atlassian.confluence.plugins.rest.resources.SearchService
public class SearchService
- extends AbstractResource
A service providing search results using the Confluence search with various parameters.
Method Summary |
javax.ws.rs.core.Response |
doContentNameSearch(java.lang.String query,
java.lang.String type,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label)
Search is performed on the name of content only e.g. |
javax.ws.rs.core.Response |
doSearch(java.lang.String query,
java.lang.String type,
java.lang.String search,
int startIndex,
java.lang.Integer pageSize,
java.lang.Integer maxResults,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label)
Search Confluence using the given parameters. |
javax.ws.rs.core.Response |
doSiteSearch(java.lang.String query,
java.lang.String type,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label,
int startIndex,
java.lang.Integer pageSize)
Site wide Confluence search. |
javax.ws.rs.core.Response |
doUserSearch(java.lang.String query,
int maxResults)
User specific search. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchService
public SearchService(UserAccessor userAccessor,
RestSearchService searchService,
SpacePermissionManager spacePermissionManager)
doSearch
public javax.ws.rs.core.Response doSearch(java.lang.String query,
java.lang.String type,
java.lang.String search,
int startIndex,
java.lang.Integer pageSize,
java.lang.Integer maxResults,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label)
- 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, MAIL or USER_STATUS. You can specify
multiple types by passing a comma separated list like: &type=mail,blogsearch
- 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 searches.pageSize
- Max size of page for site 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=pdflabel
- Filters the results for content with the specified labels,
if not specified all results are returned
- Returns:
doSiteSearch
public javax.ws.rs.core.Response doSiteSearch(java.lang.String query,
java.lang.String type,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label,
int startIndex,
java.lang.Integer pageSize)
- Site wide Confluence search.
- Parameters:
query
- query stringtype
- content types to search forspaceKey
- keys of spaces to search in, if not specified it searches in all spacesattachmentType
- attachment types to search in, if not specified it searches all attachmentsstartIndex
- start index of search resultspageSize
- max page size of search resultslabel
- Filters the results for content with the specified labels, if not specified all results are returned
doContentNameSearch
public javax.ws.rs.core.Response doContentNameSearch(java.lang.String query,
java.lang.String type,
java.lang.String spaceKey,
java.util.Set<java.lang.String> attachmentType,
java.util.Set<java.lang.String> label)
- Search is performed on the name of content only e.g. title of page, name of attachment
- Parameters:
query
- query stringtype
- content types to search forspaceKey
- keys of spaces to search in, if not specified it searches in all spacesattachmentType
- attachment types to search in, if not specified it searches all attachmentslabel
- Filters the results for content with the specified labels, if not specified all results are returned
doUserSearch
public javax.ws.rs.core.Response doUserSearch(java.lang.String query,
int maxResults)
- User specific search. Searches on username and full name.
- Parameters:
query
- query stringmaxResults
- maximum number of search results
Copyright © 2003-2011 Atlassian. All Rights Reserved.