com.atlassian.confluence.search.v2.lucene
Class LuceneSearchResults

java.lang.Object
  extended by com.atlassian.confluence.search.v2.lucene.LuceneSearchResults
All Implemented Interfaces:
SearchResults, Iterable<SearchResult>

public class LuceneSearchResults
extends Object
implements SearchResults


Field Summary
static LuceneSearchResults EMPTY_RESULTS
           
 
Constructor Summary
LuceneSearchResults(List<? extends SearchResult> luceneResult, int unfilteredResultsCount)
           
 
Method Summary
 List<SearchResult> getAll()
          Creates a new list containing all returned search results.
 List<String> getSearchWords()
           
 int getUnfilteredResultsCount()
          Get the number of search results before being passed through any filter.
 Iterator<SearchResult> iterator()
          Gets an iterator to run through the returned search results.
 void setSearchWords(List<String> searchWords)
           
 int size()
          Get the number of search results included in this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_RESULTS

public static final LuceneSearchResults EMPTY_RESULTS
Constructor Detail

LuceneSearchResults

public LuceneSearchResults(List<? extends SearchResult> luceneResult,
                           int unfilteredResultsCount)
Method Detail

getUnfilteredResultsCount

public int getUnfilteredResultsCount()
Get the number of search results before being passed through any filter. (i.e. to get the total number of results before taking only the first ten)

Specified by:
getUnfilteredResultsCount in interface SearchResults
Returns:
the number of search results before filtering takes place

size

public int size()
Description copied from interface: SearchResults
Get the number of search results included in this object.

Specified by:
size in interface SearchResults
Returns:
the number of search results returned

iterator

public Iterator<SearchResult> iterator()
Description copied from interface: SearchResults
Gets an iterator to run through the returned search results.

Specified by:
iterator in interface SearchResults
Specified by:
iterator in interface Iterable<SearchResult>
Returns:
an iterator over the search results

getAll

public List<SearchResult> getAll()
Description copied from interface: SearchResults
Creates a new list containing all returned search results.

Specified by:
getAll in interface SearchResults
Returns:
a new list containing all returned search results

getSearchWords

public List<String> getSearchWords()
Specified by:
getSearchWords in interface SearchResults
Returns:
a list of the words in the query string that were actually used in the search (raw query string with the stop words removed). May be an empty list if there were none.

setSearchWords

public void setSearchWords(List<String> searchWords)


Copyright © 2003-2013 Atlassian. All Rights Reserved.