Class SearchQuestion
- java.lang.Object
-
- com.funnelback.publicui.search.model.transaction.SearchQuestion
-
public class SearchQuestion extends java.lang.ObjectThis class contains all the input data related to a search.
This data will be collected from the input parameters (query string parameters) and possibly transformed by some processing before PADRE is called.
- Since:
- 11.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSearchQuestion.RequestParametersCommon query string parameters names.static classSearchQuestion.SearchQuestionTypeEnum for identifying special types of search requests requiring special processing
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.String[]>additionalParametersAdditional parameters to pass as-is to PADRE.private java.lang.String[]cliveSpecific component of a meta-collection to queryprivate java.lang.StringcnClickedClusterContextual Navigation: last clicked clusterprivate java.util.List<java.lang.String>cnPreviousClustersContextual Navigation: Previous clicked clustersprivate CollectioncollectionSearchedCollection.private java.lang.StringcurrentProfileThe profile which will be used for the request.private java.util.Map<java.lang.String,java.lang.Object>customDataCustom data placeholder allowing any arbitrary data to be stored by hook scripts.private java.util.List<java.lang.String>dynamicQueryProcessorOptionsDynamic query processor options for PADRE, in addition to the one set in collection.cfg.private java.util.Map<java.lang.String,java.lang.String>environmentVariablesList of environment variables to pass to PADRE.private ExecutionContextexecutionContextExecution context of the Search UI.private java.util.Optional<java.util.List<java.lang.String>>facetCollectionConstraintsThe collections to restrict search to for faceted navigation.private java.lang.StringfacetsGScopeConstraintsGScope constraints to apply for faceted navigation (In addition to existing gscope constraints).private java.util.List<java.lang.String>facetsQueryConstraintsQuery constraints to apply for faceted navigation (In addition to other query expressions).private @Pattern(regexp="[\\w-_]+") java.lang.StringformDisplay form (template)private com.funnelback.common.Environment.FunnelbackVersionfunnelbackVersionFunnelback versionprivate java.lang.StringhostnameName of the host where PADRE executed the query.private booleanimpersonatedWhether the request is impersonated (Document Level Security)private java.util.Map<java.lang.String,java.lang.String>inputParameterMapInput parameters map.private java.util.LocalelocaleLocaleto use for the search.private LocationlocationLocationinformation detected for the remote user based on information from their request.private java.util.Optional<java.lang.Boolean>logQueryDefines if the query should be logged or not, or if it should fall back to default.private java.util.Optional<java.lang.Integer>maxPadrePacketSizeA optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted.private java.util.List<java.lang.String>metaParametersmeta_* / query_* input parameters, transformed in query expressions.private java.lang.StringoriginalQueryOriginal query, as entered by the user.private java.util.Optional<java.lang.Long>padreTimeoutA optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.private java.security.PrincipalprincipalPrincipal representing the remote user for the current request.private PriorityQueryProcessorOptionspriorityQueryProcessorOptionsQuery processor options that are guaranteed to apply.private @Pattern(regexp="[\\w-_]+") java.lang.StringprofileSearchProfile, defaulting to "_default"private java.lang.StringqueryQuery terms.private java.util.Map<java.lang.String,java.util.List<java.lang.String>>queryStringMapSets the query string parameter map.private SearchQuestion.SearchQuestionTypequestionTypeIndicates the 'type' of question, which may trigger special processing in the search lifecycle.private java.util.Map<java.lang.String,java.lang.String[]>rawInputParametersRaw input parametersprivate com.google.common.collect.ListMultimap<java.lang.String,java.lang.String>requestHeadersHeaders provided with the incoming search requestprivate java.lang.StringrequestIdRequest identifier to log for this transaction.private java.util.Map<java.lang.String,java.util.List<java.lang.String>>selectedCategoryValuesList of selected facets categories.private java.util.Set<java.lang.String>selectedFacetsList of selected facets.private java.util.List<java.lang.String>systemMetaParameterssmeta_* / squery_* input parameters, transformed in query expressions.private java.util.List<java.lang.String>userKeysUser keys for early binding Document Level Security.
-
Constructor Summary
Constructors Constructor Description SearchQuestion()SearchQuestion(ExecutionContext executionContext, com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> requestHeaders, java.lang.String query, java.lang.String originalQuery, Collection collection, java.lang.String profile, java.lang.String currentProfile, java.lang.String[] clive, java.lang.String form, java.lang.String cnClickedCluster, java.util.List<java.lang.String> facetsQueryConstraints, java.util.Optional<java.util.List<java.lang.String>> facetCollectionConstraints, java.lang.String facetsGScopeConstraints, boolean impersonated, java.lang.String requestId, java.util.Optional<java.lang.Boolean> logQuery, java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryStringMap, SearchQuestion.SearchQuestionType questionType, java.util.Locale locale, Location location, java.security.Principal principal, java.lang.String hostname, com.funnelback.common.Environment.FunnelbackVersion funnelbackVersion, java.util.Optional<java.lang.Integer> maxPadrePacketSize, java.util.Optional<java.lang.Long> padreTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String[]>getAdditionalParameters()Additional parameters to pass as-is to PADRE.java.lang.String[]getClive()Specific component of a meta-collection to queryjava.lang.StringgetCnClickedCluster()Contextual Navigation: last clicked clusterjava.util.List<java.lang.String>getCnPreviousClusters()Contextual Navigation: Previous clicked clustersCollectiongetCollection()SearchedCollection.java.lang.StringgetCurrentProfile()The profile which will be used for the request.com.funnelback.config.configtypes.service.ServiceConfigReadOnlygetCurrentProfileConfig()Returns the (modern) config of the currentProfilejava.util.Map<java.lang.String,java.lang.Object>getCustomData()Custom data placeholder allowing any arbitrary data to be stored by hook scripts.java.util.List<java.lang.String>getDynamicQueryProcessorOptions()Dynamic query processor options for PADRE, in addition to the one set in collection.cfg.java.util.Map<java.lang.String,java.lang.String>getEnvironmentVariables()List of environment variables to pass to PADRE.ExecutionContextgetExecutionContext()Execution context of the Search UI.java.util.Optional<java.util.List<java.lang.String>>getFacetCollectionConstraints()The collections to restrict search to for faceted navigation.java.lang.StringgetFacetsGScopeConstraints()GScope constraints to apply for faceted navigation (In addition to existing gscope constraints).java.util.List<java.lang.String>getFacetsQueryConstraints()Query constraints to apply for faceted navigation (In addition to other query expressions).java.lang.StringgetForm()Display form (template)com.funnelback.common.Environment.FunnelbackVersiongetFunnelbackVersion()Funnelback versionjava.lang.StringgetHostname()Name of the host where PADRE executed the query.java.util.Map<java.lang.String,java.lang.String>getInputParameterMap()Input parameters map.java.util.LocalegetLocale()Localeto use for the search.LocationgetLocation()Locationinformation detected for the remote user based on information from their request.java.util.Optional<java.lang.Boolean>getLogQuery()Defines if the query should be logged or not, or if it should fall back to default.java.util.Optional<java.lang.Integer>getMaxPadrePacketSize()A optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted.java.util.List<java.lang.String>getMetaParameters()meta_* / query_* input parameters, transformed in query expressions.java.lang.StringgetOriginalQuery()Original query, as entered by the user.java.util.Optional<java.lang.Long>getPadreTimeout()A optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.java.security.PrincipalgetPrincipal()Principal representing the remote user for the current request.PriorityQueryProcessorOptionsgetPriorityQueryProcessorOptions()Query processor options that are guaranteed to apply.java.lang.StringgetProfile()SearchProfile, defaulting to "_default"java.lang.StringgetQuery()Query terms.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getQueryStringMapCopy()Query string parameters as a MapSearchQuestion.SearchQuestionTypegetQuestionType()Indicates the 'type' of question, which may trigger special processing in the search lifecycle.java.util.Map<java.lang.String,java.lang.String[]>getRawInputParameters()com.google.common.collect.ListMultimap<java.lang.String,java.lang.String>getRequestHeaders()Headers provided with the incoming search requestjava.lang.StringgetRequestId()Request identifier to log for this transaction.java.util.Map<java.lang.String,java.util.List<java.lang.String>>getSelectedCategoryValues()List of selected facets categories.java.util.Set<java.lang.String>getSelectedFacets()List of selected facets.java.util.List<java.lang.String>getSystemMetaParameters()smeta_* / squery_* input parameters, transformed in query expressions.java.util.List<java.lang.String>getUserKeys()User keys for early binding Document Level Security.booleanisExtraSearch()Deprecated.As of release 14.2, replaced byquestionTypebooleanisImpersonated()Whether the request is impersonated (Document Level Security)voidsetClive(java.lang.String[] clive)Specific component of a meta-collection to queryvoidsetCnClickedCluster(java.lang.String cnClickedCluster)Contextual Navigation: last clicked clustervoidsetCollection(Collection collection)SearchedCollection.voidsetCurrentProfile(java.lang.String currentProfile)The profile which will be used for the request.voidsetExecutionContext(ExecutionContext executionContext)Execution context of the Search UI.voidsetExtraSearch(boolean isExtraSearch)Deprecated.As of release 14.2, replaced byquestionTypevoidsetFacetCollectionConstraints(java.util.Optional<java.util.List<java.lang.String>> facetCollectionConstraints)The collections to restrict search to for faceted navigation.voidsetFacetsGScopeConstraints(java.lang.String facetsGScopeConstraints)GScope constraints to apply for faceted navigation (In addition to existing gscope constraints).voidsetFacetsQueryConstraints(java.util.List<java.lang.String> facetsQueryConstraints)Query constraints to apply for faceted navigation (In addition to other query expressions).voidsetForm(java.lang.String form)Display form (template)voidsetFunnelbackVersion(com.funnelback.common.Environment.FunnelbackVersion funnelbackVersion)Funnelback versionvoidsetHostname(java.lang.String hostname)Name of the host where PADRE executed the query.voidsetImpersonated(boolean impersonated)Whether the request is impersonated (Document Level Security)voidsetLocale(java.util.Locale locale)Localeto use for the search.voidsetLocation(Location location)Locationinformation detected for the remote user based on information from their request.voidsetLogQuery(java.util.Optional<java.lang.Boolean> logQuery)Defines if the query should be logged or not, or if it should fall back to default.voidsetMaxPadrePacketSize(java.util.Optional<java.lang.Integer> maxPadrePacketSize)A optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted.voidsetOriginalQuery(java.lang.String originalQuery)Original query, as entered by the user.voidsetPadreTimeout(java.util.Optional<java.lang.Long> padreTimeout)A optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.voidsetPrincipal(java.security.Principal principal)Principal representing the remote user for the current request.voidsetProfile(java.lang.String profile)SearchProfile, defaulting to "_default"voidsetQuery(java.lang.String query)Query terms.voidsetQueryStringMap(java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryStringMap)Sets the query string parameter map.voidsetQuestionType(SearchQuestion.SearchQuestionType questionType)Indicates the 'type' of question, which may trigger special processing in the search lifecycle.voidsetRequestHeaders(com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> requestHeaders)Headers provided with the incoming search requestvoidsetRequestId(java.lang.String requestId)Request identifier to log for this transaction.java.lang.StringtoString()
-
-
-
Field Detail
-
executionContext
private ExecutionContext executionContext
Execution context of the Search UI. Can be "admin" or "public", depending if the search is ran on the admin port or public port.- Since:
- 15.12
-
requestHeaders
private com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> requestHeaders
Headers provided with the incoming search request- Since:
- 15.16
-
query
private java.lang.String query
Query terms.
This may be transformed before being passed to PADRE, depending on the configuration.
-
originalQuery
private java.lang.String originalQuery
Original query, as entered by the user.
-
collection
private Collection collection
SearchedCollection.
-
profile
@NonNull @Pattern(regexp="[\\w-_]+") private @Pattern(regexp="[\\w-_]+") java.lang.String profile
SearchProfile, defaulting to "_default"
-
currentProfile
private java.lang.String currentProfile
The profile which will be used for the request. This one will always correspond to the name of a profile which exists within the selected collection. Note that this may differ from profile if the requested profile does not actually exist on disk (in which case it will be set to DefaultValues.DEFAULT_PROFILE, as that is what's used).- Since:
- 15.12
-
clive
private java.lang.String[] clive
Specific component of a meta-collection to query
-
form
@NonNull @Pattern(regexp="[\\w-_]+") private @Pattern(regexp="[\\w-_]+") java.lang.String form
Display form (template)
-
cnClickedCluster
private java.lang.String cnClickedCluster
Contextual Navigation: last clicked cluster
-
cnPreviousClusters
private final java.util.List<java.lang.String> cnPreviousClusters
Contextual Navigation: Previous clicked clusters
-
metaParameters
private final java.util.List<java.lang.String> metaParameters
meta_* / query_* input parameters, transformed in query expressions.
Those parameters are supposed to be specified by the user, usually in an advanced search form. If you need to inject parameters for technical / behind-the-scene reasons, consider using
systemMetaParameters.- See Also:
systemMetaParameters
-
systemMetaParameters
private final java.util.List<java.lang.String> systemMetaParameters
smeta_* / squery_* input parameters, transformed in query expressions.
Those parameters are supposed to be "technical" parameters, usually injected through a hook script. If you want the user to specify parameters, consider using
metaParameters.- Since:
- 12.2
- See Also:
metaParameters
-
additionalParameters
private final java.util.Map<java.lang.String,java.lang.String[]> additionalParameters
Additional parameters to pass as-is to PADRE.
The values of this map will be passed through to PADRE and won't be processed at all by the Modern UI. Only parameters relevant to PADRE should be injected here.
Depending on the parameters you want to inject or manipulate, consider using
inputParameterMaporrawInputParameters. Those parameters will be processed by the Modern UI (For example to inject faceted navigation constraints).Note that this map is populated before the first hook script is run: Any additional parameter injected in
inputParameterMaporrawInputParametersin a hook script won't be copied to this map.
-
environmentVariables
private final java.util.Map<java.lang.String,java.lang.String> environmentVariables
List of environment variables to pass to PADRE.
-
dynamicQueryProcessorOptions
private final java.util.List<java.lang.String> dynamicQueryProcessorOptions
Dynamic query processor options for PADRE, in addition to the one set in collection.cfg.
Will be updated by the input processing.
-
priorityQueryProcessorOptions
private final PriorityQueryProcessorOptions priorityQueryProcessorOptions
Query processor options that are guaranteed to apply.Internal use only
- Since:
- 15.12
-
userKeys
private final java.util.List<java.lang.String> userKeys
User keys for early binding Document Level Security.
-
selectedFacets
private final java.util.Set<java.lang.String> selectedFacets
List of selected facets.
Contains the name of the facets that were selected, such as "Location" or "Brand", but not the actual value.
-
selectedCategoryValues
private final java.util.Map<java.lang.String,java.util.List<java.lang.String>> selectedCategoryValues
List of selected facets categories.
Contains the actual values that were selected, indexed by facet. For example: "Location" => ("Sydney", "Melbourne").
-
facetsQueryConstraints
private java.util.List<java.lang.String> facetsQueryConstraints
Query constraints to apply for faceted navigation (In addition to other query expressions).
-
facetCollectionConstraints
@NonNull private java.util.Optional<java.util.List<java.lang.String>> facetCollectionConstraints
The collections to restrict search to for faceted navigation. (In addition to other clive constraints).- Since:
- 15.12
-
facetsGScopeConstraints
private java.lang.String facetsGScopeConstraints
GScope constraints to apply for faceted navigation (In addition to existing gscope constraints).
-
impersonated
private boolean impersonated
Whether the request is impersonated (Document Level Security)
-
requestId
private java.lang.String requestId
Request identifier to log for this transaction. Depending of the collection configuration it can be an IP address, an md5 hash of the address, nothing ("-") or null.- Since:
- 12.4 - Renamed from
userId, 12.5 - Renamed fromuserIdToLog
-
logQuery
private java.util.Optional<java.lang.Boolean> logQuery
Defines if the query should be logged or not, or if it should fall back to default. If false this will prevent the query from being recorded in query logs as well as session history. If not set this will result in the defaults being used. For padre the default is to follow what is in collection.cfg, profile.cfg or padre_opts.cfg, otherwise if the log option is not set in any of those files padre will log the query. This will typically be set false for system generated searches or for extra searches. This may be set from groovy scripts. This can be set to false with cgi parameters on the admin side if the request is authenticated. To do this set &log=false in the URL.- Since:
- 15.14
-
rawInputParameters
private final java.util.Map<java.lang.String,java.lang.String[]> rawInputParameters
Raw input parameters
Contains all the input parameters (query string / request parameters).
Be aware that the value type is
String array, allowing for multiple value of the same parameter (e.g.¶m=value1¶m=value2). Putting a single valuedStringin this Map will not work, it must be an array of size one. Example in a Groovy hook script:transaction.question.rawInputParameters["param"] = [ "value" ]
inputParameterMapprovides a simpler way to inject or retrieve simple mono-valued parameters.inputParameterMapandrawInputParametersare backed by the same Map: Any change made in one will be reflected in the other.- See Also:
inputParameterMap
-
inputParameterMap
private final java.util.Map<java.lang.String,java.lang.String> inputParameterMap
Input parameters map.
Contains all the input parameters (query string / request parameters) in a convenient fashion: Only the first value of each parameter is returned to avoid having to deal with arrays of Strings.
For example if the query string is
¶m=value1¶m=value2then this map will contain only one key-value pair: param=value1. The value2 won't be available unless you userawInputParameters.rawInputParametersprovides a way to inject or retrieve multi-valued parameters. BothinputParameterMapandrawInputParametersare backed by the same Map: Any change made in one will be reflected in the other.- See Also:
rawInputParameters
-
queryStringMap
private java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryStringMap
Sets the query string parameter map.
This is for internal use only and shouldn't be called outside of initializing the search question. Changing the query string map will affect all the URLs that are constructed in the data model
- Since:
- 15.10
-
questionType
private SearchQuestion.SearchQuestionType questionType
Indicates the 'type' of question, which may trigger special processing in the search lifecycle.
e.g. Extra searches or Content Auditor requests.
-
locale
private java.util.Locale locale
Localeto use for the search.This will affect the UI only, to configure the locale for the query processor please refer to the corresponding option -lang.
- Since:
- 12.0
-
location
private Location location
Locationinformation detected for the remote user based on information from their request.- Since:
- 13.0 (12.4 included a MaxMind location class directly here)
-
principal
private java.security.Principal principal
Principal representing the remote user for the current request.
Will be NULL if the user isn't authenticated.
Note: This is not included in the JSON / XML output for security reasons
- Since:
- 12.2
-
hostname
private java.lang.String hostname
Name of the host where PADRE executed the query.
- Since:
- 14.0
-
funnelbackVersion
private com.funnelback.common.Environment.FunnelbackVersion funnelbackVersion
Funnelback version
- Since:
- 15.12
-
maxPadrePacketSize
private java.util.Optional<java.lang.Integer> maxPadrePacketSize
A optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted. Generally the Config option ui.modern.padre_response_size_limit_bytes should be set in preference to setting this.
- Since:
- 15.12
-
padreTimeout
private java.util.Optional<java.lang.Long> padreTimeout
A optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.
- Since:
- 15.12
-
customData
private final java.util.Map<java.lang.String,java.lang.Object> customData
Custom data placeholder allowing any arbitrary data to be stored by hook scripts.- Since:
- 15.12
-
-
Constructor Detail
-
SearchQuestion
public SearchQuestion(ExecutionContext executionContext, com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> requestHeaders, java.lang.String query, java.lang.String originalQuery, Collection collection, @NonNull java.lang.String profile, java.lang.String currentProfile, java.lang.String[] clive, @NonNull java.lang.String form, java.lang.String cnClickedCluster, java.util.List<java.lang.String> facetsQueryConstraints, @NonNull java.util.Optional<java.util.List<java.lang.String>> facetCollectionConstraints, java.lang.String facetsGScopeConstraints, boolean impersonated, java.lang.String requestId, java.util.Optional<java.lang.Boolean> logQuery, java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryStringMap, SearchQuestion.SearchQuestionType questionType, java.util.Locale locale, Location location, java.security.Principal principal, java.lang.String hostname, com.funnelback.common.Environment.FunnelbackVersion funnelbackVersion, java.util.Optional<java.lang.Integer> maxPadrePacketSize, java.util.Optional<java.lang.Long> padreTimeout)
-
SearchQuestion
public SearchQuestion()
-
-
Method Detail
-
getCurrentProfileConfig
public com.funnelback.config.configtypes.service.ServiceConfigReadOnly getCurrentProfileConfig()
Returns the (modern) config of the currentProfile
-
getRawInputParameters
public java.util.Map<java.lang.String,java.lang.String[]> getRawInputParameters()
-
getQueryStringMapCopy
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getQueryStringMapCopy()
Query string parameters as a Map
Return a copy of the internal map representing the query string, for easy manipulation of individual parameters rather than having to decode the query string.
The map is a copy intended to be modifiable to add/remove/update query string parameters.
To convert such a map into a query string suitable for URLs, see
QueryStringUtils.toString(Map, boolean)- Returns:
- Query string parameters
- Since:
- 15.10
-
isExtraSearch
@Deprecated public boolean isExtraSearch()
Deprecated.As of release 14.2, replaced byquestionTypeIndicates if this question is part of the "main" search, or part of an "extra" search.
This is needed to perform some actions only on the main search but not for every extra search.
-
setExtraSearch
@Deprecated public void setExtraSearch(boolean isExtraSearch)
Deprecated.As of release 14.2, replaced byquestionTypeSets whether this question is part of the "main" search, or part of an "extra" search.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getExecutionContext
public ExecutionContext getExecutionContext()
Execution context of the Search UI. Can be "admin" or "public", depending if the search is ran on the admin port or public port.- Since:
- 15.12
-
setExecutionContext
public void setExecutionContext(ExecutionContext executionContext)
Execution context of the Search UI. Can be "admin" or "public", depending if the search is ran on the admin port or public port.- Since:
- 15.12
-
getRequestHeaders
public com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> getRequestHeaders()
Headers provided with the incoming search request- Since:
- 15.16
-
setRequestHeaders
public void setRequestHeaders(com.google.common.collect.ListMultimap<java.lang.String,java.lang.String> requestHeaders)
Headers provided with the incoming search request- Since:
- 15.16
-
getQuery
public java.lang.String getQuery()
Query terms.
This may be transformed before being passed to PADRE, depending on the configuration.
-
setQuery
public void setQuery(java.lang.String query)
Query terms.
This may be transformed before being passed to PADRE, depending on the configuration.
-
getOriginalQuery
public java.lang.String getOriginalQuery()
Original query, as entered by the user.
-
setOriginalQuery
public void setOriginalQuery(java.lang.String originalQuery)
Original query, as entered by the user.
-
getCollection
public Collection getCollection()
SearchedCollection.
-
setCollection
public void setCollection(Collection collection)
SearchedCollection.
-
getProfile
@NonNull public java.lang.String getProfile()
SearchProfile, defaulting to "_default"
-
setProfile
public void setProfile(@NonNull java.lang.String profile)SearchProfile, defaulting to "_default"
-
getCurrentProfile
public java.lang.String getCurrentProfile()
The profile which will be used for the request. This one will always correspond to the name of a profile which exists within the selected collection. Note that this may differ from profile if the requested profile does not actually exist on disk (in which case it will be set to DefaultValues.DEFAULT_PROFILE, as that is what's used).- Since:
- 15.12
-
setCurrentProfile
public void setCurrentProfile(java.lang.String currentProfile)
The profile which will be used for the request. This one will always correspond to the name of a profile which exists within the selected collection. Note that this may differ from profile if the requested profile does not actually exist on disk (in which case it will be set to DefaultValues.DEFAULT_PROFILE, as that is what's used).- Since:
- 15.12
-
getClive
public java.lang.String[] getClive()
Specific component of a meta-collection to query
-
setClive
public void setClive(java.lang.String[] clive)
Specific component of a meta-collection to query
-
getForm
@NonNull public java.lang.String getForm()
Display form (template)
-
setForm
public void setForm(@NonNull java.lang.String form)Display form (template)
-
getCnClickedCluster
public java.lang.String getCnClickedCluster()
Contextual Navigation: last clicked cluster
-
setCnClickedCluster
public void setCnClickedCluster(java.lang.String cnClickedCluster)
Contextual Navigation: last clicked cluster
-
getCnPreviousClusters
public java.util.List<java.lang.String> getCnPreviousClusters()
Contextual Navigation: Previous clicked clusters
-
getMetaParameters
public java.util.List<java.lang.String> getMetaParameters()
meta_* / query_* input parameters, transformed in query expressions.
Those parameters are supposed to be specified by the user, usually in an advanced search form. If you need to inject parameters for technical / behind-the-scene reasons, consider using
systemMetaParameters.- See Also:
systemMetaParameters
-
getSystemMetaParameters
public java.util.List<java.lang.String> getSystemMetaParameters()
smeta_* / squery_* input parameters, transformed in query expressions.
Those parameters are supposed to be "technical" parameters, usually injected through a hook script. If you want the user to specify parameters, consider using
metaParameters.- Since:
- 12.2
- See Also:
metaParameters
-
getAdditionalParameters
public java.util.Map<java.lang.String,java.lang.String[]> getAdditionalParameters()
Additional parameters to pass as-is to PADRE.
The values of this map will be passed through to PADRE and won't be processed at all by the Modern UI. Only parameters relevant to PADRE should be injected here.
Depending on the parameters you want to inject or manipulate, consider using
inputParameterMaporrawInputParameters. Those parameters will be processed by the Modern UI (For example to inject faceted navigation constraints).Note that this map is populated before the first hook script is run: Any additional parameter injected in
inputParameterMaporrawInputParametersin a hook script won't be copied to this map.
-
getEnvironmentVariables
public java.util.Map<java.lang.String,java.lang.String> getEnvironmentVariables()
List of environment variables to pass to PADRE.
-
getDynamicQueryProcessorOptions
public java.util.List<java.lang.String> getDynamicQueryProcessorOptions()
Dynamic query processor options for PADRE, in addition to the one set in collection.cfg.
Will be updated by the input processing.
-
getPriorityQueryProcessorOptions
public PriorityQueryProcessorOptions getPriorityQueryProcessorOptions()
Query processor options that are guaranteed to apply.Internal use only
- Since:
- 15.12
-
getUserKeys
public java.util.List<java.lang.String> getUserKeys()
User keys for early binding Document Level Security.
-
getSelectedFacets
public java.util.Set<java.lang.String> getSelectedFacets()
List of selected facets.
Contains the name of the facets that were selected, such as "Location" or "Brand", but not the actual value.
-
getSelectedCategoryValues
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSelectedCategoryValues()
List of selected facets categories.
Contains the actual values that were selected, indexed by facet. For example: "Location" => ("Sydney", "Melbourne").
-
getFacetsQueryConstraints
public java.util.List<java.lang.String> getFacetsQueryConstraints()
Query constraints to apply for faceted navigation (In addition to other query expressions).
-
setFacetsQueryConstraints
public void setFacetsQueryConstraints(java.util.List<java.lang.String> facetsQueryConstraints)
Query constraints to apply for faceted navigation (In addition to other query expressions).
-
getFacetCollectionConstraints
@NonNull public java.util.Optional<java.util.List<java.lang.String>> getFacetCollectionConstraints()
The collections to restrict search to for faceted navigation. (In addition to other clive constraints).- Since:
- 15.12
-
setFacetCollectionConstraints
public void setFacetCollectionConstraints(@NonNull java.util.Optional<java.util.List<java.lang.String>> facetCollectionConstraints)The collections to restrict search to for faceted navigation. (In addition to other clive constraints).- Since:
- 15.12
-
setFacetsGScopeConstraints
public void setFacetsGScopeConstraints(java.lang.String facetsGScopeConstraints)
GScope constraints to apply for faceted navigation (In addition to existing gscope constraints).
-
getFacetsGScopeConstraints
public java.lang.String getFacetsGScopeConstraints()
GScope constraints to apply for faceted navigation (In addition to existing gscope constraints).
-
isImpersonated
public boolean isImpersonated()
Whether the request is impersonated (Document Level Security)
-
setImpersonated
public void setImpersonated(boolean impersonated)
Whether the request is impersonated (Document Level Security)
-
getRequestId
public java.lang.String getRequestId()
Request identifier to log for this transaction. Depending of the collection configuration it can be an IP address, an md5 hash of the address, nothing ("-") or null.- Since:
- 12.4 - Renamed from
userId, 12.5 - Renamed fromuserIdToLog
-
setRequestId
public void setRequestId(java.lang.String requestId)
Request identifier to log for this transaction. Depending of the collection configuration it can be an IP address, an md5 hash of the address, nothing ("-") or null.- Since:
- 12.4 - Renamed from
userId, 12.5 - Renamed fromuserIdToLog
-
getLogQuery
public java.util.Optional<java.lang.Boolean> getLogQuery()
Defines if the query should be logged or not, or if it should fall back to default. If false this will prevent the query from being recorded in query logs as well as session history. If not set this will result in the defaults being used. For padre the default is to follow what is in collection.cfg, profile.cfg or padre_opts.cfg, otherwise if the log option is not set in any of those files padre will log the query. This will typically be set false for system generated searches or for extra searches. This may be set from groovy scripts. This can be set to false with cgi parameters on the admin side if the request is authenticated. To do this set &log=false in the URL.- Since:
- 15.14
-
setLogQuery
public void setLogQuery(java.util.Optional<java.lang.Boolean> logQuery)
Defines if the query should be logged or not, or if it should fall back to default. If false this will prevent the query from being recorded in query logs as well as session history. If not set this will result in the defaults being used. For padre the default is to follow what is in collection.cfg, profile.cfg or padre_opts.cfg, otherwise if the log option is not set in any of those files padre will log the query. This will typically be set false for system generated searches or for extra searches. This may be set from groovy scripts. This can be set to false with cgi parameters on the admin side if the request is authenticated. To do this set &log=false in the URL.- Since:
- 15.14
-
getInputParameterMap
public java.util.Map<java.lang.String,java.lang.String> getInputParameterMap()
Input parameters map.
Contains all the input parameters (query string / request parameters) in a convenient fashion: Only the first value of each parameter is returned to avoid having to deal with arrays of Strings.
For example if the query string is
¶m=value1¶m=value2then this map will contain only one key-value pair: param=value1. The value2 won't be available unless you userawInputParameters.rawInputParametersprovides a way to inject or retrieve multi-valued parameters. BothinputParameterMapandrawInputParametersare backed by the same Map: Any change made in one will be reflected in the other.- See Also:
rawInputParameters
-
setQueryStringMap
public void setQueryStringMap(java.util.Map<java.lang.String,java.util.List<java.lang.String>> queryStringMap)
Sets the query string parameter map.
This is for internal use only and shouldn't be called outside of initializing the search question. Changing the query string map will affect all the URLs that are constructed in the data model
- Since:
- 15.10
-
getQuestionType
public SearchQuestion.SearchQuestionType getQuestionType()
Indicates the 'type' of question, which may trigger special processing in the search lifecycle.
e.g. Extra searches or Content Auditor requests.
-
setQuestionType
public void setQuestionType(SearchQuestion.SearchQuestionType questionType)
Indicates the 'type' of question, which may trigger special processing in the search lifecycle.
e.g. Extra searches or Content Auditor requests.
-
getLocale
public java.util.Locale getLocale()
Localeto use for the search.This will affect the UI only, to configure the locale for the query processor please refer to the corresponding option -lang.
- Since:
- 12.0
-
setLocale
public void setLocale(java.util.Locale locale)
Localeto use for the search.This will affect the UI only, to configure the locale for the query processor please refer to the corresponding option -lang.
- Since:
- 12.0
-
getLocation
public Location getLocation()
Locationinformation detected for the remote user based on information from their request.- Since:
- 13.0 (12.4 included a MaxMind location class directly here)
-
setLocation
public void setLocation(Location location)
Locationinformation detected for the remote user based on information from their request.- Since:
- 13.0 (12.4 included a MaxMind location class directly here)
-
getPrincipal
public java.security.Principal getPrincipal()
Principal representing the remote user for the current request.
Will be NULL if the user isn't authenticated.
Note: This is not included in the JSON / XML output for security reasons
- Since:
- 12.2
-
setPrincipal
public void setPrincipal(java.security.Principal principal)
Principal representing the remote user for the current request.
Will be NULL if the user isn't authenticated.
Note: This is not included in the JSON / XML output for security reasons
- Since:
- 12.2
-
getHostname
public java.lang.String getHostname()
Name of the host where PADRE executed the query.
- Since:
- 14.0
-
setHostname
public void setHostname(java.lang.String hostname)
Name of the host where PADRE executed the query.
- Since:
- 14.0
-
getFunnelbackVersion
public com.funnelback.common.Environment.FunnelbackVersion getFunnelbackVersion()
Funnelback version
- Since:
- 15.12
-
setFunnelbackVersion
public void setFunnelbackVersion(com.funnelback.common.Environment.FunnelbackVersion funnelbackVersion)
Funnelback version
- Since:
- 15.12
-
getMaxPadrePacketSize
public java.util.Optional<java.lang.Integer> getMaxPadrePacketSize()
A optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted. Generally the Config option ui.modern.padre_response_size_limit_bytes should be set in preference to setting this.
- Since:
- 15.12
-
setMaxPadrePacketSize
public void setMaxPadrePacketSize(java.util.Optional<java.lang.Integer> maxPadrePacketSize)
A optional maxPadrePacketSize which may be overridden to set the max Padre packet size that will be permitted. Generally the Config option ui.modern.padre_response_size_limit_bytes should be set in preference to setting this.
- Since:
- 15.12
-
getPadreTimeout
public java.util.Optional<java.lang.Long> getPadreTimeout()
A optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.
- Since:
- 15.12
-
setPadreTimeout
public void setPadreTimeout(java.util.Optional<java.lang.Long> padreTimeout)
A optional timeout which when set overrides the value of collection.cfg option ui.modern.padre_fork_timeout_ms, which controls how long the main padre forking may take.
- Since:
- 15.12
-
getCustomData
public java.util.Map<java.lang.String,java.lang.Object> getCustomData()
Custom data placeholder allowing any arbitrary data to be stored by hook scripts.- Since:
- 15.12
-
-