com.atlassian.sal.api.search
Interface SearchProvider


public interface SearchProvider

Allows for simple string based searches in an application. Currently this only supports String based (quicksearch type) queries, but this may be extended in the future.

Since:
2.0

Method Summary
 SearchResults search(String username, String searchQuery)
          Deprecated. since 2.10, use search(com.atlassian.sal.api.user.UserKey, String) instead.
 SearchResults search(UserKey userKey, String searchQuery)
          Runs the a search given a query and returns a searchResult.
 

Method Detail

search

@Deprecated
SearchResults search(String username,
                                String searchQuery)
Deprecated. since 2.10, use search(com.atlassian.sal.api.user.UserKey, String) instead.

Runs the a search given a query and returns a searchResult. The query will return as many hits as the underlying application would return by default.

The searchQuery should be URLencoded, as it may contain parameters as well. For example if a search should only return a maximum number of hits the searchQuery would be '&maxHits=20'

Parameters:
username - The user to run the search as. May be null for anonymous searches.
searchQuery - The query to run
Returns:
A SearchResults object

search

SearchResults search(UserKey userKey,
                     String searchQuery)
Runs the a search given a query and returns a searchResult. The query will return as many hits as the underlying application would return by default.

The searchQuery should be URLencoded, as it may contain parameters as well. For example if a search should only return a maximum number of hits the searchQuery would be '&maxHits=20'

Parameters:
userKey - The key of the user to run the search as. May be null for anonymous searches.
searchQuery - The query to run
Returns:
A SearchResults object
Since:
2.10


Copyright © 2015 Atlassian. All rights reserved.