public class LuceneSearchResult extends AbstractLuceneSearchResult
Constructor and Description |
---|
LuceneSearchResult(org.apache.lucene.document.Document document)
Deprecated.
|
LuceneSearchResult(org.apache.lucene.document.Document document,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
Constructor to create a search result directly from a Lucene hit
|
LuceneSearchResult(Map<String,String> results)
Deprecated.
|
LuceneSearchResult(Map<String,String> results,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
Helper constructor for use in tests.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getExtraFields()
If the retrieved documents contain additional fields that cannot be directly accessed by this interface then they
can be retrieved via this method.
|
String |
getField(String fieldName)
Returns the contents of the field as a string.
|
com.atlassian.bonnie.Handle |
getHandle()
Retrieves the handle that can then be used by the AnyTypeDao to retrieve the database object referenced by this
search result.
|
boolean |
hasLabels() |
boolean |
isFieldRequested(String fieldName)
check to see if this SearchFieldName has been requested during the search, if this method returns false then
getField will throw a FieldNotRequestedException
|
String |
toString() |
getContent, getContentVersion, getCreationDate, getCreator, getCreatorUser, getDateResult, getDisplayTitle, getIntegerResult, getLabels, getLastModificationDate, getLastModifier, getLastModifierUser, getLastUpdateDescription, getOwnerTitle, getOwnerType, getPersonalLabels, getSpaceKey, getSpaceName, getStringResult, getType, getUrlPath, getUserResult, hasLabels, isHomePage, mapExtraFields, populatePersonalLabels
public LuceneSearchResult(org.apache.lucene.document.Document document, com.google.common.base.Function<String,ConfluenceUser> userLookup) throws IOException
document
- the Lucene hit behind this resultIOException
- if something goes wrong getting data from the hit@Deprecated public LuceneSearchResult(org.apache.lucene.document.Document document) throws IOException
LuceneSearchResult(org.apache.lucene.document.Document, com.google.common.base.Function)
IOException
public LuceneSearchResult(Map<String,String> results, com.google.common.base.Function<String,ConfluenceUser> userLookup)
results
- the already-converted map of results@Deprecated public LuceneSearchResult(Map<String,String> results)
LuceneSearchResult(java.util.Map, com.google.common.base.Function)
public boolean hasLabels()
public Map<String,String> getExtraFields()
SearchResult
The field names are abstracted from the underlying search implementation and will be centrally defined. Their values are not yet documented.
public com.atlassian.bonnie.Handle getHandle()
BaseSearchResult
AnyTypeDao.findByHandle(com.atlassian.bonnie.Handle)
public String getField(String fieldName)
BaseSearchResult
public boolean isFieldRequested(String fieldName)
BaseSearchResult
Copyright © 2003–2016 Atlassian. All rights reserved.