Interface BaseSearchResult

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getField​(String fieldName)
      Returns the contents of the field as a string.
      Set<String> getFieldNames()
      Return names of all fields of a given document.
      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.
      Handle getHandle()
      Retrieves the handle that can then be used by the AnyTypeDao to retrieve the database object referenced by this search result.
      long getHandleId()
      Get the handle ID
    • Method Detail

      • getHandle

        Handle getHandle()
        Retrieves the handle that can then be used by the AnyTypeDao to retrieve the database object referenced by this search result.

        Because the database and index are not updated at the same time, it is possible for a deleted entity to still be represented in the search index. Do not assume that this handle will always refer to a live object.

        Returns:
        the handle that can be used to look up the underlying database object.
        See Also:
        AnyTypeDao.findByHandle(com.atlassian.bonnie.Handle)
      • getHandleId

        long getHandleId()
        Get the handle ID
        Returns:
        the ID of the Handle object
        Since:
        7.20
      • getFieldNames

        Set<String> getFieldNames()
        Return names of all fields of a given document.
        Returns:
        names of all known fields or null
        Since:
        8.0
      • getField

        String getField​(String fieldName)
        Returns the contents of the field as a string. This method will return null if there is no content for the field or the field does not exist. FieldName is case sensitive.
        Parameters:
        fieldName -
        Returns:
        the field value or null.
      • getFieldValues

        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.
        Parameters:
        fieldName -
        Returns:
        the field values or null.
        Since:
        5.10