Class OpenSearchSearchResult

    • Constructor Detail

      • OpenSearchSearchResult

        public OpenSearchSearchResult​(org.opensearch.client.opensearch.core.search.Hit<?> hit,
                                      Encoder encoder)
    • Method Detail

      • getHandleId

        public long getHandleId()
        Description copied from interface: BaseSearchResult
        Get the handle ID
        Returns:
        the ID of the Handle object
      • getFieldValue

        public String getFieldValue​(String fieldName)
        Description copied from class: AbstractSearchResult
        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.
        Specified by:
        getFieldValue in class AbstractSearchResult
        Returns:
        a string value of a field
      • getDisplayTitleWithHighlights

        public String getDisplayTitleWithHighlights()
        Description copied from interface: SearchResult
        Gets the title of the search result appropriate for displaying to a user with matches highlighted. All results should return something useful for this method.
        Returns:
        the title of the search result appropriate for display on a page with matches highlighted
      • getSort

        public List<String> getSort()
        Returns:
        a list of sorted field values
        Since:
        8.7.0
      • getScore

        public Double getScore()