com.atlassian.confluence.search.contentnames
Interface ContentNameSearchService

All Known Implementing Classes:
DefaultContentNameSearchService

public interface ContentNameSearchService

An search service that will take a query String and apply it as a search across the 'universal title' field within the Confluence search index.


Field Summary
static int DEFAULT_MAX_RESULTS_PER_CATEGORY
          This can be passed into maxPerCategory to indicate that you wish to get the default number of results back from Confluence.
 
Method Summary
 ContentNameSearchResult search(java.lang.String query, java.lang.Iterable<java.lang.String> types, java.lang.String spaceKey, int maxPerCategory, javax.servlet.http.HttpServletRequest httpServletRequest)
          This performs a content name search in Confluence and returns the results.
 

Field Detail

DEFAULT_MAX_RESULTS_PER_CATEGORY

static final int DEFAULT_MAX_RESULTS_PER_CATEGORY
This can be passed into maxPerCategory to indicate that you wish to get the default number of results back from Confluence.

See Also:
Constant Field Values
Method Detail

search

ContentNameSearchResult search(java.lang.String query,
                               java.lang.Iterable<java.lang.String> types,
                               java.lang.String spaceKey,
                               int maxPerCategory,
                               javax.servlet.http.HttpServletRequest httpServletRequest)
This performs a content name search in Confluence and returns the results.

Parameters:
query - The text that the user wishes to search for.
types - Uses the default "types" (Search Categories) if nothing is provided, otherwise returns different Categories than the default.
spaceKey - You can restrict your search to a particular space if provided. By default it searches all of Confluence.
maxPerCategory - If maxPerCategory is -1 then it returns the default maximum amount, otherwise it returns the positive number provided.
Returns:
The search results. Errors are also encapsulated in the returned object, null should NOT be returned.


Copyright © 2003-2013 Atlassian. All Rights Reserved.