Interface Hit


  • public interface Hit
    Hit represents a single search result, ie. a node and resource.
    • Method Detail

      • getIndex

        long getIndex()
        Returns:
        the zero based index for this hit in the query result.
      • getExcerpts

        java.util.Map<java.lang.String,​java.lang.String> getExcerpts()
                                                                    throws RepositoryException
        Returns:
        a map with excerpts on the jcr:content node of a page.
        Throws:
        RepositoryException - if an error occurs while building the map.
      • getExcerpt

        java.lang.String getExcerpt()
                             throws RepositoryException
        Returns:
        the default excerpt for this hit.
        Throws:
        RepositoryException - if an error occurs while building the excerpt.
      • getProperties

        ValueMap getProperties()
                        throws RepositoryException
        Returns either the properties of the jcr:content subnode (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

        java.lang.String getTitle()
                           throws RepositoryException
        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

        double getScore()
                 throws RepositoryException
        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)