com.atlassian.confluence.search.v2.lucene
Class LuceneSearchResults
java.lang.Object
com.atlassian.confluence.search.v2.lucene.LuceneSearchResults
- All Implemented Interfaces:
- SearchResults, Iterable<SearchResult>
public class LuceneSearchResults
- extends Object
- implements SearchResults
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_RESULTS
public static final LuceneSearchResults EMPTY_RESULTS
LuceneSearchResults
public LuceneSearchResults(List luceneResult,
int unfilteredResultsCount)
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 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)