@PublicApi public class SearchResource extends Object
Constructor and Description |
---|
SearchResource(CQLSearchService searchService) |
Modifier and Type | Method and Description |
---|---|
SearchPageResponse<SearchResult> |
search(String cql,
String cqlcontext,
String excerpt,
String expand,
int start,
int limit,
boolean includeArchivedSpaces,
javax.ws.rs.core.UriInfo uriInfo)
Search for entities in Confluence using the Confluence Query Language (CQL)
|
public SearchResource(CQLSearchService searchService)
public SearchPageResponse<SearchResult> search(String cql, String cqlcontext, String excerpt, String expand, int start, int limit, boolean includeArchivedSpaces, @Context javax.ws.rs.core.UriInfo uriInfo)
For example :
Example request URI(s):
http://localhost:8080/confluence/rest/api/search?cql=creator=currentUser()&type%20in%20(space,page,user)&cqlcontext={%22spaceKey%22:%22TST%22, %22contentId%22:%2255%22}
http://localhost:8080/confluence/rest/api/search?cql=siteSearch~'example'%20AND%20label=docs&expand=content.space,space.homepage&limit=10
cql
- the CQL query see advanced searching in confluence using CQLcqlcontext
- the execution context for CQL functions, provides current space key and content id. If this is not provided some CQL functions will not be available.excerpt
- the excerpt strategy to apply to the result, one of : indexed, highlight, none. This defaults to highlight.expand
- the properties to expand on the search result, this may cause database requests for some propertiesstart
- the start point of the collection to returnlimit
- the limit of the number of items to return, this may be restricted by fixed system limitsincludeArchivedSpaces
- whether to include content in archived spaces in the result, this defaults to falseCopyright © 2003–2017 Atlassian. All rights reserved.