atg.search.routing.command.search
Class QueryRequest

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.SearchEngineRequestImpl
          extended by atg.search.routing.command.search.SearchRequest
              extended by atg.search.routing.command.search.QueryRequest
All Implemented Interfaces:
PagedRequest, atg.search.routing.command.SearchEngineRequest, java.io.Serializable

public class QueryRequest
extends SearchRequest
implements PagedRequest

The query request is the most widely used search request type. It supports ordinary text queries and category navigation requests.

Required: Question setQuestion(java.lang.String) or StartCategory setStartCategory(String).

Optional: Everything else

See Also:
Serialized Form

Nested Class Summary
static class QueryRequest.DocSetSort
          Enumeration for docset sorting.
static class QueryRequest.DocSortOrder
          Doc sort order enumeration type.
static class QueryRequest.Mode
          Query mode enumeration.
static class QueryRequest.RequestMode
          Reuqest mode enumeration type.
static class QueryRequest.Response
          Query Response type
static class QueryRequest.RuleMode
          Rule mode enumeration type.
static class QueryRequest.Sorting
          Enumeration type for answer sorting or grouping.
static class QueryRequest.Strategy
          Search strategy type.
 
Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.search.routing.command.search.SearchRequest
BROWSE, CACHEABLE, CATEGORIZE, DEBUG, EMPTY_ARRAY, ENV, ID, INSPECT, LIST_PROPERTY_ALLOWED, LISTABLE_PROPERTIES, LOCAL_MERGE, LOCAL_MERGE_DEBUG, LOG_THIS_REQUEST, mDebug, mListableProperties, mListPropertyAllowed, mLocalMergeDebugEnabled, mLocalMergeDebugReady, mLocalMergeEnabled, mMergeSettings, mMultiPartitionSearch, mRequestIdentifier, MsInNs, mSleepTimeMs, mTargets, mTimeLimitMs, MULTI_PARTITION, MULTI_SEARCH_SESSION, mVersion, QUERY, RESP_FORM, SAVE_REQUEST, SIMILARDOCS, SITE_CONSTR, SITE_ID, SLEEP_TIME_MS, STRUCTQUERY, TAGS, TIME, TIME_LIMIT_MS, TREEQUERY, TYPEAHEAD, VERSION, VIC
 
Fields inherited from interface atg.search.routing.command.search.PagedRequest
ORIG_PAGE_SIZE, PAGE_NUM, PAGE_OFFSET_INFO, PAGE_SIZE
 
Constructor Summary
QueryRequest()
           
 
Method Summary
 SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
          Default implementation returns the first element of the array and tosses the rest.
protected static QueryRequest fromXml(atg.search.routing.utils.SearchMessageParser pParser, SearchRequest compRequest)
           
 java.lang.Boolean getAdvanced()
          Indicates whether advanced query features, such as queryTerms, are enabled
 java.lang.Integer getAndFeedback()
          Returns the andFeedback threshold for generating the feedback on mode=and searches, based on the number of results.
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
 java.lang.Boolean getAutoFacet()
          Indicates whether automatic pre-processing of facet expressions be performed
 java.lang.Integer getAutomaticConstrainCategories()
          Returns the maximum number of categories to add as constraints.
 java.lang.Boolean getAutomaticConstrainCategoriesPruning()
          Indicates whether pruning is enabled
 java.lang.Boolean getAutoSpell()
          Indicates whether autospelling is enabled
protected  void getBodyXML(java.lang.StringBuilder buf)
          Override to provide the body of the xml.
 java.lang.Boolean getDebugExclusion()
          Indicates whether debugging of exclusions is enabled
 java.lang.Boolean getDisablePositioning()
          Indicates whether positioning has been disabled.
 java.lang.String[] getDocFlags()
          Returns a non-null array of doc flags that determine how much doc information is included in the response.
 java.lang.String getDocFlagsString()
          Returns a comma-delimited list of doc flags
 java.lang.String[] getDocProps()
          Returns the list of docprops.
 java.lang.String getDocPropsString()
          Returns the comma-delimited list of docprops.
 QueryRequest.DocSetSort getDocSetSort()
          Returns the doc set sort mode.
 atg.search.routing.command.search.DocSortCommon getDocSort()
          Returns sorting for the result groups
 java.lang.Boolean getDocSortCase()
          Indicates whether the doc sort is case sensitive
 QueryRequest.DocSortOrder getDocSortOrder()
          Indicates whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode.
 java.lang.String getDocSortPred()
          If docSort is predicate, returns the predicate expression to use for sorting.
 java.lang.String getDocSortProp()
          Returns the property name to use for the strprop or numprop modes
 java.lang.String getDocSortPropDefault()
          ATG Search returns a list of result groups in its query response.
 DocSortPropVal getDocSortPropVal()
          When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.
 DocumentSetConstraint getDocumentSetConstraints()
          Returns the document set constraints.
 java.lang.String getFacetTrail()
          Gets the facet trail string
 java.lang.Boolean getFastPaging()
          Returns an indication of whether fast paging is enabled for this request.
 java.lang.Boolean getHighlight()
          Indicates whether query highlighting is enabled
 LogicTree getLogicTree()
          Returns the custom query logic tree
 java.lang.Integer getMaxRelatedSets()
          Returns the maximum number of related sets to return per document
 java.lang.Integer getMinScore()
          Returns the minimum score; the value will range from 0 to 1000, and defaults to 0.
 QueryRequest.Mode getMode()
          Returns the query mode.
 java.lang.Integer getOptimize()
          Returns the optimize level
 java.lang.Integer getPageNum()
          Returns the 0-based page number that should be retrieved.
 atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
          Returns internal page offset information when fast paging is used with a multi-partition index.
 java.lang.Integer getPageSize()
          Returns the number of results that should be returned per page
 ParserOptions getParserOptions()
          Returns text processing options
 DocumentSetConstraint getPrefAnswerConstraints()
          Returns preferred answer document set constraints
 java.lang.String[] getPriorInput()
          Returns a List of Strings of prior input
 java.lang.String getPriorInputString()
          Returns the prior input list as a |-delimited String
 java.lang.String getQuestion()
          Returns the user's search input
 java.lang.String getRankConfig()
          Returns the ranking configuration
 java.lang.String getRankConfigXml()
          Returns full rankConfig XML for this request
 Ranking getRanking()
          Returns the custom ranking algorithm
 java.lang.Boolean getRankPreferVar()
          Indicates whether variables that map to weights in a property prioritization should be preferred over an explicit property value.
 java.lang.String getRefineConfig()
          Returns the refinement configuration
 java.lang.String getRefineConfigDefault()
          Returns the refine config default to use when $map fails
 java.lang.String getRefineConfigMapKey()
          Returns the refine config map key
 java.lang.String getRefineConfigMapProperty()
          If refineConfig equals "$map", returns the name of property to use for automatically selecting the configuration.
 java.lang.String getRefineConfigXml()
          Returns full refineConfig XML for this request
 DocumentSetConstraint getRefineConstraints()
          Returns document set constraints for refinements
 RefineCountType getRefineCount()
          Returns the refinement value counting mode
 java.lang.Boolean getRefineDebug()
          Indicates whether refinement debugging is enabled
 java.lang.Integer getRefineMax()
          Returns the maximum number of refinement properties to return, even if the refinement configuration could generate more.
 java.lang.Integer getRefineMin()
          Returns the minimum size of a refinement property value, in terms of the number of index items with that value.
 java.lang.Integer getRefineMinVal()
          Returns the minimum number of refinement property values
 java.lang.Integer getRefineTop()
          Returns the number of index items that has each value
 java.lang.String[] getRelatedSets()
          Returns a list of document sets, which form a constraint on the returned related sets to return.
 java.lang.String getRelatedSetsString()
          Returns a comma-delimited list of related sets.
 atg.nucleus.ResolvingMap getRelQuestSettings()
          Returns the relQuest settings as a resolving map
 java.lang.String getRelQuestSettingsString()
          Returns the rel quest settings in a big string of the form /param=val;/param=Val;...
 ReportDataControl getReportDataControl()
          Returns the control for individual reports in the results
 int getRequestId()
          This identifies the type of request, one of SearchRequest.QUERY, SearchRequest.BROWSE, etc.
 QueryRequest.RequestMode getRequestMode()
          Returns the request mode
 java.util.Map getResponseNumberSettings()
          Returns the response number settings map
 java.lang.String getResponseNumberSettingsString()
          Returns the result list controls in a big string of the form paramVal,paramVal,...
 java.lang.Boolean getReturnFeedback()
          ATG Search returns feedback about related terms and phrases for the query.
 QueryRequest.RuleMode getRuleMode()
          Returns the rule mode
 QueryRequest.Sorting getSorting()
          Sets document grouping algorithm used to group the search result documents.
 java.lang.String getSortProperty()
          The sort property is actually used for grouping results.
 java.lang.String getStartCategory()
          Returns the start category for category navigation
 QueryRequest.Strategy getStrategy()
          Returns how restrictive the search should be
 java.lang.Integer getSuggestQueryCategories()
          Returns the maximum number of categories to return in the feedback.
 java.lang.Boolean getSuggestQueryCategoriesPruning()
          Returns true if pruning has been enabled
 java.lang.String[] getTextProps()
          Returns non-null array of text fields that controls how much of the meta-data of the response's document is returned
 java.lang.String getTextPropsString()
          Returns a comma-delimited list of text properties
 java.lang.Boolean getTextSort()
          Indicates whether the text statements for each response should be sorted in the order in which they appeared in the document.
 TraceExpression getTraceExpression()
          Returns the trace expression
 RequestVariables getVariables()
          Returns the request variables for rank rules.
 DocumentSetConstraint getWeightedProperties()
          Returns weighted property constraints
 boolean isCatNavRequest()
          Indicates true if startCategory was specified, false otherwise
 boolean isFacetSearchRequest()
          Not part of the request
 SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
          Override to provide search response processing (parsing, generally).
 void setAdvanced(java.lang.Boolean advanced)
          Controls whether advanced query features, such as queryTerms, are enabled
 void setAndFeedback(java.lang.Integer pAndFeedback)
          Sets the andFeedback threshold for generating the feedback on mode=and searches, based on the number of results.
 void setAutoFacet(java.lang.Boolean autoFacet)
          Controls whether automatic pre-processing of facet expressions be performed
 void setAutomaticConstrainCategories(java.lang.Integer automaticConstrainCategories)
          ATG Search includes a categorization module that applies rules to decide what categories of a taxonomy are relevant to the content, or in this case user queries.
 void setAutomaticConstrainCategoriesPruning(java.lang.Boolean automaticConstrainCategoriesPruning)
          Controls whether pruning is enabled
 void setAutoSpell(java.lang.Boolean autoSpell)
          ATG Search performs spelling correction and can return suggestions as part of the response.
 void setDebugExclusion(java.lang.Boolean pDebugExclusion)
          Sets whether debugging of exclusions is enabled
 void setDisablePositioning(java.lang.Boolean pDisablePositioning)
          Sets whether positioning should be disabled
 void setDocFlags(java.lang.String[] pDocFlags)
          Controls how much document information is returned.
 void setDocFlagsString(java.lang.String pDocFlags)
          Accepts a comma-delimited list of doc flags.
 void setDocProps(java.lang.String[] docProps)
          ATG Search returns the meta-data properties associated with the index item of each statement result.
 void setDocPropsString(java.lang.String docProps)
          accepts a comma-delimited list of docProps
 void setDocSetSort(QueryRequest.DocSetSort docSetSort)
          ATG Search can return categorization feedback about the returned results in the form of a tree.
 void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
          ATG Search returns a list of result groups in its query response.
 void setDocSortCase(java.lang.Boolean pDocSortCase)
          Controls whether the doc sort is case sensitive
 void setDocSortOrder(QueryRequest.DocSortOrder docSortOrder)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPred(java.lang.String docSortPred)
          Sets the predicate expression to use for sorting.
 void setDocSortProp(java.lang.String docSortProp)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
          When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.
 void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
          Sets document set constraints
 void setFacetSearchRequest(boolean pFacetSearchRequest)
          Not part of the request
 void setFacetTrail(java.lang.String pFacetTrail)
          Sets the facet trail string.
 void setFastPaging(java.lang.Boolean pFastPaging)
          Sets whether fast paging is enabled for this request.
 void setHighlight(java.lang.Boolean highlight)
          Controls whether query highlighting is enabled
 void setLogicTree(LogicTree logicTree)
          Sets the custom query logic tree
 void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
          ATG Search returns the retrieved documents along with the statement results.
 void setMinScore(java.lang.Integer minScore)
          The ATG Search results are ranked by relevancy.
 void setMode(QueryRequest.Mode mode)
          ATG Search handles natural language and Boolean queries.
 void setOptimize(java.lang.Integer pOptimize)
          -1 is old-style search, 0 is the default, 1 eliminates statement relevancy calculations, and 2 eliminates statement candidate retrieval altogether.
 void setPageNum(java.lang.Integer pageNum)
          Sets the 0-based page number that should be retrieved.
 void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pPageOffsetInfo)
          Sets the page offset information, which is used internally to manage fast paging for multiple partitions.
 void setPageSize(java.lang.Integer pageSize)
          Sets the number of results that should be returned per page.
 void setParserOptions(ParserOptions parserOptions)
          Sets text processing options
 void setPrefAnswerConstraints(DocumentSetConstraint prefAnswerConstraints)
          Sets preferred answer document set constraints
 void setPrefAnswerConstraints(java.lang.String pPrefAnswerConstraintsXml)
          Creates a new preferred answer DocumentSetConstraint from the XML.
 void setPriorInput(java.lang.String[] priorInput)
          Sets List of Strings of prior input
 void setPriorInputString(java.lang.String priorInput)
          Sets the list of prior input using a |-delimited String
 void setQuestion(java.lang.String question)
          This specifies the question a query request.
 void setRankConfig(java.lang.String rankConfig)
          Sets the ranking configuration
 void setRankConfigXml(java.lang.String pRankConfigXml)
          Call this to provide full rankConfig XML for this request.
 void setRanking(Ranking ranking)
          Sets the custom ranking algorithm
 void setRankPreferVar(java.lang.Boolean pRankPreferVar)
          Sets whether variables that map to weights in a property prioritization should be preferred over an explicit property value.
 void setRefineConfig(java.lang.String refineConfig)
          ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search.
 void setRefineConfigDefault(java.lang.String pRefineConfigDefault)
          Sets the refine config default to use when $map fails
 void setRefineConfigMapKey(java.lang.String pRefineConfigMapKey)
          Sets the refine config map key, for use with $map
 void setRefineConfigMapProperty(java.lang.String refineConfigMapProperty)
          If refineConfig equals "$map", call this to set the name of property to use for automatically selecting the configuration.
 void setRefineConfigXml(java.lang.String pRefineConfigXml)
          Call this to provide full refineConfig XML for this request.
 void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
          Sets document set constraints for refinements
 void setRefineCount(RefineCountType pRefineCount)
          Sets the refinement value counting mode
 void setRefineDebug(java.lang.Boolean pRefineDebug)
          Sets whether refinement debugging is enabled
 void setRefineMax(java.lang.Integer refineMax)
          ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search.
 void setRefineMin(java.lang.Integer refineMin)
          ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search.
 void setRefineMinVal(java.lang.Integer refineMinVal)
          ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search.
 void setRefineTop(java.lang.Integer refineTop)
          ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search.
 void setRelatedSets(java.lang.String[] relatedSets)
          ATG Search returns the retrieved documents along with the statement results.
 void setRelatedSetsString(java.lang.String pRelSets)
          accepts a comma-delimited list of related sets
 void setRelQuestSettings(atg.nucleus.ResolvingMap pRelQuestSettingsMap)
          Sets the relQuest settings using a resolving map
 void setRelQuestSettingsString(java.lang.String relQuestSettings)
          Sets the rel quest settings in a big string of the form /param=val;/param=Val;...
 void setReportDataControl(ReportDataControl reportDataControl)
          Sets the control for individual reports in the results
 void setRequestMode(QueryRequest.RequestMode requestMode)
          Normally, ATG Search treats each user query as a separate isolated request, with no pre-existing state or context.
 void setResponseNumberSettings(java.util.Map pResponseNumberSettingsMap)
          Sets the response number settings map
 void setResponseNumberSettingsString(java.lang.String responseNumberSettings)
          Sets the result list controls in a big string of the form paramVal,paramVal,...
 void setReturnFeedback(java.lang.Boolean returnFeedback)
          ATG Search returns feedback about related terms and phrases for the query.
 void setRuleMode(QueryRequest.RuleMode ruleMode)
          ATG Search includes a query module that analyzes user queries and executes special actions which can modify the search behavior.
 void setSorting(QueryRequest.Sorting sorting)
          Sets document grouping algorithm used to group the search result documents.
 void setSortProperty(java.lang.String sortProperty)
          The sort property is actually used for grouping results.
 void setStartCategory(java.lang.String pStartCategory)
          This specifies the start category for category navigation.
 void setStrategy(QueryRequest.Strategy strategy)
          ATG Search has a large number of search parameters that control the generic search algorithm.
 void setSuggestQueryCategories(java.lang.Integer suggestQueryCategories)
          ATG Search includes a categorization module that applies rules to decide what categories of a taxonomy are relevant to the content, or in this case user queries.
 void setSuggestQueryCategoriesPruning(java.lang.Boolean suggestQueryCategoriesPruning)
          Controls whether the optional taxonomy pruning post-processing algorithm is used during categorization
 void setTextProps(java.lang.String[] pTextProps)
          array of text fields (such as role:displayName) that controls how much of the meta-data of the response's document is returned
 void setTextPropsString(java.lang.String pTextProps)
          Sets comma-delimited list of text properties
 void setTextSort(java.lang.Boolean pTextSort)
          Sets whether the text statements for each response should be sorted in the order in which they appeared in the document.
 void setTraceExpression(TraceExpression pTraceExpression)
          Sets the trace expression
 void setVariables(RequestVariables pRequestVariables)
          Sets the request variables for rank rules.
 void setWeightedProperties(DocumentSetConstraint weightedProperties)
          Sets weighted property constraints
 void setWeightedProperties(java.lang.String pWeightedPropertiesXml)
          Creates a new weighted properties DocumentSetConstraint from the XML.
static QueryRequest valueOf(java.lang.String pRequestXml)
          Converts XML into a QueryRequest
static QueryRequest valueOf(java.lang.String pRequestXml, SearchRequest compRequest)
          Converts XML into a QueryRequest
 
Methods inherited from class atg.search.routing.command.search.SearchRequest
fillDynamicTargets, fillDynamicTargetSpecifier, fromXml, getAllAttributeXML, getAllBodyXML, getAssociatedRequestIdentifier, getContentLabels, getContentLabelsArray, getDebug, getDynamicTargetSpecifier, getExcludeLogicalPartitionNames, getLastResponse, getListableProperties, getListablePropertiesString, getLogicalPartitionNames, getLogicalPartitionsArray, getMaximumResults, getMergeSettings, getPreviousRequestChainToken, getRequestAttribute, getRequestAttributes, getRequestChainToken, getRequestIdentifier, getRequestTag, getRequestTime, getRespForm, getSearchEnvironmentName, getSearchTargetNames, getSiteConstraints, getSiteId, getSleepTimeMs, getTargetType, getTimeLimitMs, getUserAgent, getVersion, isCacheable, isDecodeOnly, isGeneratingXml, isKeepingXml, isListPropertyAllowed, isLocalMergeDebugEnabled, isLocalMergeDebugReady, isLocalMergeEnabled, isMultiPartitionSearch, isMultiSearchSession, isPagingRequest, isSaveRequest, merge, processResponse, setAssociatedRequestIdentifier, setCacheable, setContentLabels, setContentLabelsArray, setContentLabelsString, setDebug, setDynamicTargetSpecifier, setExcludeLogicalPartitionNames, setGeneratingXml, setKeepingXml, setLastResponse, setListableProperties, setListablePropertiesString, setListPropertyAllowed, setLocalMergeDebugEnabled, setLocalMergeDebugReady, setLocalMergeEnabled, setLogicalPartitionNames, setLogicalPartitionsArray, setMaximumResults, setMergeSettings, setMultiPartitionSearch, setMultiSearchSession, setPagingRequest, setPhysicalPartitionId, setPreviousRequestChainToken, setRequestAttribute, setRequestAttributes, setRequestChainToken, setRequestIdentifier, setRequestTime, setRespForm, setSaveRequest, setSearchEnvironmentName, setSiteConstraints, setSiteId, setSleepTimeMs, setTargetType, setTimeLimitMs, setUserAgent, setVersion
 
Methods inherited from class atg.search.routing.command.SearchEngineRequestImpl
encodeMapData, isFiringSearchEvents, isKeepingResponseData, isLoggingThisRequest, setFiringSearchEvents, setKeepingResponseData, setLoggingThisRequest
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface atg.search.routing.command.SearchEngineRequest
toXML
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

QueryRequest

public QueryRequest()
Method Detail

getQuestion

public java.lang.String getQuestion()
Returns the user's search input

Returns:
User's search input

setQuestion

public void setQuestion(java.lang.String question)
This specifies the question a query request. This property and setStartCategory(String)} are mutually exclusive: calling the former makes this a query request; calling the latter makes this a category navigation request.

Parameters:
question - User search input
See Also:
setStartCategory(String)

getStartCategory

public java.lang.String getStartCategory()
Returns the start category for category navigation

Returns:
start category for category navigation

setStartCategory

public void setStartCategory(java.lang.String pStartCategory)
This specifies the start category for category navigation. This property and setQuestion(String) are mutually exclusive: calling the former makes this a category navigation request; calling the latter makes this a query request.

Parameters:
pStartCategory - start category for category navigation
See Also:
setQuestion(String)

getDisablePositioning

public java.lang.Boolean getDisablePositioning()
Indicates whether positioning has been disabled.

Returns:
whether positioning has been disabled.

setDisablePositioning

public void setDisablePositioning(java.lang.Boolean pDisablePositioning)
Sets whether positioning should be disabled

Parameters:
pDisablePositioning - true to disable positioning

getDocSortPred

public java.lang.String getDocSortPred()
If docSort is predicate, returns the predicate expression to use for sorting.

Returns:
If docSort is predicate, the predicate expression to use for sorting

setDocSortPred

public void setDocSortPred(java.lang.String docSortPred)
Sets the predicate expression to use for sorting. Call when docSort is predicate.

Parameters:
docSortPred - predicate expression

getDocSortCase

public java.lang.Boolean getDocSortCase()
Indicates whether the doc sort is case sensitive

Returns:
whether the doc sort is case sensitive

setDocSortCase

public void setDocSortCase(java.lang.Boolean pDocSortCase)
Controls whether the doc sort is case sensitive

Parameters:
pDocSortCase - whether the doc sort is case sensitive

getTextSort

public java.lang.Boolean getTextSort()
Indicates whether the text statements for each response should be sorted in the order in which they appeared in the document. If false, the statements are in relevance order. See Result.getTextMatches().

Returns:
whether the text statements for each response should be sorted in the order in which they appeared in the document.

setTextSort

public void setTextSort(java.lang.Boolean pTextSort)
Sets whether the text statements for each response should be sorted in the order in which they appeared in the document. If false, the statements are in relevance order. See Result.getTextMatches().

Parameters:
pTextSort - whether the text statements for each response should be sorted in the order in which they appeared in the document.

getOptimize

public java.lang.Integer getOptimize()
Returns the optimize level

Returns:
optimize level

setOptimize

public void setOptimize(java.lang.Integer pOptimize)
-1 is old-style search, 0 is the default, 1 eliminates statement relevancy calculations, and 2 eliminates statement candidate retrieval altogether.

Parameters:
pOptimize - optimize level

getDocFlags

public java.lang.String[] getDocFlags()
Returns a non-null array of doc flags that determine how much doc information is included in the response.

Returns:
non-null array of doc flags that determine how much doc information is included in the response
See Also:
setDocFlagsString(String)

setDocFlags

public void setDocFlags(java.lang.String[] pDocFlags)
Controls how much document information is returned. The less information, the better the performance. Default is: url, docsets, properties (plus contextid for getOptimize() < 1).

Parameters:
pDocFlags - array of doc flags

setDocFlagsString

public void setDocFlagsString(java.lang.String pDocFlags)
Accepts a comma-delimited list of doc flags.

Parameters:
pDocFlags -
See Also:
setDocFlags(String[])

getDocFlagsString

public java.lang.String getDocFlagsString()
Returns a comma-delimited list of doc flags

Returns:
comma-delimited list of doc flags
See Also:
getDocFlags()

getTextProps

public java.lang.String[] getTextProps()
Returns non-null array of text fields that controls how much of the meta-data of the response's document is returned

Returns:
non-null array of text fields that controls how much of the meta-data of the response's document is returned

setTextProps

public void setTextProps(java.lang.String[] pTextProps)
array of text fields (such as role:displayName) that controls how much of the meta-data of the response's document is returned

Parameters:
pTextProps - array of text fields, such as role:displayName

setTextPropsString

public void setTextPropsString(java.lang.String pTextProps)
Sets comma-delimited list of text properties

Parameters:
pTextProps - comma-delimited list of text properties
See Also:
setTextProps(String[])

getTextPropsString

public java.lang.String getTextPropsString()
Returns a comma-delimited list of text properties

Returns:
comma-delimited list of text properties
See Also:
getTextProps()

getParserOptions

public ParserOptions getParserOptions()
Returns text processing options

Returns:
text processing options

setParserOptions

public void setParserOptions(ParserOptions parserOptions)
Sets text processing options

Parameters:
parserOptions - text processing options

getRankConfigXml

public java.lang.String getRankConfigXml()
Returns full rankConfig XML for this request

Returns:
full rankConfig XML for this request

setRankConfigXml

public void setRankConfigXml(java.lang.String pRankConfigXml)
Call this to provide full rankConfig XML for this request. This is an alternative to setRankConfig(String) which only specifies the rankConfig name to use and requires that it be in the index.

Parameters:
pRankConfigXml - well-formed rankConfig XML that starts with <rankConfig>.

getRefineConfigXml

public java.lang.String getRefineConfigXml()
Returns full refineConfig XML for this request

Returns:
full refineConfig XML for this request

setRefineConfigXml

public void setRefineConfigXml(java.lang.String pRefineConfigXml)
Call this to provide full refineConfig XML for this request. This is an alternative to setRefineConfig(String) which only specifies the refineConfig name to use and requires that it be in the index.

Parameters:
pRefineConfigXml - well-formed refineConfig XML that starts with <refineConfig>.

getSorting

public QueryRequest.Sorting getSorting()
Sets document grouping algorithm used to group the search result documents. Grouping options are: "document" or "property". The algorithm is controlled by the result list controls described elsewhere. For group-by-property, use the setSortProperty(String) to specify the property information.

Returns:
either "document", when grouping results by document, or "property" when grouping by a property of the document, or null.

setSorting

public void setSorting(QueryRequest.Sorting sorting)
Sets document grouping algorithm used to group the search result documents. Grouping options are: "document" or "property". The algorithm is controlled by the result list controls described elsewhere. For group-by-property, use the setSortProperty(String) to specify the property information.

Parameters:
sorting - may be either "document", to group results by document, or "property" to group results by a property of the document.

getSortProperty

public java.lang.String getSortProperty()
The sort property is actually used for grouping results. The format is "type:name:default". The value includes the type of property, the name of the property, and a default value to use for the property if the document does not contain a value for the property. Fields are separated by colons.

Returns:
Format is "type:name:default". The value includes the type of property, the name of the property, and a default value to use for the property, separated by colons.

setSortProperty

public void setSortProperty(java.lang.String sortProperty)
The sort property is actually used for grouping results. The format is "type:name:default". The value includes the type of property, the name of the property, and a default value to use for the property if the document does not contain a value for the property. Fields are separated by colons.

Parameters:
sortProperty - Format is "type:name:default". The value includes the type of property, the name of the property, and a default value to use for the property, all separated by colons.

getDocumentSetConstraints

public DocumentSetConstraint getDocumentSetConstraints()
Returns the document set constraints.

Returns:
document set constraints

setDocumentSetConstraints

public void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
Sets document set constraints

Parameters:
documentSetConstraints - document set constraints

getRefineConstraints

public DocumentSetConstraint getRefineConstraints()
Returns document set constraints for refinements

Returns:
document set constraints for refinements

setRefineConstraints

public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
Sets document set constraints for refinements

Parameters:
pRefineConstraints - document set constraints for refinements

getTraceExpression

public TraceExpression getTraceExpression()
Returns the trace expression

Returns:
the trace expression

setTraceExpression

public void setTraceExpression(TraceExpression pTraceExpression)
Sets the trace expression

Parameters:
pTraceExpression - the trace expression

getDebugExclusion

public java.lang.Boolean getDebugExclusion()
Indicates whether debugging of exclusions is enabled

Returns:
whether debugging of exclusions is enabled

setDebugExclusion

public void setDebugExclusion(java.lang.Boolean pDebugExclusion)
Sets whether debugging of exclusions is enabled

Parameters:
pDebugExclusion - enables or disables debugging of exclusions

setRankPreferVar

public void setRankPreferVar(java.lang.Boolean pRankPreferVar)
Sets whether variables that map to weights in a property prioritization should be preferred over an explicit property value.

Parameters:
pRankPreferVar - enables or disables preference for variables

getRefineConfigDefault

public java.lang.String getRefineConfigDefault()
Returns the refine config default to use when $map fails

Returns:
refine config default to use when $map fails

setRefineConfigDefault

public void setRefineConfigDefault(java.lang.String pRefineConfigDefault)
Sets the refine config default to use when $map fails

Parameters:
pRefineConfigDefault - refine config default to use when $map fails

getVariables

public RequestVariables getVariables()
Returns the request variables for rank rules.

Returns:
the request variables for rank rules.

setVariables

public void setVariables(RequestVariables pRequestVariables)
Sets the request variables for rank rules.

Parameters:
pRequestVariables - the request variables for rank rules.

getRefineDebug

public java.lang.Boolean getRefineDebug()
Indicates whether refinement debugging is enabled

Returns:
whether refinement debugging is enabled

setRefineDebug

public void setRefineDebug(java.lang.Boolean pRefineDebug)
Sets whether refinement debugging is enabled

Parameters:
pRefineDebug - enables or disables refinement debugging

getRankPreferVar

public java.lang.Boolean getRankPreferVar()
Indicates whether variables that map to weights in a property prioritization should be preferred over an explicit property value.

Returns:
whether variables are preferred

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder buf)
                        throws atg.search.routing.command.IncompleteCommandException
Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getBodyXML

protected void getBodyXML(java.lang.StringBuilder buf)
                   throws atg.search.routing.command.IncompleteCommandException
Override to provide the body of the xml. Do not include the main element tag.

Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

isCatNavRequest

public boolean isCatNavRequest()
Indicates true if startCategory was specified, false otherwise

Returns:
true if startCategory was specified, false otherwise

valueOf

public static QueryRequest valueOf(java.lang.String pRequestXml)
Converts XML into a QueryRequest

Parameters:
pRequestXml - query request XML
Returns:
a QueryRequest populated from the XML, or null if the XML is null;

valueOf

public static QueryRequest valueOf(java.lang.String pRequestXml,
                                   SearchRequest compRequest)
Converts XML into a QueryRequest

Parameters:
pRequestXml - query request XML
compRequest - an existing request object to combine with the provide xml, typically initalized as a nucleus component
Returns:
a QueryRequest populated from the XML, or null if the XML is null;

fromXml

protected static QueryRequest fromXml(atg.search.routing.utils.SearchMessageParser pParser,
                                      SearchRequest compRequest)

getStrategy

public QueryRequest.Strategy getStrategy()
Returns how restrictive the search should be

Returns:
how restrictive the search should be

setStrategy

public void setStrategy(QueryRequest.Strategy strategy)
ATG Search has a large number of search parameters that control the generic search algorithm. To simplify the adjustment of these settings, ATG Search provides 5 discrete search strategies that are implemented in terms of a set of parameter values. The search strategy is selected by this attribute.

Parameters:
strategy - One of the following five values, which represent how restrictive the search should be:
  • everything -- try unlimited search, without any parameter values that can restrict the search algorithm; also try all term expansions during document candidate retrieval.
  • expand -- try an expanded search, increasing the default parameter values that can restrict the search algorithm.
  • normal -- default system settings, optimized for fast search with good search quality; this is the default value of the attribute.
  • restrict -- try a restricted search, decreasing the default parameter values which will further restrict the search algorithm; disable non-equal term expansions; adjust relevancy calculation to prefer literal matches.
  • exact -- try an exact search, which is the same as restrict plus a heavy increase in the /exactWgt setting, which will force results to contain the literal query string.

  • getMinScore

    public java.lang.Integer getMinScore()
    Returns the minimum score; the value will range from 0 to 1000, and defaults to 0. Results that do not meet the minimum threshold are discarded.

    Returns:
    value will range from 0 to 1000, and defaults to 0. Results that do not meet the minimum threshold are discarded.

    setMinScore

    public void setMinScore(java.lang.Integer minScore)
    The ATG Search results are ranked by relevancy. During the collection of the final results, before grouping and secondary sorting, ATG Search applies a minimum threshold on the relevancy score, using this attribute.

    Parameters:
    minScore - The value must range from 0 to 1000, and defaults to 0. Results that do not meet the minimum threshold are discarded.

    setPageOffsetInfo

    public void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pPageOffsetInfo)
    Description copied from interface: PagedRequest
    Sets the page offset information, which is used internally to manage fast paging for multiple partitions. Not normally used.

    Specified by:
    setPageOffsetInfo in interface PagedRequest
    Parameters:
    pPageOffsetInfo - page offset info

    getPageOffsetInfo

    public atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
    Description copied from interface: PagedRequest
    Returns internal page offset information when fast paging is used with a multi-partition index.

    Specified by:
    getPageOffsetInfo in interface PagedRequest
    Returns:
    internal page offset information when fast paging is used with a multi-partition index.

    getHighlight

    public java.lang.Boolean getHighlight()
    Indicates whether query highlighting is enabled

    Returns:
    whether query highlighting is enabled

    setHighlight

    public void setHighlight(java.lang.Boolean highlight)
    Controls whether query highlighting is enabled

    Parameters:
    highlight - if true query highlighting is enabled

    getAutoSpell

    public java.lang.Boolean getAutoSpell()
    Indicates whether autospelling is enabled

    Returns:
    whether autospelling is enabled

    setAutoSpell

    public void setAutoSpell(java.lang.Boolean autoSpell)
    ATG Search performs spelling correction and can return suggestions as part of the response. In addition, ATG Search can automatically correct the mistakes before issuing the query, using this attribute.

    Parameters:
    autoSpell - true or false, and defaults to true in the engine. The spelling suggestion feedback is always returned.

    getAutoFacet

    public java.lang.Boolean getAutoFacet()
    Indicates whether automatic pre-processing of facet expressions be performed

    Returns:
    whether automatic pre-processing of facet expressions be performed

    setAutoFacet

    public void setAutoFacet(java.lang.Boolean autoFacet)
    Controls whether automatic pre-processing of facet expressions be performed

    Parameters:
    autoFacet - Should automatic pre-processing of facet expressions be performed?

    getRankConfig

    public java.lang.String getRankConfig()
    Returns the ranking configuration

    Returns:
    ranking configuration

    setRankConfig

    public void setRankConfig(java.lang.String rankConfig)
    Sets the ranking configuration

    Parameters:
    rankConfig - rank configuration to use

    getRefineConfig

    public java.lang.String getRefineConfig()
    Returns the refinement configuration

    Returns:
    refinement configuration

    setRefineConfig

    public void setRefineConfig(java.lang.String refineConfig)
    ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search. This refinement is calculated using configuration data as described in Admin Guide. At query time, ATG Search can control which configuration to use and global parameters for the calculation, using this attribute, plus setRefineMax(java.lang.Integer), setRefineTop(java.lang.Integer), and setRefineMin(java.lang.Integer).

    Parameters:
    refineConfig - valid name of a refinement configuration loaded into the index. If no value is given, no refinement calculation is made.

    getRefineConfigMapProperty

    public java.lang.String getRefineConfigMapProperty()
    If refineConfig equals "$map", returns the name of property to use for automatically selecting the configuration.

    Returns:
    If refineConfig equals "$map", the name of property to use for automatically selecting the configuration. If all search results have the same property value, and if this value is mapped to a refinement configuration.
    See Also:
    setRefineConfig(String)

    setRefineConfigMapProperty

    public void setRefineConfigMapProperty(java.lang.String refineConfigMapProperty)
    If refineConfig equals "$map", call this to set the name of property to use for automatically selecting the configuration. If all search results have the same property value, and if this value is mapped to a refinement configuration.

    Parameters:
    refineConfigMapProperty - If refineConfig equals "$map", the name of property to use for automatically selecting the configuration. If all search results have the same property value, and if this value is mapped to a refinement configuration.
    See Also:
    setRefineConfig(String)

    getRefineConfigMapKey

    public java.lang.String getRefineConfigMapKey()
    Returns the refine config map key

    Returns:
    refine config map key

    setRefineConfigMapKey

    public void setRefineConfigMapKey(java.lang.String pRefineConfigMapKey)
    Sets the refine config map key, for use with $map

    Parameters:
    pRefineConfigMapKey - refine config map key, for use with $map

    getRefineCount

    public RefineCountType getRefineCount()
    Returns the refinement value counting mode

    Returns:
    the refinement value counting mode

    setRefineCount

    public void setRefineCount(RefineCountType pRefineCount)
    Sets the refinement value counting mode

    Parameters:
    pRefineCount - the refinement value counting mode

    getRefineMax

    public java.lang.Integer getRefineMax()
    Returns the maximum number of refinement properties to return, even if the refinement configuration could generate more.

    Returns:
    the maximum number of refinement properties to return, even if the refinement configuration could generate more.

    setRefineMax

    public void setRefineMax(java.lang.Integer refineMax)
    ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search. This refinement is calculated using configuration data as described in Admin Guide. At query time, ATG Search can control the maximum number of refinement properties to return using this attribute.

    Parameters:
    refineMax - the maximum number of refinement properties to return, even if the refinement configuration could generate more. The default value for max is 0, which means no refinement calculation will be made.

    getRefineTop

    public java.lang.Integer getRefineTop()
    Returns the number of index items that has each value

    Returns:
    the number of index items that has each value

    setRefineTop

    public void setRefineTop(java.lang.Integer refineTop)
    ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search. This refinement is calculated using configuration data as described in Admin Guide. At query time, ATG Search can control how many refinement property values (per property) with this attribute.

    Parameters:
    refineTop - the number of index items that has each value. The default value is 5.

    getRefineMin

    public java.lang.Integer getRefineMin()
    Returns the minimum size of a refinement property value, in terms of the number of index items with that value.

    Returns:
    the minimum size of a refinement property value, in terms of the number of index items with that value. The default value for min is 0.

    setRefineMin

    public void setRefineMin(java.lang.Integer refineMin)
    ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search. This refinement is calculated using configuration data as described in Admin Guide. At query time, ATG Search can eliminate refinement property values by their size with this attribute.

    Parameters:
    refineMin - the minimum size of a refinement property value, in terms of the number of index items with that value. The default value for min is 0.

    getRefineMinVal

    public java.lang.Integer getRefineMinVal()
    Returns the minimum number of refinement property values

    Returns:
    the minimum number of refinement property values.

    setRefineMinVal

    public void setRefineMinVal(java.lang.Integer refineMinVal)
    ATG Search can calculate refinements based on the query results, in order to offer the end-user a quick way of narrowing the search. This refinement is calculated using configuration data as described in Admin Guide. At query time, ATG Search can eliminate refinements with too few values.

    Parameters:
    refineMinVal - the minimum number of refinement property values

    getDocSetSort

    public QueryRequest.DocSetSort getDocSetSort()
    Returns the doc set sort mode.

    Returns:
    the doc set sort mode

    setDocSetSort

    public void setDocSetSort(QueryRequest.DocSetSort docSetSort)
    ATG Search can return categorization feedback about the returned results in the form of a tree. This functionality is controlled by this attribute.

    Parameters:
    docSetSort - can be none, which means no categorization feedback tree is constructed. The mode value can be fulltree, which means that a full categorization tree is returned, with all intervening levels, even if they have no direct connection to the results. The mode value can be sparsetree, which means that that a categorization tree is returned, but intervening levels that have no direct connection to the results are omitted. There are several other experimental values for this attribute, but they are not in use. The default value is none.

    getMode

    public QueryRequest.Mode getMode()
    Returns the query mode.

    Returns:
    the query mode

    setMode

    public void setMode(QueryRequest.Mode mode)
    ATG Search handles natural language and Boolean queries. Simple Boolean syntax is handled automatically as part of the natural language processing, but complex Boolean expressions require a special mode of processing. Furthermore, ATG Search can support simple keyword search behavior in several additional modes.

    Parameters:
    mode - nlp, for natural language and simple Boolean queries. This is the default value. The value can also be boolean, for parsing of complex Boolean expressions. The value can also be keyword, which handles natural language queries in a simplistic keyword search model. Essentially, ATG Search parses the query as normal, but each query term is double-quoted and required to appear in the index items of the results. The value can also be and, which handles natural language queries in an expanded keyword search model. Essentially, ATG Search parses the query as normal, but each query term is required to appear in the index items of the results. This is similar to the keyword mode, but without the double-quotes, which means the query terms could match morphological variants and use term expansions. The value can also be matchall, which handles natural language queries as a Boolean AND of terms, as opposed to ATG Search's default Boolean OR. Essentially, AS parses the query as normal, but each query term is required to appear in the result statements.

    getAndFeedback

    public java.lang.Integer getAndFeedback()
    Returns the andFeedback threshold for generating the feedback on mode=and searches, based on the number of results. So when N=0, no feedback is attempted. When N=1, only failed (0 result) searches generate the feedback. When N>1, only when the search generates less than that number of results is the feedback generated.

    Returns:
    the andFeedback value

    setAndFeedback

    public void setAndFeedback(java.lang.Integer pAndFeedback)
    Sets the andFeedback threshold for generating the feedback on mode=and searches, based on the number of results. So when N=0, no feedback is attempted. When N=1, only failed (0 result) searches generate the feedback. When N>1, only when the search generates less than that number of results is the feedback generated.

    Parameters:
    pAndFeedback - the andFeedback value

    getDocProps

    public java.lang.String[] getDocProps()
    Returns the list of docprops.

    Returns:
    docProps
    See Also:
    setDocProps(String[])

    setDocProps

    public void setDocProps(java.lang.String[] docProps)
    ATG Search returns the meta-data properties associated with the index item of each statement result. These returned properties can be used for user interface functionality, such as customized result pages. By default, ATG Search returns no properties.

    Parameters:
    docProps - Can be "all", which indicates that all properties are returned. By default no properties are returned. In general, it is a list of the property names that can be returned.

    setDocPropsString

    public void setDocPropsString(java.lang.String docProps)
    accepts a comma-delimited list of docProps

    Parameters:
    docProps -
    See Also:
    setDocProps(String[])

    getDocPropsString

    public java.lang.String getDocPropsString()
    Returns the comma-delimited list of docprops.

    Returns:
    comma-delimited list of docprops.
    See Also:
    getDocProps()

    getMaxRelatedSets

    public java.lang.Integer getMaxRelatedSets()
    Returns the maximum number of related sets to return per document

    Returns:
    the maximum number of related sets to return per document

    setMaxRelatedSets

    public void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
    ATG Search returns the retrieved documents along with the statement results. The retrieved documents contain associated information, including the document sets (or categories) of the document. How many of these related sets and what kind of sets to return are controlled by this method and setRelatedSets(java.lang.String[]).

    Parameters:
    maxRelatedSets - the maximum number of related sets to return per document. The default is 0.

    getRelatedSets

    public java.lang.String[] getRelatedSets()
    Returns a list of document sets, which form a constraint on the returned related sets to return.

    Returns:
    a list of document sets, which form a constraint on the returned related sets to return.

    setRelatedSets

    public void setRelatedSets(java.lang.String[] relatedSets)
    ATG Search returns the retrieved documents along with the statement results. The retrieved documents contain associated information, including the document sets (or categories) of the document. How many of these related sets and what kind of sets to return are controlled by the maxRelatedSets and relatedSets.

    Parameters:
    relatedSets - a list of document sets, which form a constraint on the returned related sets to return. Only related sets that are descendents of a member of this list are returned. The default is no value, which means there are no constraints on the related sets.

    setRelatedSetsString

    public void setRelatedSetsString(java.lang.String pRelSets)
    accepts a comma-delimited list of related sets

    Parameters:
    pRelSets -
    See Also:
    setRelatedSets(String[])

    getRelatedSetsString

    public java.lang.String getRelatedSetsString()
    Returns a comma-delimited list of related sets.

    Returns:
    comma-delimited list of related sets.
    See Also:
    getRelatedSets()

    getFastPaging

    public java.lang.Boolean getFastPaging()
    Description copied from interface: PagedRequest
    Returns an indication of whether fast paging is enabled for this request. Fast paging is only relevant for multi-partition requests. Fast paging never returns more than is required for a given page. The trade-off is that for large multi-partition indexes you lose jump-to-page functionality. It is disabled by default

    Specified by:
    getFastPaging in interface PagedRequest
    Returns:
    true if fast paging is enabled for this request, false by default

    setFastPaging

    public void setFastPaging(java.lang.Boolean pFastPaging)
    Description copied from interface: PagedRequest
    Sets whether fast paging is enabled for this request. Fast paging is only relevant for multi-partition requests. Fast paging never returns more than is required for a given page. The trade-off is that for large multi-partition indexes you lose jump-to-page functionality. It is disabled by default

    Specified by:
    setFastPaging in interface PagedRequest
    Parameters:
    pFastPaging - true to enable fast paging

    getPageSize

    public java.lang.Integer getPageSize()
    Description copied from interface: PagedRequest
    Returns the number of results that should be returned per page

    Specified by:
    getPageSize in interface PagedRequest
    Returns:
    number of results that should be returned per page

    setPageSize

    public void setPageSize(java.lang.Integer pageSize)
    Description copied from interface: PagedRequest
    Sets the number of results that should be returned per page. For efficiency, most search sites return results a page at a time, forcing the end-user to request additional results if necessary.

    Specified by:
    setPageSize in interface PagedRequest
    Parameters:
    pageSize - number of results that should be returned per page

    getPageNum

    public java.lang.Integer getPageNum()
    Description copied from interface: PagedRequest
    Returns the 0-based page number that should be retrieved.

    Specified by:
    getPageNum in interface PagedRequest
    Returns:
    the 0-based page number that should be retrieved, starting from the first page 0 and so on.

    setPageNum

    public void setPageNum(java.lang.Integer pageNum)
    Description copied from interface: PagedRequest
    Sets the 0-based page number that should be retrieved.

    Specified by:
    setPageNum in interface PagedRequest
    Parameters:
    pageNum - specifies which 0-based page number to return, starting from the first page 0 and so on.

    getAutomaticConstrainCategories

    public java.lang.Integer getAutomaticConstrainCategories()
    Returns the maximum number of categories to add as constraints.

    Returns:
    the maximum number of categories to add as constraints.

    setAutomaticConstrainCategories

    public void setAutomaticConstrainCategories(java.lang.Integer automaticConstrainCategories)
    ATG Search includes a categorization module that applies rules to decide what categories of a taxonomy are relevant to the content, or in this case user queries. One use of this functionality is to automatically add the most relevant categories as constraints on the query itself, thus narrowing the search to the more appropriate content. These automatic constraints are controlled by the following attribute. 2param The maximum number of categories to add as constraints. Multiple categories are added as a Boolean OR of document set constraints, joined (i.e. AND-ed) to the pre-existing constraints. If setAutomaticConstrainCategoriesPruning(Boolean) is called, then the optional taxonomy pruning post-processing algorithm is used during categorization.


    getAutomaticConstrainCategoriesPruning

    public java.lang.Boolean getAutomaticConstrainCategoriesPruning()
    Indicates whether pruning is enabled

    Returns:
    whether pruning is enabled

    setAutomaticConstrainCategoriesPruning

    public void setAutomaticConstrainCategoriesPruning(java.lang.Boolean automaticConstrainCategoriesPruning)
    Controls whether pruning is enabled

    Parameters:
    automaticConstrainCategoriesPruning - if true, then the optional taxonomy pruning post-processing algorithm is used during categorization.

    getAdvanced

    public java.lang.Boolean getAdvanced()
    Indicates whether advanced query features, such as queryTerms, are enabled

    Returns:
    enables/disabled advanced query features, such as queryTerms

    setAdvanced

    public void setAdvanced(java.lang.Boolean advanced)
    Controls whether advanced query features, such as queryTerms, are enabled

    Parameters:
    advanced - enables/disabled advanced query features, such as queryTerms

    getDocSort

    public atg.search.routing.command.search.DocSortCommon getDocSort()
    Returns sorting for the result groups

    Returns:
    how the result groups will be sorted

    setDocSort

    public void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
    ATG Search returns a list of result groups in its query response. These final results are pulled from the pool of raw results. Normally, the result groups are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not effect what results are in the final result groups, just the order of the returned groups. Secondary sorting is performed before paging. Secondary sorting is controlled by docSort, docSortOrder, docSortProp, and docSortPropDefault.

    Parameters:
    docSort - specifies how the result groups will be sorted, and can be one of the following:
  • relevance -- the default value, return groups in relevance order
  • alpha -- sort groups by filename of index item, i.e. the last part of the full URL (e.g. index.htm)
  • address -- sort groups by web site address of the index item, i.e. the beginning of the full URL (e.g. http://www.atg.com)
  • url -- sort groups by full URL of the index item
  • date -- sort groups by last modified date of the index item
  • strprop -- sort groups by a meta-data string property, requires docSortProp attribute
  • numprop -- sort groups by a meta-data number property, requires docSortProp attribute
  • title -- sort groups by title of the index item
  • type -- sort groups by the type of the index item, e.g. HTML, PDF
  • docset -- sort groups by physical document set
  • predicate -- sort groups by predicate

  • getDocSortOrder

    public QueryRequest.DocSortOrder getDocSortOrder()
    Indicates whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode.

    Returns:
    whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode.

    setDocSortOrder

    public void setDocSortOrder(QueryRequest.DocSortOrder docSortOrder)
    ATG Search returns a list of result groups in its query response. These final results are pulled from the pool of raw results. Normally, the result groups are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not effect what results are in the final result groups, just the order of the returned groups. Secondary sorting is performed before paging. Secondary sorting is controlled by setDocSort(atg.search.routing.command.search.DocSortCommon), setDocSortOrder(atg.search.routing.command.search.QueryRequest.DocSortOrder), setDocSortProp(java.lang.String), setDocSortPropDefault(java.lang.String).

    Parameters:
    docSortOrder - determines whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode. The value should be either ascending or descending.

    getDocSortProp

    public java.lang.String getDocSortProp()
    Returns the property name to use for the strprop or numprop modes

    Returns:
    the property name to use for the strprop or numprop modes

    setDocSortProp

    public void setDocSortProp(java.lang.String docSortProp)
    ATG Search returns a list of result groups in its query response. These final results are pulled from the pool of raw results. Normally, the result groups are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not effect what results are in the final result groups, just the order of the returned groups. Secondary sorting is performed before paging. Secondary sorting is controlled by: setDocSort(atg.search.routing.command.search.DocSortCommon), setDocSortOrder(atg.search.routing.command.search.QueryRequest.DocSortOrder), setDocSortProp(java.lang.String), setDocSortPropDefault(java.lang.String).

    Parameters:
    docSortProp - specifies the property name to use for the strprop or numprop modes. The property name must be a valid property of the given type; i.e. for strprop, either string or enum, and for numprop, either integer, float, boolean or date. Index items that don't have this property will be excluded from the sort. To prevent that, setDocSortPropDefault(java.lang.String) can specify the default property value to use for these exceptional cases. The default value should agree with the type of the property.

    getDocSortPropVal

    public DocSortPropVal getDocSortPropVal()
    When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.

    Returns:
    doc sort prop value

    setDocSortPropVal

    public void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
    When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.

    Parameters:
    pDocSortPropVal -

    getDocSortPropDefault

    public java.lang.String getDocSortPropDefault()
    ATG Search returns a list of result groups in its query response. These final results are pulled from the pool of raw results. Normally, the result groups are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not effect what results are in the final result groups, just the order of the returned groups. Secondary sorting is performed before paging. Secondary sorting is controlled by: setDocSort(atg.search.routing.command.search.DocSortCommon), setDocSortOrder(atg.search.routing.command.search.QueryRequest.DocSortOrder), setDocSortProp(java.lang.String), setDocSortPropDefault(java.lang.String).

    Returns:
    the property name to use for the strprop or numprop modes.

    setDocSortPropDefault

    public void setDocSortPropDefault(java.lang.String docSortPropDefault)
    ATG Search returns a list of result groups in its query response. These final results are pulled from the pool of raw results. Normally, the result groups are sorted in relevance order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. This secondary sort does not effect what results are in the final result groups, just the order of the returned groups. Secondary sorting is performed before paging. Secondary sorting is controlled by: setDocSort(atg.search.routing.command.search.DocSortCommon), setDocSortOrder(atg.search.routing.command.search.QueryRequest.DocSortOrder), setDocSortProp(java.lang.String), setDocSortPropDefault(java.lang.String).

    Parameters:
    docSortPropDefault - the property value to use for the strprop or numprop modes. The property value must be of the same type as the property from docSortProp; i.e. for strprop, either string or enum, and for numprop, either integer, float, boolean or date. Index items that don't have this property will be excluded from the sort. To prevent that, setDocSortPropDefault(java.lang.String) can specify the default property value to use for these exceptional cases. The default value should agree with the type of the property.

    getSuggestQueryCategories

    public java.lang.Integer getSuggestQueryCategories()
    Returns the maximum number of categories to return in the feedback.

    Returns:
    the maximum number of categories to return in the feedback.

    setSuggestQueryCategories

    public void setSuggestQueryCategories(java.lang.Integer suggestQueryCategories)
    ATG Search includes a categorization module that applies rules to decide what categories of a taxonomy are relevant to the content, or in this case user queries. One use of this functionality is to provide feedback to the end-user about the most relevant categories to the current query, allowing the end-user to manually refine (or narrow) the search. This categorization feedback is controlled by the following attribute.

    Parameters:
    suggestQueryCategories - the maximum number of categories to return in the feedback. Call setSuggestQueryCategoriesPruning(java.lang.Boolean) then the optional taxonomy pruning post-processing algorithm is used during categorization.

    getSuggestQueryCategoriesPruning

    public java.lang.Boolean getSuggestQueryCategoriesPruning()
    Returns true if pruning has been enabled

    Returns:
    true if pruning has been enabled
    See Also:
    setSuggestQueryCategoriesPruning(Boolean)

    setSuggestQueryCategoriesPruning

    public void setSuggestQueryCategoriesPruning(java.lang.Boolean suggestQueryCategoriesPruning)
    Controls whether the optional taxonomy pruning post-processing algorithm is used during categorization

    Parameters:
    suggestQueryCategoriesPruning - if true, then the optional taxonomy pruning post-processing algorithm is used during categorization.

    getReturnFeedback

    public java.lang.Boolean getReturnFeedback()
    ATG Search returns feedback about related terms and phrases for the query. This functionality is enabled by the following attribute.

    Returns:
    true or false

    setReturnFeedback

    public void setReturnFeedback(java.lang.Boolean returnFeedback)
    ATG Search returns feedback about related terms and phrases for the query. This functionality is enabled by the following attribute.

    Parameters:
    returnFeedback - true or false

    getRuleMode

    public QueryRequest.RuleMode getRuleMode()
    Returns the rule mode

    Returns:
  • ignore -- no query analysis will be performed
  • display -- perform the query analysis, but simply return feedback about the results in the response
  • exec -- perform the query analysis and execute the actions, returning feedback about what was executed

  • setRuleMode

    public void setRuleMode(QueryRequest.RuleMode ruleMode)
    ATG Search includes a query module that analyzes user queries and executes special actions which can modify the search behavior. The default value for this attribute is display, although only an index that contains query rules will return results.

    Parameters:
    ruleMode -
  • ignore -- no query analysis will be performed
  • display -- perform the query analysis, but simply return feedback about the results in the response
  • exec -- perform the query analysis and execute the actions, returning feedback about what was executed

  • getRequestMode

    public QueryRequest.RequestMode getRequestMode()
    Returns the request mode

    Returns:
    request mode

    setRequestMode

    public void setRequestMode(QueryRequest.RequestMode requestMode)
    Normally, ATG Search treats each user query as a separate isolated request, with no pre-existing state or context. However, most search interactions by users are interrelated, and a search system might provide better results if it provided this context. ATG Search captures several types of search context in its query request, and its use is controlled by this attribute. It should be clear that there are three types of modes, each with a pair of values representing statement versus index item logic. The subtract modes represent the search scenario known as not like this, where the end-user does a search that returns relevant and poor results, and then the user directs the system to find results not like the poor results. The penalize modes represent the search scenario known as less like this, where the end-user does a search that returns relevant and poor results, and then the user directs the system to find results less like the poor results, but not necessarily eliminating them. The within modes represent the search scenario known as search within, where the end-user does a search that returns generally relevant results, and then the user directs the system to find results of a new query within those initial results.

    Parameters:
    requestMode - The value specifies how the context string in the priorInput element is interpreted, and can be one of the following values:
  • normal -- the default value, no search context processing is done.
  • subtractDoc -- using the context as a preliminary query, eliminate from the current search results any that are from index items also returned by the context query.
  • subtractAns -- using the context as a preliminary query, eliminate from the current search results any that are statements also returned by the context query.
  • penalizeDoc -- using the context as a preliminary query, penalize any current search results that are from index items
  • also returned by the context query. If the penalty exceeds the relevancy, the result is eliminated.
  • penalizeAns -- using the context as a preliminary query, penalize any current search results that are statements also returned by the context query. If the penalty exceeds the relevancy, the result is eliminated.
  • withinDoc -- using the context as a preliminary query, restrict the current search results to index items also returned by the context query.
  • withinAns -- using the context as a preliminary query, restrict the current search results to statements also returned by the context query

  • getRelQuestSettingsString

    public java.lang.String getRelQuestSettingsString()
    Returns the rel quest settings in a big string of the form /param=val;/param=Val;...

    Returns:
    The search parameters in a big string of the form /param=val;/param=Val;...

    setRelQuestSettingsString

    public void setRelQuestSettingsString(java.lang.String relQuestSettings)
    Sets the rel quest settings in a big string of the form /param=val;/param=Val;...

    Parameters:
    relQuestSettings - the search parameters in a big string of the form /param=val;/param=Val;...

    getResponseNumberSettingsString

    public java.lang.String getResponseNumberSettingsString()
    Returns the result list controls in a big string of the form paramVal,paramVal,...

    Returns:
    the result list controls in a big string of the form paramVal,paramVal,...

    setResponseNumberSettingsString

    public void setResponseNumberSettingsString(java.lang.String responseNumberSettings)
    Sets the result list controls in a big string of the form paramVal,paramVal,...

    Parameters:
    responseNumberSettings - the result list controls in a big string of the form paramVal,paramVal,...

    getRelQuestSettings

    public atg.nucleus.ResolvingMap getRelQuestSettings()
    Returns the relQuest settings as a resolving map

    Returns:
    the relQuest settings

    setRelQuestSettings

    public void setRelQuestSettings(atg.nucleus.ResolvingMap pRelQuestSettingsMap)
    Sets the relQuest settings using a resolving map

    Parameters:
    pRelQuestSettingsMap -

    getResponseNumberSettings

    public java.util.Map getResponseNumberSettings()
    Returns the response number settings map

    Returns:
    the response number settings map

    setResponseNumberSettings

    public void setResponseNumberSettings(java.util.Map pResponseNumberSettingsMap)
    Sets the response number settings map

    Parameters:
    pResponseNumberSettingsMap -

    getPriorInput

    public java.lang.String[] getPriorInput()
    Returns a List of Strings of prior input

    Returns:
    List of Strings of prior input

    setPriorInput

    public void setPriorInput(java.lang.String[] priorInput)
    Sets List of Strings of prior input

    Parameters:
    priorInput - List of Strings of prior input

    getPriorInputString

    public java.lang.String getPriorInputString()
    Returns the prior input list as a |-delimited String

    Returns:
    |-delimited String of prior input

    setPriorInputString

    public void setPriorInputString(java.lang.String priorInput)
    Sets the list of prior input using a |-delimited String

    Parameters:
    priorInput - |-delimited String of prior input

    getPrefAnswerConstraints

    public DocumentSetConstraint getPrefAnswerConstraints()
    Returns preferred answer document set constraints

    Returns:
    preferred answer document set constraints

    setPrefAnswerConstraints

    public void setPrefAnswerConstraints(DocumentSetConstraint prefAnswerConstraints)
    Sets preferred answer document set constraints

    Parameters:
    prefAnswerConstraints - preferred answer document set constraints

    setPrefAnswerConstraints

    public void setPrefAnswerConstraints(java.lang.String pPrefAnswerConstraintsXml)
    Creates a new preferred answer DocumentSetConstraint from the XML. This is a shortcut for use when the caller already has XML.

    Parameters:
    pPrefAnswerConstraintsXml - well-formed constraint XML that starts with: <prefAnswerConstr>

    getWeightedProperties

    public DocumentSetConstraint getWeightedProperties()
    Returns weighted property constraints

    Returns:
    weighted property constraints

    setWeightedProperties

    public void setWeightedProperties(DocumentSetConstraint weightedProperties)
    Sets weighted property constraints

    Parameters:
    weightedProperties - weighted property constraints

    setWeightedProperties

    public void setWeightedProperties(java.lang.String pWeightedPropertiesXml)
    Creates a new weighted properties DocumentSetConstraint from the XML. This is a shortcut for use when the caller already has XML.

    Parameters:
    pWeightedPropertiesXml - well-formed constraint XML that starts with: <weightedProps>

    getReportDataControl

    public ReportDataControl getReportDataControl()
    Returns the control for individual reports in the results

    Returns:
    control for individual reports in the results

    setReportDataControl

    public void setReportDataControl(ReportDataControl reportDataControl)
    Sets the control for individual reports in the results

    Parameters:
    reportDataControl - control for individual reports in the results

    getRanking

    public Ranking getRanking()
    Returns the custom ranking algorithm

    Returns:
    custom ranking algorithm

    setRanking

    public void setRanking(Ranking ranking)
    Sets the custom ranking algorithm

    Parameters:
    ranking - custom ranking algorithm

    getLogicTree

    public LogicTree getLogicTree()
    Returns the custom query logic tree

    Returns:
    custom query logic tree

    setLogicTree

    public void setLogicTree(LogicTree logicTree)
    Sets the custom query logic tree

    Parameters:
    logicTree - custom query logic tree

    setFacetSearchRequest

    public void setFacetSearchRequest(boolean pFacetSearchRequest)
    Not part of the request

    Parameters:
    pFacetSearchRequest - when true, flags this as a faceted search request

    isFacetSearchRequest

    public boolean isFacetSearchRequest()
    Not part of the request

    Returns:
    true if this is a facet search request

    getFacetTrail

    public java.lang.String getFacetTrail()
    Gets the facet trail string

    Returns:
    the facet trail

    setFacetTrail

    public void setFacetTrail(java.lang.String pFacetTrail)
    Sets the facet trail string. It is not used for the engine request, but this makes it available to interested parties afterwards.

    Parameters:
    pFacetTrail - facet trail string

    getRequestId

    public int getRequestId()
    Description copied from class: SearchRequest
    This identifies the type of request, one of SearchRequest.QUERY, SearchRequest.BROWSE, etc.

    Specified by:
    getRequestId in class SearchRequest
    Returns:
    one of the request constants defined by this class

    processSearchResponse

    public SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
                                         throws atg.search.routing.command.RoutingCommandException
    Description copied from class: SearchRequest
    Override to provide search response processing (parsing, generally). Returns null by default.

    Overrides:
    processSearchResponse in class SearchRequest
    Parameters:
    response - the engine response
    Returns:
    null by default
    Throws:
    atg.search.routing.command.RoutingCommandException
    See Also:
    SearchRequest.processResponse(atg.search.routing.command.SearchEngineResponse)

    doMerge

    public SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
                           throws atg.search.routing.MergeException
    Description copied from class: SearchRequest
    Default implementation returns the first element of the array and tosses the rest. Subclasses must provide their own implementations.

    Overrides:
    doMerge in class SearchRequest
    Parameters:
    pParsedResponses - parsed responses
    Returns:
    the first, or the merged response if the subclass overrides this
    Throws:
    atg.search.routing.MergeException