Class ContentSearch

  • All Implemented Interfaces:
    ISearch

    public class ContentSearch
    extends AbstractSearch
    Represents a search against Confluence content. This includes searching against the text/body of content.
    • Constructor Detail

      • ContentSearch

        public ContentSearch​(@NonNull SearchQuery query,
                             SearchSort sort)
        Constructs a search against Confluence content. The maximum number of results returned will be a system provided default.
        Parameters:
        query - the non-null query to perform against Confluence content
        sort - how to order the results of the query
        Since:
        7.20
      • ContentSearch

        public ContentSearch​(@NonNull SearchQuery query,
                             SearchSort sort,
                             int startOffset,
                             int limit)
        Constructs a search against Confluence content.
        Parameters:
        query - the non-null query to perform against Confluence content
        sort - how to order the results of the query
        startOffset - the zero-based offset of the first content result to return
        limit - the maximum number content results to return
        Since:
        7.20
    • Method Detail

      • getSearchType

        public String getSearchType()
        Description copied from interface: ISearch
        Returns type of search e.g. SiteSearch, RecentUpdate, NetworkFeed, BlogUpdate, which can be used by search manager to switch between different implementations to support incremental roll out.
        Returns:
        type of search
      • withSearchAfter

        public ISearch withSearchAfter​(List<String> searchAfter)
        Description copied from interface: ISearch
        This method is only relevant to OpenSearch. A class must implement this method. Otherwise, it will have no effect on the search results.
        Parameters:
        searchAfter - the searchAfter parameter
        Returns:
        a new ISearch containing the searchAfter parameter
        Since:
        8.7.0
      • withQuery

        public ISearch withQuery​(SearchQuery query)
        Description copied from interface: ISearch
        A class must implement this method. Otherwise, UnsupportedOperationException will be thrown.
        Parameters:
        query - the query to be added to the search object
        Returns:
        a new ISearch containing the new query
        Since:
        8.7.0