public interface SearchHit extends SearchEntry
search. It represents any content
(web-page, document, etc.) that is represented by a single URI. | Modifier and Type | Field and Description |
|---|---|
static String |
HIGHLIGHT_CUT_TEXT |
static String |
HIGHLIGHT_END_TAG |
static String |
HIGHLIGHT_START_TAG |
static SearchHit[] |
NO_HITS
An emtpy SearchHit array.
|
FIELD_CREATOR, FIELD_CUSTOM_ID, FIELD_ID, FIELD_KEYWORDS, FIELD_LANGUAGE, FIELD_SIZE, FIELD_SOURCE, FIELD_TEXT, FIELD_TITLE, FIELD_TYPE, FIELD_URI| Modifier and Type | Method and Description |
|---|---|
String |
getEntryId()
This method gets the ID of this hit in the search index.
|
String |
getHighlightedText()
This method gets an excerpt of the plain text of the content that contains terms of the search query as a
highlighted html fragment.
|
double |
getScore()
This method gets the score of this hit.
|
int |
getScore(int maximum)
This method gets the score of this hit as an integer value in the range from
0 to
maximum. |
getCreator, getCustomId, getField, getField, getFieldAsString, getFieldNames, getId, getSize, getSource, getText, getTitle, getType, getUristatic final String HIGHLIGHT_START_TAG
getHighlightedText(),
Constant Field Valuesstatic final String HIGHLIGHT_END_TAG
getHighlightedText(),
Constant Field Valuesstatic final String HIGHLIGHT_CUT_TEXT
getHighlightedText(),
Constant Field Valuesstatic final SearchHit[] NO_HITS
String getEntryId()
retrieve the entry again. It is explicitly unspecified and may vary
in implementations if this is the same as SearchEntry.getId().double getScore()
0 to
1, where 1 represents a perfect hit and 0 represents a hit that
has nothing in common with the search query. A hit will typically NOT have a score of
0 but the score may be close to 0.int getScore(int maximum)
0 to
maximum. The higher the score the better the hit. This method is useful to view the score as
a percentage value (with a maximum of 100) or a number of stars (e.g. with a
maximum of 5).maximum - is the maximum scoregetScore()String getHighlightedText()
HIGHLIGHT_START_TAG and HIGHLIGHT_END_TAG
and parts of the text that have been cut out should be replaced with HIGHLIGHT_CUT_TEXT. An
implementing search-engine component may allow to override these defaults for custom needs.SearchEntry.getText()Copyright © 2001–2016 mmm-Team. All rights reserved.