|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.search.v2.lucene.LuceneSearchManager
public class LuceneSearchManager
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
Deprecated. since 3.1 do not use this logger. |
Constructor Summary | |
---|---|
LuceneSearchManager(LuceneSearchMapper luceneSearchMapper,
LuceneSearcher luceneSearcher,
AnyTypeDao anyTypeDao,
com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory luceneAnalyzerFactory)
|
Method Summary | |
---|---|
java.util.List<com.atlassian.bonnie.Searchable> |
convertToEntities(SearchResults searchResults,
boolean stripNull)
Helper method to convert search results into a list of database entities. |
SearchResults |
search(ISearch search)
Perform a search with a given criteria. |
SearchResults |
search(Search search)
Deprecated. |
java.util.List<com.atlassian.bonnie.Searchable> |
searchEntities(ISearch search)
Perform a search with the given criteria, returning the results as a list of database entity objects. |
java.util.List<com.atlassian.bonnie.Searchable> |
searchEntities(Search search)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public LuceneSearchManager(LuceneSearchMapper luceneSearchMapper, LuceneSearcher luceneSearcher, AnyTypeDao anyTypeDao, com.atlassian.bonnie.analyzer.LuceneAnalyzerFactory luceneAnalyzerFactory)
Method Detail |
---|
public SearchResults search(ISearch search) throws InvalidSearchException
SearchManager
Will throw an InvalidSearchException if some error occurred converting the search object into a search that could be performed in the back-end. Usually this is a sign that some plugin that was used to create the search is no longer available.
search
in interface SearchManager
search
- the specified search
InvalidSearchException
- when this manager is unable to translate and conduct the specified search. Clients should just discard the search if this occurs.public java.util.List<com.atlassian.bonnie.Searchable> searchEntities(ISearch search) throws InvalidSearchException
SearchManager
SearchManager.convertToEntities(SearchResults, boolean)
method, the list of entities returned
will not contain any nulls: search results that do not match a database record will be silently
discarded
searchEntities
in interface SearchManager
search
- the search to perform
InvalidSearchException
- when this manager is unable to translate and conduct the specified search. Clients should just discard the search if this occurs.public java.util.List<com.atlassian.bonnie.Searchable> convertToEntities(SearchResults searchResults, boolean stripNull)
SearchManager
Helper method to convert search results into a list of database entities. The index of the entity in the returned list will match the index of the search result it corresponds to. Because the search index does not update at the same time as the database, a search may contain references to entities that have since been deleted from the db. As such, the returned list may contain null values.
If you do not want this behaviour then supplied true for the stripNulls parameter.
convertToEntities
in interface SearchManager
searchResults
- the results of a search from this managerstripNull
- if true then any nulls resulting from the mapping will be removed from the list meaning that
the list no longer aligns with the supplied searchResults.
@Deprecated public SearchResults search(Search search) throws InvalidSearchException
search
in interface SearchManager
InvalidSearchException
Search
,
ContentSearch
@Deprecated public java.util.List<com.atlassian.bonnie.Searchable> searchEntities(Search search) throws InvalidSearchException
searchEntities
in interface SearchManager
InvalidSearchException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |