public class LuceneSearchResult extends AbstractSearchResult
HIGHLIGHT_END, HIGHLIGHT_START| 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)
Deprecated.
|
LuceneSearchResult(org.apache.lucene.document.Document document,
Optional<HitHighlighter> maybeHighlighter,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
Constructor to create a search result directly from a Lucene document
|
LuceneSearchResult(org.apache.lucene.document.Document document,
Optional<HitHighlighter> maybeHighlighter,
Optional<String> maybeExplanation,
com.google.common.base.Function<String,ConfluenceUser> userLookup) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDisplayTitleWithHighlights()
Gets the title of the search result appropriate for displaying to a user with matches highlighted.
|
Optional<String> |
getExplain()
Returns query explanation if it is requested see
ISearch.isExplain(). |
String |
getFieldValue(String fieldName)
Return a string value of a field of a given document, if the field has multiple values then return last value,
if there is no such field then return null.
|
Set<String> |
getFieldValues(String fieldName)
Return set of string values of a field of a given document, if the field has single value then return
singleton set of that value, if there is no such field then return empty set.
|
String |
getResultExcerptWithHighlights()
Gets excerpt from the context of the search result, as
SearchResult.getResultExcerpt(), but in a HTML-safe manner. |
boolean |
isFieldRequested(String fieldName)
Deprecated.
|
getContent, getContentVersion, getCreationDate, getCreator, getCreatorUser, getDateResult, getDisplayTitle, getExtraFields, getField, getHandle, getIntegerResult, getLabels, getLastModificationDate, getLastModifier, getLastModifierUser, getLastUpdateDescription, getOwnerTitle, getOwnerType, getPersonalLabels, getResultExcerpt, getResultExcerpt, getSanitisedContent, getSpaceKey, getSpaceName, getStatus, getStringResult, getType, getUrlPath, getUserResult, hasLabels, isHomePage, toStringpublic LuceneSearchResult(org.apache.lucene.document.Document document,
Optional<HitHighlighter> maybeHighlighter,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
public LuceneSearchResult(org.apache.lucene.document.Document document,
Optional<HitHighlighter> maybeHighlighter,
Optional<String> maybeExplanation,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
public LuceneSearchResult(org.apache.lucene.document.Document document,
com.google.common.base.Function<String,ConfluenceUser> userLookup)
LuceneSearchResult(org.apache.lucene.document.Document, java.util.Optional, com.google.common.base.Function)@Deprecated public LuceneSearchResult(org.apache.lucene.document.Document document)
LuceneSearchResult(org.apache.lucene.document.Document, com.google.common.base.Function)public String getResultExcerptWithHighlights()
SearchResultSearchResult.getResultExcerpt(), but in a HTML-safe manner.
Implementations should highlight hits with SearchResult.HIGHLIGHT_START and SearchResult.HIGHLIGHT_END.
The default implementation simply HTML-encode the result of SearchResult.getResultExcerpt().public String getDisplayTitleWithHighlights()
SearchResult@Deprecated public boolean isFieldRequested(String fieldName)
public String getFieldValue(String fieldName)
AbstractSearchResultgetFieldValue in class AbstractSearchResultpublic Set<String> getFieldValues(String fieldName)
AbstractSearchResultgetFieldValues in interface BaseSearchResultgetFieldValues in class AbstractSearchResultpublic Optional<String> getExplain()
SearchResultISearch.isExplain().Copyright © 2003–2022 Atlassian. All rights reserved.