com.atlassian.jira.issue.search
Interface SearchProvider

All Known Implementing Classes:
LuceneSearchProvider

public interface SearchProvider


Method Summary
 List search(SearchRequest request, User searcher)
          Deprecated. - please use search(SearchRequest, com.opensymphony.user.User, com.atlassian.jira.web.bean.PagerFilter) instead.
 void search(SearchRequest request, User user, org.apache.lucene.search.HitCollector hitCollector)
          Create a search, and for each match, call hitCollector.collect().
 SearchResults search(SearchRequest request, User searcher, PagerFilter pager)
          Search the index, and only return issues that are in the pager's range.
 void searchAndSort(SearchRequest request, User user, DocumentHitCollector hitCollector)
          For HitCollectors that need the search results to be sorted, use this method.
 long searchCount(SearchRequest request, User searcher)
          Return the number of issues matching a search request.
 

Method Detail

search

public List search(SearchRequest request,
                   User searcher)
            throws SearchException
Deprecated. - please use search(SearchRequest, com.opensymphony.user.User, com.atlassian.jira.web.bean.PagerFilter) instead.

Returns a list of GenericValue objects.

Throws:
SearchException

search

public SearchResults search(SearchRequest request,
                            User searcher,
                            PagerFilter pager)
                     throws SearchException
Search the index, and only return issues that are in the pager's range. Note that this method returns read only Issue objects, and should not be used where you need the issue for update.

Parameters:
pager - Pager filter (use PagerFilter.getUnlimitedFilter() to get all issues).
Throws:
SearchException

searchCount

public long searchCount(SearchRequest request,
                        User searcher)
                 throws SearchException
Return the number of issues matching a search request.

Throws:
SearchException

search

public void search(SearchRequest request,
                   User user,
                   org.apache.lucene.search.HitCollector hitCollector)
            throws IOException,
                   SearchException
Create a search, and for each match, call hitCollector.collect(). HitCollectors are low level Lucene classes, but they allow issues to be placed into buckets very quickly. Many of JIRA's graphs and stats are generated in this manner.

Throws:
IOException
SearchException

searchAndSort

public void searchAndSort(SearchRequest request,
                          User user,
                          DocumentHitCollector hitCollector)
                   throws IOException,
                          SearchException
For HitCollectors that need the search results to be sorted, use this method. However, this is much slower than using search(SearchRequest, com.opensymphony.user.User, org.apache.lucene.search.HitCollector)

Throws:
IOException
SearchException


Copyright © 2002-2006 Atlassian. All Rights Reserved.