Class Result
- java.lang.Object
-
- com.funnelback.publicui.search.model.padre.Result
-
- All Implemented Interfaces:
ResultType
public class Result extends Object implements ResultType
A single search result.- Since:
- 11.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Result.ResultBuilder
-
Field Summary
Fields Modifier and Type Field Description private String
allSummaryText
All texts available for generating summary textprivate String
cacheUrl
URL to access the cached version of the result.private String
clickTrackingUrl
URL for click tracking.private Collapsed
collapsed
Result collapsing information for this result.private String
collection
ID of the collection to which this result belongs.private Integer
component
For meta collections it's the internal component number of the sub-collection this result is coming from.private Map<String,Object>
customData
Custom data placeholder allowing any arbitrary data to be stored by hook scripts.private Date
date
Date of the search resultprivate com.google.common.collect.ListMultimap<String,String>
definedMetadataSeparators
Map containing the separators defined for each metadata class.private String
displayUrl
URL to display for the result.private boolean
diversified
Set true if the URL was down weighted by result diversification.private Integer
docNum
Internal document number of the result in the index.private boolean
documentVisibleToUser
private Explain
explain
Explain data used in the Content Optimiser.private String
exploreLink
Link to the also of interest CGI.private Integer
fileSize
Size of the file corresponding to the search results, in bytes.private String
fileType
File type of the result, usually the file extension ("pdf", "xls", "html", ...)private Set<String>
gscopesSet
Set of GScope Numbers that this result has.private String
indexUrl
Original URL from the index, taken from indexUrl before any transformation.private Float
kmFromOrigin
Distance in kilometres of this search result from the origin set when the query is run.private com.google.common.collect.ListMultimap<String,String>
listMetadata
Multi-Map containing the list of metadata values for each metadata fields for each result.private com.google.common.collect.ListMultimap<String,String>
listMetadataSeparators
Multi-Map containing the separators originally used by the metadata values within in newMetadata.private String
liveUrl
URL to access the search result.private boolean
promoted
Set true if the URL was promoted using -promote_urls.private QuickLinks
quickLinks
Quick links associated with the result.private Integer
rank
Rank of the result (From 1 to n)private Map<String,Set<RelatedDocument>>
relatedDocuments
Documents related to this result which have been fetched by RelatedDocumentFetcher.private Integer
score
Score of the result (From 1000 to 0)private String
summary
Query-biased summaryprivate List<String>
tags
Tags associated with a result.private Integer
tier
Tier number to which this search results belongs.private String
title
Title of the result
-
Constructor Summary
Constructors Constructor Description Result()
Result(Integer rank, Integer score, String title, String collection, Integer component, Collapsed collapsed, String liveUrl, String summary, String allSummaryText, String cacheUrl, Date date, Integer fileSize, String fileType, Integer tier, Integer docNum, String exploreLink, Float kmFromOrigin, QuickLinks quickLinks, String displayUrl, String clickTrackingUrl, Explain explain, String indexUrl, Set<String> gscopesSet, boolean documentVisibleToUser, boolean promoted, boolean diversified)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static boolean
$default$diversified()
private static boolean
$default$documentVisibleToUser()
private static boolean
$default$promoted()
static Result.ResultBuilder
builder()
String
getAllSummaryText()
All texts available for generating summary textString
getCacheUrl()
URL to access the cached version of the result.String
getClickTrackingUrl()
URL for click tracking.Collapsed
getCollapsed()
Result collapsing information for this result.String
getCollection()
ID of the collection to which this result belongs.Integer
getComponent()
For meta collections it's the internal component number of the sub-collection this result is coming from.Map<String,Object>
getCustomData()
Custom data placeholder allowing any arbitrary data to be stored by hook scripts.Date
getDate()
Date of the search resultcom.google.common.collect.ListMultimap<String,String>
getDefinedMetadataSeparators()
Map containing the separators defined for each metadata class.String
getDisplayUrl()
URL to display for the result.Integer
getDocNum()
Internal document number of the result in the index.Explain
getExplain()
Explain data used in the Content Optimiser.String
getExploreLink()
Link to the also of interest CGI.Integer
getFileSize()
Size of the file corresponding to the search results, in bytes.String
getFileType()
File type of the result, usually the file extension ("pdf", "xls", "html", ...)Set<String>
getGscopesSet()
Set of GScope Numbers that this result has.String
getIndexUrl()
Original URL from the index, taken from indexUrl before any transformation.Float
getKmFromOrigin()
Distance in kilometres of this search result from the origin set when the query is run.com.google.common.collect.ListMultimap<String,String>
getListMetadata()
Multi-Map containing the list of metadata values for each metadata fields for each result.com.google.common.collect.ListMultimap<String,String>
getListMetadataSeparators()
Multi-Map containing the separators originally used by the metadata values within in newMetadata.String
getLiveUrl()
URL to access the search result.QuickLinks
getQuickLinks()
Quick links associated with the result.Integer
getRank()
Rank of the result (From 1 to n)Map<String,Set<RelatedDocument>>
getRelatedDocuments()
Documents related to this result which have been fetched by RelatedDocumentFetcher.Integer
getScore()
Score of the result (From 1000 to 0)String
getSummary()
Query-biased summaryList<String>
getTags()
Tags associated with a result.Integer
getTier()
Tier number to which this search results belongs.String
getTitle()
Title of the resultboolean
isDiversified()
Set true if the URL was down weighted by result diversification.boolean
isDocumentVisibleToUser()
boolean
isPromoted()
Set true if the URL was promoted using -promote_urls.void
setAllSummaryText(String allSummaryText)
All texts available for generating summary textvoid
setCacheUrl(String cacheUrl)
URL to access the cached version of the result.void
setClickTrackingUrl(String clickTrackingUrl)
URL for click tracking.void
setCollapsed(Collapsed collapsed)
Result collapsing information for this result.void
setCollection(String collection)
ID of the collection to which this result belongs.void
setComponent(Integer component)
For meta collections it's the internal component number of the sub-collection this result is coming from.void
setDate(Date date)
Date of the search resultvoid
setDisplayUrl(String displayUrl)
URL to display for the result.void
setDiversified(boolean diversified)
Set true if the URL was down weighted by result diversification.void
setDocNum(Integer docNum)
Internal document number of the result in the index.void
setDocumentVisibleToUser(boolean documentVisibleToUser)
void
setExplain(Explain explain)
Explain data used in the Content Optimiser.void
setExploreLink(String exploreLink)
Link to the also of interest CGI.void
setFileSize(Integer fileSize)
Size of the file corresponding to the search results, in bytes.void
setFileType(String fileType)
File type of the result, usually the file extension ("pdf", "xls", "html", ...)void
setGscopesSet(Set<String> gscopesSet)
Set of GScope Numbers that this result has.void
setIndexUrl(String indexUrl)
Original URL from the index, taken from indexUrl before any transformation.void
setKmFromOrigin(Float kmFromOrigin)
Distance in kilometres of this search result from the origin set when the query is run.void
setLiveUrl(String liveUrl)
URL to access the search result.void
setPromoted(boolean promoted)
Set true if the URL was promoted using -promote_urls.void
setQuickLinks(QuickLinks quickLinks)
Quick links associated with the result.void
setRank(Integer rank)
Rank of the result (From 1 to n)void
setScore(Integer score)
Score of the result (From 1000 to 0)void
setSummary(String summary)
Query-biased summaryvoid
setTier(Integer tier)
Tier number to which this search results belongs.void
setTitle(String title)
Title of the resultString
toString()
-
-
-
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", ...)
-
tier
private Integer tier
Tier number to which this search results belongs.- See Also:
ResultPacket.getResultsWithTierBars()
-
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
-
quickLinks
private QuickLinks quickLinks
Quick links associated with the result.
-
displayUrl
private String displayUrl
URL to display for the result.
Initially identical to
indexUrl
andliveUrl
, 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 theliveUrl
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.
-
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(Integer rank, Integer score, String title, String collection, Integer component, Collapsed collapsed, String liveUrl, String summary, String allSummaryText, String cacheUrl, Date date, Integer fileSize, String fileType, Integer tier, Integer docNum, String exploreLink, Float kmFromOrigin, QuickLinks quickLinks, String displayUrl, String clickTrackingUrl, Explain explain, String indexUrl, Set<String> gscopesSet, boolean documentVisibleToUser, boolean promoted, boolean diversified)
-
Result
public Result()
-
-
Method Detail
-
$default$documentVisibleToUser
private static boolean $default$documentVisibleToUser()
-
$default$promoted
private static boolean $default$promoted()
-
$default$diversified
private static boolean $default$diversified()
-
builder
public static Result.ResultBuilder builder()
-
getRank
public Integer getRank()
Rank of the result (From 1 to n)
-
setRank
public void setRank(Integer rank)
Rank of the result (From 1 to n)
-
getScore
public Integer getScore()
Score of the result (From 1000 to 0)
-
setScore
public void setScore(Integer score)
Score of the result (From 1000 to 0)
-
getTitle
public String getTitle()
Title of the result
-
setTitle
public void setTitle(String title)
Title of the result
-
getCollection
public String getCollection()
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.
-
setCollection
public void setCollection(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.
-
getComponent
public Integer getComponent()
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
-
setComponent
public void setComponent(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
-
getCollapsed
public Collapsed getCollapsed()
Result collapsing information for this result.
Will be null if no results are collapsed with this one.
- Since:
- 12.5
-
setCollapsed
public void setCollapsed(Collapsed collapsed)
Result collapsing information for this result.
Will be null if no results are collapsed with this one.
- Since:
- 12.5
-
getLiveUrl
public String getLiveUrl()
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.
-
setLiveUrl
public void setLiveUrl(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.
-
getSummary
public String getSummary()
Query-biased summary
-
setSummary
public void setSummary(String summary)
Query-biased summary
-
getAllSummaryText
public String getAllSummaryText()
All texts available for generating summary text- Since:
- 15.18
-
setAllSummaryText
public void setAllSummaryText(String allSummaryText)
All texts available for generating summary text- Since:
- 15.18
-
getCacheUrl
public String getCacheUrl()
URL to access the cached version of the result.
-
setCacheUrl
public void setCacheUrl(String cacheUrl)
URL to access the cached version of the result.
-
getDate
public Date getDate()
Date of the search result
-
setDate
public void setDate(Date date)
Date of the search result
-
getFileSize
public Integer getFileSize()
Size of the file corresponding to the search results, in bytes.
-
setFileSize
public void setFileSize(Integer fileSize)
Size of the file corresponding to the search results, in bytes.
-
getFileType
public String getFileType()
File type of the result, usually the file extension ("pdf", "xls", "html", ...)
-
setFileType
public void setFileType(String fileType)
File type of the result, usually the file extension ("pdf", "xls", "html", ...)
-
getTier
public Integer getTier()
Tier number to which this search results belongs.- See Also:
ResultPacket.getResultsWithTierBars()
-
setTier
public void setTier(Integer tier)
Tier number to which this search results belongs.- See Also:
ResultPacket.getResultsWithTierBars()
-
getDocNum
public Integer getDocNum()
Internal document number of the result in the index.
-
setDocNum
public void setDocNum(Integer docNum)
Internal document number of the result in the index.
-
getExploreLink
public String getExploreLink()
Link to the also of interest CGI.
-
setExploreLink
public void setExploreLink(String exploreLink)
Link to the also of interest CGI.
-
getKmFromOrigin
public Float getKmFromOrigin()
Distance in kilometres of this search result from the origin set when the query is run.
-
setKmFromOrigin
public void setKmFromOrigin(Float kmFromOrigin)
Distance in kilometres of this search result from the origin set when the query is run.
-
getDefinedMetadataSeparators
public com.google.common.collect.ListMultimap<String,String> getDefinedMetadataSeparators()
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
-
getListMetadata
public com.google.common.collect.ListMultimap<String,String> getListMetadata()
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
-
getListMetadataSeparators
public com.google.common.collect.ListMultimap<String,String> getListMetadataSeparators()
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
-
getQuickLinks
public QuickLinks getQuickLinks()
Quick links associated with the result.
-
setQuickLinks
public void setQuickLinks(QuickLinks quickLinks)
Quick links associated with the result.
-
getDisplayUrl
public String getDisplayUrl()
URL to display for the result.
Initially identical to
indexUrl
andliveUrl
, 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 theliveUrl
for the user to access the result.In the default form, this URL is displayed in the
<cite>
block for the the result
-
setDisplayUrl
public void setDisplayUrl(String displayUrl)
URL to display for the result.
Initially identical to
indexUrl
andliveUrl
, 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 theliveUrl
for the user to access the result.In the default form, this URL is displayed in the
<cite>
block for the the result
-
getClickTrackingUrl
public String getClickTrackingUrl()
URL for click tracking.
-
setClickTrackingUrl
public void setClickTrackingUrl(String clickTrackingUrl)
URL for click tracking.
-
getExplain
public Explain getExplain()
Explain data used in the Content Optimiser.
-
setExplain
public void setExplain(Explain explain)
Explain data used in the Content Optimiser.
-
getIndexUrl
public String getIndexUrl()
Original URL from the index, taken from indexUrl before any transformation.
-
setIndexUrl
public void setIndexUrl(String indexUrl)
Original URL from the index, taken from indexUrl before any transformation.
-
setGscopesSet
public void setGscopesSet(Set<String> gscopesSet)
Set of GScope Numbers that this result has.
-
getCustomData
public Map<String,Object> getCustomData()
Custom data placeholder allowing any arbitrary data to be stored by hook scripts.
-
getRelatedDocuments
public Map<String,Set<RelatedDocument>> getRelatedDocuments()
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
-
isDocumentVisibleToUser
public boolean isDocumentVisibleToUser()
-
setDocumentVisibleToUser
public void setDocumentVisibleToUser(boolean documentVisibleToUser)
-
isPromoted
public boolean isPromoted()
Set true if the URL was promoted using -promote_urls.- Since:
- 15.12
-
setPromoted
public void setPromoted(boolean promoted)
Set true if the URL was promoted using -promote_urls.- Since:
- 15.12
-
isDiversified
public boolean isDiversified()
Set true if the URL was down weighted by result diversification. This might happen from same site suppression (SSS).- Since:
- 15.12
-
setDiversified
public void setDiversified(boolean diversified)
Set true if the URL was down weighted by result diversification. This might happen from same site suppression (SSS).- Since:
- 15.12
-
-