Class ResultPacket
- java.lang.Object
-
- com.funnelback.publicui.search.model.padre.ResultPacket
-
public class ResultPacket extends Object
A PADRE result packet, containing search results.- Since:
- 11.0
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,GeoBoundingBox>
boundingBoxes
Bounding boxes for Geospatial metadata classesprivate String
collection
ID of the collection being searched.private ContextualNavigation
contextualNavigation
Contextual navigation suggestions.private Map<CoolerWeighting,String>
coolerNames
AMap
of long names for cooler ranking variables, keyed by the cooler variable short names + id.private Map<CoolerWeighting,Float>
coolerWeights
AMap
of floats that describe the cooler ranking weights.private Map<String,DateCount>
dateCounts
Date counts (Used in faceted navigation)private Details
details
Details about the index and PADRE version.private Map<String,Long>
documentsPerCollection
A map containing the number of documents each collection contributed to the result set.private Map<String,Integer>
entityList
List of prominent entities.private Error
error
Error occurred during the search, if any.private List<String>
excludeScopes
Scopes (URL prefixes, not Gscopes) excluded via thescope
query processor option.private Map<CoolerWeighting,String>
explainTypes
AMap
of Strings that describes how to calculate the potential improvement for ranking on each feature when the content optimiser is used.private Map<String,Integer>
gScopeCounts
GScope counts (Used in faceted navigation)private List<String>
includeScopes
Scopes (URL prefixes, not Gscope) included via thescope
query processor option.private List<IndexedTermCounts>
indexedTermCounts
A list containing the counts of term occurrences in a metadata class.private Map<String,Range>
metadataRanges
Metadata ranges.private Map<String,Double>
metadataSums
A map of the numeric metadata to total of that numeric metadata in the result setprivate Float[]
origin
Origin of the search, for geographical searches.private Integer
padreElapsedTime
Time spent by PADRE processing the query, in millisecondsprivate Float
phlusterElapsedTime
Time spent by PADRE processing contextual navigation, in seconds.private List<QSup>
qSups
List of additional queries for the Query Blending system.private String
query
Original query termsprivate String
queryAsProcessed
Query terms as processed by PADRE.private String
queryCleaned
The query, cleaned from any operator or constraint that was automatically added by the faceted navigation system.private String
queryHighlightRegex
Regular expression to use to highlight query terms in titles, summaries or metadata.private String
queryProcessorCodes
Indicates how the query was internally processed by PADRE.private String
queryRaw
Query terms as provided to PADRE by the user.private String
querySystemRaw
System-generated query terms as provided to PADRE.private List<Result>
results
List of results.private ResultsSummary
resultsSummary
Summary counts and data about the results (How many documents matched, which page is currently returned, etc.).private Map<String,List<RMCItemResult>>
rmcItemResults
Metadata counts (Used in faceted navigation) including top n results for each count.private Map<String,Integer>
rmcs
Metadata counts (Used in faceted navigation).private Spell
spell
Spelling suggestions.private com.google.common.collect.SetMultimap<String,String>
stemmedEquivs
ASetMultimap
of Strings that describes the results of stemming on the query.private List<String>
stopWords
AList
of stop words used by the query processor.private List<SumByGroup>
sumByGroups
A list containing the sum of a numeric metadata class grouped by another metadata classprivate Map<String,String>
svgs
Contains SVG data returned by PADRE, for example an SVG representation of the syntax tree.private List<TierBar>
tierBars
List of tier barsprivate List<UniqueByGroup>
uniqueCountsByGroups
A list containing the count of unique values for a metadata class grouped by another metadata class.private Map<String,Integer>
urlCounts
URL counts (Used in faceted navigation).
-
Constructor Summary
Constructors Constructor Description ResultPacket()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ResultType>
getResultsWithTierBars()
Get the results and the tier bars mixed together.boolean
hasResults()
Test if the packet contains results.
-
-
-
Field Detail
-
details
private Details details
Details about the index and PADRE version.
-
query
private String query
Original query terms
-
queryAsProcessed
private String queryAsProcessed
-
queryRaw
private String queryRaw
Query terms as provided to PADRE by the user.
The query at this point has been encoded to UTF8, possibly there may have been percent decoding if query processor option
udcq
is used. The value is otherwise unmodified.
-
querySystemRaw
private String querySystemRaw
System-generated query terms as provided to PADRE.
The query separately provided by the system using the processor option or CGI parameter
s
. This value has been UTF8 encoded, otherwise it is unchanged. It is ultimately preprocessed and concatenated to the preprocessed user query and parsed.
-
queryCleaned
private String queryCleaned
The query, cleaned from any operator or constraint that was automatically added by the faceted navigation system.
-
collection
private String collection
ID of the collection being searched.
-
qSups
private final List<QSup> qSups
List of additional queries for the Query Blending system.
Warning: When accessing this field from a template or a hook script you must use the following syntax:
QSups
, instead ofqSups
due to the Javabeans naming conventions.- See Also:
- "blending.cfg"
-
resultsSummary
private ResultsSummary resultsSummary
Summary counts and data about the results (How many documents matched, which page is currently returned, etc.).
-
spell
private Spell spell
Spelling suggestions.
-
error
private Error error
Error occurred during the search, if any.
-
padreElapsedTime
private Integer padreElapsedTime
Time spent by PADRE processing the query, in milliseconds
-
phlusterElapsedTime
private Float phlusterElapsedTime
Time spent by PADRE processing contextual navigation, in seconds.
-
queryProcessorCodes
private String queryProcessorCodes
Indicates how the query was internally processed by PADRE.
-
contextualNavigation
private ContextualNavigation contextualNavigation
Contextual navigation suggestions.
-
rmcs
private final Map<String,Integer> rmcs
Metadata counts (Used in faceted navigation).
The key is the tuple
metadata_class:value
and the value is the count.Examples:
- a:mozart => 12
- a:beethoven => 6
- -a: => 10 (i.e. items with no a metadata)
-
rmcItemResults
private final Map<String,List<RMCItemResult>> rmcItemResults
Metadata counts (Used in faceted navigation) including top n results for each count.
The key is the couple of
metadata_class:value
. The value is a list of the first n results that would be returned if the metadata constraint was applied.The key is the same one as the
rmcs
map.Examples:
- a:shakespeare =>
- Romeo and Juliet
- Cleopatra
- ...
- a:voltaire =>
- Zadig
- ...
- Since:
- 11.2
- a:shakespeare =>
-
metadataRanges
private final Map<String,Range> metadataRanges
Metadata ranges.
The key is the
metadata_class
and the value is a DoubleRange object with maximum and minimum values.Example:
- P => Range(100.0, 400.0)
-
boundingBoxes
public Map<String,GeoBoundingBox> boundingBoxes
Bounding boxes for Geospatial metadata classes
The key is the
metadata_class
and the value is the bounding box for the coordinates for that class that appeared in the results (up to the DAAT limit).
-
urlCounts
private final Map<String,Integer> urlCounts
URL counts (Used in faceted navigation).
The key is the URL itself and the value is the count. If the URL starts with
http://
, it's omitted.Examples:
- www.example.com/about => 12
- www.example.com/contact => 6
- https://secure.example.com/login => 5
-
gScopeCounts
private final Map<String,Integer> gScopeCounts
GScope counts (Used in faceted navigation)
The key is the GScope number and the value is the count.
Warning: When accessing this field from a template or a hook script you must use the following syntax:
GScopeCounts
, instead ofgScopeCounts
due to the Javabeans naming conventions.
-
dateCounts
private final Map<String,DateCount> dateCounts
Date counts (Used in faceted navigation)
The key is a tuple
metadata_class:value
, with the value being a year or a label, e.g.d:2003
ord:Yesterday
.- Since:
- 12.0
-
queryHighlightRegex
private String queryHighlightRegex
Regular expression to use to highlight query terms in titles, summaries or metadata.
PADRE provides the regular expression to use depending on the query terms and other factors.
-
origin
private Float[] origin
Origin of the search, for geographical searches.
The first slot contains the latitude, the second slot contains the longitude.
-
entityList
private final Map<String,Integer> entityList
List of prominent entities.
See the experimental
-fluent
query processor option.
-
includeScopes
private final List<String> includeScopes
Scopes (URL prefixes, not Gscope) included via thescope
query processor option.
-
excludeScopes
private final List<String> excludeScopes
Scopes (URL prefixes, not Gscopes) excluded via thescope
query processor option.
-
coolerWeights
private final Map<CoolerWeighting,Float> coolerWeights
AMap
of floats that describe the cooler ranking weights. Weights are identified by the cooler variable short name + id, and the map is only populated when explain mode is on.
-
explainTypes
private final Map<CoolerWeighting,String> explainTypes
A
Map
of Strings that describes how to calculate the potential improvement for ranking on each feature when the content optimiser is used.Ranking features are identified by the cooler variable short name + id, and the map is only populated when explain mode is on.
-
stopWords
private final List<String> stopWords
AList
of stop words used by the query processor. Only populated when explain mode is on.
-
stemmedEquivs
private final com.google.common.collect.SetMultimap<String,String> stemmedEquivs
ASetMultimap
of Strings that describes the results of stemming on the query. Only populated when explain mode is on. The map keys are content terms, and the value(s) are the query terms that the key matches.
-
coolerNames
private final Map<CoolerWeighting,String> coolerNames
AMap
of long names for cooler ranking variables, keyed by the cooler variable short names + id. Only populated when explain mode is on.
-
svgs
private final Map<String,String> svgs
Contains SVG data returned by PADRE, for example an SVG representation of the syntax tree.
The value contains the actual SVG XML string which can be directly used in an HTML source for browsers that supports it.
- Since:
- 12.0
-
uniqueCountsByGroups
private final List<UniqueByGroup> uniqueCountsByGroups
A list containing the count of unique values for a metadata class grouped by another metadata class.
Each element of the list is the result of the count of unique values of metadata 'X' grouped by metadata 'Y'.
- Since:
- 15.8
-
sumByGroups
private final List<SumByGroup> sumByGroups
A list containing the sum of a numeric metadata class grouped by another metadata class
Each element of the list is the result of the sum of metadata 'X' grouped by metadata 'Y'
-
indexedTermCounts
private final List<IndexedTermCounts> indexedTermCounts
A list containing the counts of term occurrences in a metadata class.
See query processor option -countIndexedTerms.
- Since:
- 15.10
-
documentsPerCollection
private final Map<String,Long> documentsPerCollection
A map containing the number of documents each collection contributed to the result set.
The key is the collection name and the value is the number of documents that collection contributed
- Since:
- 15.12
-
-
Method Detail
-
hasResults
public boolean hasResults()
Test if the packet contains results.- Returns:
- true if the packet contains at least one
Result
.
-
getResultsWithTierBars
public List<ResultType> getResultsWithTierBars()
Get the results and the tier bars mixed together.
This is a convenience method if you need to iterate over the result set and display tier bars.
-
-