com.atlassian.confluence.api.service.search
Interface CQLSearchService


@ExperimentalApi
public interface CQLSearchService

Entry point into CQL Search. Provides methods for executing the Confluence Query Language queries to fetch indexed Content. //TODO link to CQL documentation - CONFDEV-24997


Method Summary
 PageResponse<Content> searchContent(java.lang.String cqlInput, Expansion... expansions)
          Execute a CQL search query and fetch a page results.
 PageResponse<Content> searchContent(java.lang.String cqlInput, PageRequest pageRequest, Expansion... expansions)
          Execute a CQL search query and fetch a page results.
 

Method Detail

searchContent

PageResponse<Content> searchContent(java.lang.String cqlInput,
                                    PageRequest pageRequest,
                                    Expansion... expansions)
Execute a CQL search query and fetch a page results.

For example, to fetch the first 10 pieces of content in the DEV space with a title containing 'Specs'

 cqlSearchService.searchContent("space = DEV AND title ~ 'Specs' ORDER BY title", new SimplePageRequest(0, 10));
 

Parameters:
cqlInput - - the CQL query to execute
pageRequest - - the pagination request, indicating the start position and limit for the result
expansions - - the optional properties to expand on the result

searchContent

PageResponse<Content> searchContent(java.lang.String cqlInput,
                                    Expansion... expansions)
Execute a CQL search query and fetch a page results.

For example, to fetch the first 10 pieces of content in the DEV space with a title containing 'Specs'

 cqlSearchService.searchContent("space = DEV AND title ~ 'Specs' ORDER BY title", ExpansionParser.parse("space, history"));
 

Parameters:
cqlInput - - the CQL query to execute
expansions - - optional properties to expand on the result, if an expandable property is not specified here that property will not be accessible


Copyright © 2003-2014 Atlassian. All Rights Reserved.