Package com.day.cq.search.result
Interface Hit
public interface Hit
Hit represents a single search result, ie. a node and resource.-
Method Summary
-
Method Details
-
getIndex
long getIndex()- Returns:
- the zero based index for this hit in the query result.
-
getExcerpts
- Returns:
- a map with excerpts on the jcr:content node of a page.
- Throws:
RepositoryException- if an error occurs while building the map.
-
getExcerpt
- Returns:
- the default excerpt for this hit.
- Throws:
RepositoryException- if an error occurs while building the excerpt.
-
getResource
- Returns:
- the resource this hit represents.
- Throws:
RepositoryException- if an error occurs while reading from the query result.
-
getNode
- Returns:
- the node behind this hit
- Throws:
RepositoryException- if an error occurs while reading from the repository.- Since:
- 5.2
-
getPath
- Returns:
- the path of the current hit.
- Throws:
RepositoryException- if an error occurs while reading from the query result.
-
getProperties
Returns either the properties of thejcr:contentsubnode (if present) or the properties of this node itself.- Returns:
- the properties on this hit
- Throws:
RepositoryException- if an error occurs while reading from the repository.- Since:
- 5.2 (previously returned a plain
Map)
-
getTitle
Returns the title for this hit. The returned string may contain HTML tags, which means it must not be escaped when written to the response.- Returns:
- the title for this hit.
- Throws:
RepositoryException- if an error occurs while reading form the repository.
-
getScore
Returns the full text search score for this hit.- Returns:
- a double.
- Throws:
RepositoryException- if an error occurs while reading form the repository.- Since:
- 6.0 (bundle version 5.7.2, package version 1.1.0)
-