Class Result

  • All Implemented Interfaces:
    ResultType

    public class Result
    extends Object
    implements ResultType
    A single search result.
    Since:
    11.0
    • Field Detail

      • rank

        private Integer rank
        Rank of the result (From 1 to n)
      • score

        private Integer score
        Score of the result (From 1000 to 0)
      • title

        private String title
        Title of the result
      • collection

        private String collection

        ID of the collection to which this result belongs.

        This is usually the same ID as the collection being searched, except for Meta collections where results can come from different sub-collections.

      • component

        private Integer component

        For meta collections it's the internal component number of the sub-collection this result is coming from.

        For non-meta collections it's always zero.

        See Also:
        collection
      • collapsed

        private Collapsed collapsed

        Result collapsing information for this result.

        Will be null if no results are collapsed with this one.

        Since:
        12.5
      • liveUrl

        private String liveUrl

        URL to access the search result.

        It's identical to the indexUrl initially, but might have been transformed by a hook script. The click tracking URL will be built based on this URL, so if you need to modify the URL that's recorded in the click log, this field should be changed.

        In the default form, its only use it to display a proper URL when the user mouse-over the result title link.

      • summary

        private String summary
        Query-biased summary
      • allSummaryText

        private String allSummaryText
        All texts available for generating summary text
        Since:
        15.18
      • cacheUrl

        private String cacheUrl
        URL to access the cached version of the result.
      • date

        private Date date
        Date of the search result
      • fileSize

        private Integer fileSize
        Size of the file corresponding to the search results, in bytes.
      • fileType

        private String fileType
        File type of the result, usually the file extension ("pdf", "xls", "html", ...)
      • docNum

        private Integer docNum
        Internal document number of the result in the index.
      • exploreLink

        private String exploreLink
        Link to the also of interest CGI.
      • kmFromOrigin

        private Float kmFromOrigin
        Distance in kilometres of this search result from the origin set when the query is run.
      • definedMetadataSeparators

        private final com.google.common.collect.ListMultimap<String,​String> definedMetadataSeparators

        Map containing the separators defined for each metadata class.

        Intended only for internal use, and not exposed in the XML/JSON data model.

        Please note that currently separators are defined globally, however this data-model aims to support the possibility of per-class separators in the future.

        Since:
        15.16
        See Also:
        "Metadata classes"
      • listMetadata

        private final com.google.common.collect.ListMultimap<String,​String> listMetadata

        Multi-Map containing the list of metadata values for each metadata fields for each result.

        The key is the metadata class name as defined in the metadata mappings.

        The values are each mapped metadata value, split based on any defined separators.

        Since:
        15.16
        See Also:
        "Metadata classes"
      • listMetadataSeparators

        private final com.google.common.collect.ListMultimap<String,​String> listMetadataSeparators

        Multi-Map containing the separators originally used by the metadata values within in newMetadata.

        Intended only for internal use, and not exposed in the XML/JSON data model.

        This map is only of interest if the specific separators are meaningful to an implementation which is hopefully uncommon. If values are added to the newMetadata map, new separators may be added here also. Some separator from the definedMetadataSeparators list will be used for any added metadata if this map lacks sufficient values.

        Since:
        15.16
        See Also:
        "Metadata classes"
      • tags

        private final List<String> tags

        Tags associated with a result.

        See the url_tagger program.

      • quickLinks

        private QuickLinks quickLinks
        Quick links associated with the result.
      • displayUrl

        private String displayUrl

        URL to display for the result.

        Initially identical to indexUrl and liveUrl, but might have been transformed by a hook script. This URL can be used to display a different URL from the actual one, while preserving the liveUrl for the user to access the result.

        In the default form, this URL is displayed in the <cite> block for the the result

      • clickTrackingUrl

        private String clickTrackingUrl
        URL for click tracking.
      • explain

        private Explain explain
        Explain data used in the Content Optimiser.
      • indexUrl

        private String indexUrl
        Original URL from the index, taken from indexUrl before any transformation.
      • gscopesSet

        private Set<String> gscopesSet
        Set of GScope Numbers that this result has.
      • customData

        private final Map<String,​Object> customData
        Custom data placeholder allowing any arbitrary data to be stored by hook scripts.
      • relatedDocuments

        private final Map<String,​Set<RelatedDocument>> relatedDocuments

        Documents related to this result which have been fetched by RelatedDocumentFetcher.

        The map key is chosen by the related document fetching configuration and the set of related documents are those that were fetched based on the metadata relationships traversed by the configuration.

        Since:
        15.16
      • documentVisibleToUser

        private boolean documentVisibleToUser
      • promoted

        private boolean promoted
        Set true if the URL was promoted using -promote_urls.
        Since:
        15.12
      • diversified

        private boolean diversified

        Set true if the URL was down weighted by result diversification.

        This might happen from same site suppression (SSS).

        Since:
        15.12
    • Constructor Detail

      • Result

        public Result()