atg.search.routing.command.search
Class BrowseRequest

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.BrowseRequest
All Implemented Interfaces:
PagedRequest, atg.search.routing.command.SearchEngineRequest, java.io.Serializable

public class BrowseRequest
extends SearchRequest
implements PagedRequest

The Browse request is returns the elements of a browsed document set or topic. Required: StartCategory setStartCategory(java.lang.String)

See Also:
Serialized Form

Nested Class Summary
static class BrowseRequest.AncestryType
          A value of direct means that the parent and direct ancestors of the starting item set will be returned.
static class BrowseRequest.RecurseDocumentsType
          A mode value of on means that index items may be collected from child item sets.
static class BrowseRequest.Response
          Response type for BrowseRequest
static class BrowseRequest.SetSort
          The sort value deterimes the sort order of the descendent sets.
static class BrowseRequest.Sorting
          Sorting (grouping) for results.
 
Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
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
 
Constructor Summary
BrowseRequest()
           
 
Method Summary
protected  SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
          Executes the local merge on the incoming responses
protected static BrowseRequest fromXml(atg.search.routing.utils.SearchMessageParser xml, SearchRequest compRequest)
           
 BrowseRequest.AncestryType getAncestry()
          Returns the ancestry type
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
protected  void getBodyXML(java.lang.StringBuilder buf)
          Override to provide the body of the xml.
 java.lang.String getConstrainDocCounts()
          Returns true, false, or a non-negative integer string.
 java.lang.Integer getDocDepth()
          Deprecated. in 9.1
 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 a non-null array of docprops
 java.lang.String getDocPropsString()
          Returns the getDocProps() array as a comma-delimited string
 atg.search.routing.command.search.DocSort getDocSort()
           
 java.lang.Boolean getDocSortCase()
          Returns the case-sensitivity for string-based docSort modes, e.g.
 atg.search.routing.command.search.DocSortOrder getDocSortOrder()
          Returns the doc sort order, which determines whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode
 java.lang.String getDocSortPred()
          Returns the predicate expression to use for sorting when getDocSort() is predicate
 java.lang.String getDocSortProp()
          Returns the property name to use for the strprop or numprop modes
 java.lang.String getDocSortPropDefault()
          Returns the default doc sort property value to use when the property is missing
 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 Document constraint expression
 java.lang.Boolean getFastPaging()
          Fast paging never returns more than is required for a given page.
 java.lang.Float getIntersectMax()
          Returns percent of total collection that is too large to intersect for optimization
 java.lang.String getLocale()
          Returns a string representing the locale with which the query results will be sorted.
 java.lang.Integer getMaxDepth()
          Returns maximum depth from the starting item set that can be returned.
 java.lang.Integer getMaxDescendentSets()
          Deprecated. in 9.1.
 java.lang.Integer getMaxDocs()
          Deprecated. in 9.1
 java.lang.Integer getMaxDocsPerSet()
          Deprecated. in 9.1
 java.lang.Integer getMaxRelatedSets()
           
 java.lang.Integer getMaxSets()
          Deprecated. in 9.1
 java.lang.Integer getMaxSize()
          Deprecated. in 9.1
 java.lang.Integer getMinSize()
          Deprecated. in 9.1
 java.lang.Integer getPageNum()
          Returns the 0-based page number that this request should retrieve
 atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
          Returns page offset info
 java.lang.Integer getPageSize()
          Returns the size of the page for the request
 ParserOptions getParserOptions()
          Returns text processing options
 java.lang.String getRankConfig()
          Return the name of the ranking configuration.
 java.lang.String getRankConfigXml()
           
 java.lang.Boolean getRankPreferVar()
          Indicates whether variables that map to weights in a property prioritization should be preferred over an explicit property value.
 BrowseRequest.RecurseDocumentsType getRecurseDocuments()
           
 java.lang.String getRefineConfig()
          Returns the name of refinement configuration to use
 java.lang.String getRefineConfigXml()
           
 DocumentSetConstraint getRefineConstraints()
          Returns document set constraints
 RefineCountType getRefineCount()
          Returns the refinement value counting mode
 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()
          Refinement values are selected in sort order, which usually is in terms of 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.
 int getRequestId()
          Returns the type of request
 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,...
 BrowseRequest.SetSort getSetSort()
          Returns the sort order of the descendent sets.
 BrowseRequest.Sorting getSorting()
          Returns the sorting (grouping) for the final statement results
 java.lang.String getSortProperty()
          Returns the sort property.
 java.lang.String getStartCategory()
           
 java.lang.Integer getTargetDocs()
          Returns the desired number of items to retrieve based on intersection optimizations
 java.lang.String[] getTextProps()
          Returns a 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
protected  SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
          Processes an engine response
 void setAncestry(BrowseRequest.AncestryType ancestry)
          Normally, the browse response consists of only information about what is below the starting item set, i.e.
 void setConstrainDocCounts(java.lang.String constrainDocCounts)
          The browse algorithm begins at the starting item set, and recursively descends to its children and their children.
 void setDocDepth(java.lang.Integer docDepth)
          Deprecated. in 9.1
 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 browsed index item.
 void setDocPropsString(java.lang.String docProps)
          accepts a comma-delimited list of docProps, which is then converted into an array (see setDocProps(String[]).
 void setDocSort(atg.search.routing.command.search.DocSort docSort)
          Each returned item set may contain index items, depending on the other search parameters.
 void setDocSortCase(java.lang.Boolean pDocSortCase)
          Sets case-sensitivity for string-based docSort modes, e.g.
 void setDocSortOrder(atg.search.routing.command.search.DocSortOrder docSortOrder)
          Each returned item set may contain index items, depending on the other search parameters.
 void setDocSortPred(java.lang.String docSortPred)
          If getDocSort() is predicate, the predicate expression to use for sorting
 void setDocSortProp(java.lang.String docSortProp)
          Each returned item set may contain index items, depending on the other search parameters.
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          Sets the default doc sort property value to use when the property is missing.
 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 setFastPaging(java.lang.Boolean pFastPaging)
          Fast paging never returns more than is required for a given page.
 void setIntersectMax(java.lang.Float intersectMax)
          Sets percent of total collection that is too large to intersect for optimization
 void setLocale(java.lang.String pLocale)
          Sets a string representing the locale with which the query results will be sorted.
 void setMaxDepth(java.lang.Integer maxDepth)
          The browse algorithm begins at the starting item set, and recursively descends to its children and their children.
 void setMaxDescendentSets(java.lang.Integer maxDescendentSets)
          Deprecated. in 9.1
 void setMaxDocs(java.lang.Integer maxDocs)
          Deprecated. in 9.1
 void setMaxDocsPerSet(java.lang.Integer maxDocsPerSet)
          Deprecated. in 9.1
 void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
          ATG Search returns the retrieved index items along with the item sets.
 void setMaxSets(java.lang.Integer maxSets)
          Deprecated. 9.1
 void setMaxSize(java.lang.Integer maxSize)
          Deprecated. in 9.1.
 void setMinSize(java.lang.Integer minSize)
          Deprecated. in 9.1.
 void setPageNum(java.lang.Integer pageNum)
          The browse algorithm begins at the starting item set, and recursively descends to its children and their children.
 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)
          The browse algorithm begins at the starting item set, and recursively descends to its children and their children.
 void setParserOptions(ParserOptions parserOptions)
          Sets text processing options
 void setRankConfig(java.lang.String rankConfig)
          Sets the name of the ranking configuration
 void setRankConfigXml(java.lang.String pRankConfigXml)
          Call this to provide full rankConfig XML for this request.
 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 setRecurseDocuments(BrowseRequest.RecurseDocumentsType recurseDocuments)
          The browse algorithm begins at the starting item set, and recursively descends to its children and their children.
 void setRefineConfig(java.lang.String refineConfig)
          Sets the name of refinement configuration to use
 void setRefineConfigXml(java.lang.String pRefineConfigXml)
          Call this to provide full refineConfig XML for this request.
 void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
          Sets refinement constraints
 void setRefineCount(RefineCountType pRefineCount)
          Sets the refinement value counting mode
 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 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 setSetSort(BrowseRequest.SetSort setSort)
          The browse request returns the descendents of the starting item set and possibly descendents of these children sets, and so on.
 void setSorting(BrowseRequest.Sorting sorting)
          ATG Search has two algorithms to group the final statement results: group-by-document and group-by-property.
 void setSortProperty(java.lang.String sortProperty)
          Sets the sort propert.
 void setStartCategory(java.lang.String startingCategory)
           
 void setTargetDocs(java.lang.Integer targetDocs)
          Sets the desired number of items to retrieve based on intersection optimizations
 void setTextProps(java.lang.String[] pTextProps)
          Sets an 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 a comma-delimited list of text properties
static BrowseRequest valueOf(java.lang.String pRequestXml)
          Converts an xml string into a BrowseRequest
static BrowseRequest valueOf(java.lang.String pRequestXml, SearchRequest compRequest)
          Converts an xml string into a BrowseRequest
 
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
Class version string

Constructor Detail

BrowseRequest

public BrowseRequest()
Method Detail

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()
Returns page offset info

Specified by:
getPageOffsetInfo in interface PagedRequest
Returns:
page offset info

getStartCategory

public java.lang.String getStartCategory()
Returns:
Starting document set(s) for browsing. If more than one is provided, the syntax is /path//path//path...

setStartCategory

public void setStartCategory(java.lang.String startingCategory)
Parameters:
startingCategory - Starting document set(s) for browsing. If more than one is provided, the syntax is /path//path//path...

getRankConfigXml

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

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 only

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>.

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

getDocumentSetConstraints

public DocumentSetConstraint getDocumentSetConstraints()
Returns Document constraint expression

Returns:
Document constraint expression

setDocumentSetConstraints

public void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
Sets document set constraints

Parameters:
documentSetConstraints - Document constraint expression

getRefineConstraints

public DocumentSetConstraint getRefineConstraints()
Returns document set constraints

Returns:
document set constraints

setRefineConstraints

public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
Sets refinement constraints

Parameters:
pRefineConstraints - document set constraints

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

getSorting

public BrowseRequest.Sorting getSorting()
Returns the sorting (grouping) for the final statement results

Returns:
sorting for final statement results

setSorting

public void setSorting(BrowseRequest.Sorting sorting)
ATG Search has two algorithms to group the final statement results: group-by-document and group-by-property. This algorithm is controlled by the result list controls described elsewhere. The search request simply has to pick which algorithm to invoke, using this attribute.

Parameters:
sorting - can either be document, for the group-by-document algorithm. or property, for group by property. For group-by-property, use the setSortProperty(String) to specify the property value.

getSortProperty

public java.lang.String getSortProperty()
Returns the sort property. 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.

Returns:
sort property

setSortProperty

public void setSortProperty(java.lang.String sortProperty)
Sets the sort propert. 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.

Parameters:
sortProperty - sort property

getLocale

public java.lang.String getLocale()
Returns a string representing the locale with which the query results will be sorted.

Returns:
the string representing the locale governing the sort of results

setLocale

public void setLocale(java.lang.String pLocale)
Sets a string representing the locale with which the query results will be sorted. If results are sorted according to some string property of result items, the sort order will reflect the conventions of this locale, when specified. The search engine uses International Components for Unicode (ICU), which provides support for locales and "collation", see http://userguide.icu-project.org/collation which states: Starting in release 1.8, the ICU Collation Service is updated to be fully compliant to the Unicode Collation Algorithm (UCA) (http://www.unicode.org/unicode/reports/tr10/ ) and conforms to ISO 14651.

Parameters:
pLocale - the desired locale for governing the sort of results

getRankConfig

public java.lang.String getRankConfig()
Return the name of the ranking configuration.

Returns:
Name of ranking configuration to use

setRankConfig

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

Parameters:
rankConfig - Name of ranking configuration to use

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

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

getRefineConfig

public java.lang.String getRefineConfig()
Returns the name of refinement configuration to use

Returns:
Name of refinement configuration to use

setRefineConfig

public void setRefineConfig(java.lang.String refineConfig)
Sets the name of refinement configuration to use

Parameters:
refineConfig - Name of refinement configuration to use

getRefineMax

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

Returns:
maximum number of refinement properties to return

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.

getRecurseDocuments

public BrowseRequest.RecurseDocumentsType getRecurseDocuments()
Returns:
A mode value of on means that index items may be collected from child item sets. A mode value of off means that index items may only be collected from the immediate item set, excluding any from child sets. A mode value of empty means the same as off, unless the immediate item set has no documents. null means default.

setRecurseDocuments

public void setRecurseDocuments(BrowseRequest.RecurseDocumentsType recurseDocuments)
The browse algorithm begins at the starting item set, and recursively descends to its children and their children. At each item set, the algorithm collects index items according to other parameters and returns some number of those. The collection of index items is controlled by the following attribute.

Parameters:
recurseDocuments - A mode value of on means that index items may be collected from child item sets. A mode value of off means that index items may only be collected from the immediate item set, excluding any from child sets. A mode value of empty means the same as off, unless the immediate item set has no documents. The default value is off.

getRefineTop

public java.lang.Integer getRefineTop()
Refinement values are selected in sort order, which usually is in terms of the number of index items that has each value.

Returns:
number of top refinements

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 - refinement values are selected in sort order, which usually is in terms of 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.

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

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

getMaxRelatedSets

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

setMaxRelatedSets

public void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
ATG Search returns the retrieved index items along with the item sets. The retrieved items contain associated information, including the document sets (or categories) of the item. How many of these related sets and what kind of sets to return are controlled by the MAX_RELATED_SETS and RELATED_SETS attributes.

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

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()
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:
false by default

setFastPaging

public void setFastPaging(java.lang.Boolean pFastPaging)
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()
Returns the size of the page for the request

Specified by:
getPageSize in interface PagedRequest
Returns:
the size of the page

setPageSize

public void setPageSize(java.lang.Integer pageSize)
The browse algorithm begins at the starting item set, and recursively descends to its children and their children. At each item set, the algorithm collects index items according to other parameters and returns some number of those. Because the number of index items may be great, parameters limit how many can be returned. The browse request also allows paging through of these index items, and it is controlled by two attributes: setPageNum(Integer) and this one, pageSize.

Specified by:
setPageSize in interface PagedRequest
Parameters:
pageSize - Specifies the size of the page, in results. If size is empty or missing, a default page size is used.

getPageNum

public java.lang.Integer getPageNum()
Returns the 0-based page number that this request should retrieve

Specified by:
getPageNum in interface PagedRequest
Returns:
which page number to return, starting from the first page 0 and so on

setPageNum

public void setPageNum(java.lang.Integer pageNum)
The browse algorithm begins at the starting item set, and recursively descends to its children and their children. At each item set, the algorithm collects index items according to other parameters and returns some number of those. Because the number of index items may be great, parameters limit how many can be returned. The browse request also allows paging through of these index items, and it is controlled by two attributes: pageNum and pageSize.

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

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.

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 a 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)
Sets an 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 a 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()

getAncestry

public BrowseRequest.AncestryType getAncestry()
Returns the ancestry type

Returns:
ancestry type

setAncestry

public void setAncestry(BrowseRequest.AncestryType ancestry)
Normally, the browse response consists of only information about what is below the starting item set, i.e. its items and its descendents. However, for some user interface applications, it is useful to also return where in the item set tree the starting set appears. The browse request can return ancestry information about the starting node using the following attribute.

Parameters:
ancestry - A value of 'none' means no ancestry information is returned. If no value is passed in, the default value of 'none' is used .

getMaxSets

public java.lang.Integer getMaxSets()
Deprecated. in 9.1


setMaxSets

public void setMaxSets(java.lang.Integer maxSets)
Deprecated. 9.1


getMaxDepth

public java.lang.Integer getMaxDepth()
Returns maximum depth from the starting item set that can be returned.

Returns:
The maximum depth from the starting item set that can be returned.

setMaxDepth

public void setMaxDepth(java.lang.Integer maxDepth)
The browse algorithm begins at the starting item set, and recursively descends to its children and their children. This controls the depth of the recursion.

Parameters:
maxDepth - The maximum depth from the starting item set that can be returned. A value of 0 means infinite. The default is 2.

getMaxSize

public java.lang.Integer getMaxSize()
Deprecated. in 9.1


setMaxSize

public void setMaxSize(java.lang.Integer maxSize)
Deprecated. in 9.1.


getMinSize

public java.lang.Integer getMinSize()
Deprecated. in 9.1


setMinSize

public void setMinSize(java.lang.Integer minSize)
Deprecated. in 9.1.


getMaxDescendentSets

public java.lang.Integer getMaxDescendentSets()
Deprecated. in 9.1.


setMaxDescendentSets

public void setMaxDescendentSets(java.lang.Integer maxDescendentSets)
Deprecated. in 9.1


getMaxDocs

public java.lang.Integer getMaxDocs()
Deprecated. in 9.1


setMaxDocs

public void setMaxDocs(java.lang.Integer maxDocs)
Deprecated. in 9.1


getMaxDocsPerSet

public java.lang.Integer getMaxDocsPerSet()
Deprecated. in 9.1


setMaxDocsPerSet

public void setMaxDocsPerSet(java.lang.Integer maxDocsPerSet)
Deprecated. in 9.1


getDocDepth

public java.lang.Integer getDocDepth()
Deprecated. in 9.1


setDocDepth

public void setDocDepth(java.lang.Integer docDepth)
Deprecated. in 9.1


getTargetDocs

public java.lang.Integer getTargetDocs()
Returns the desired number of items to retrieve based on intersection optimizations

Returns:
Desired number of items to retrieve based on intersection optimizations

setTargetDocs

public void setTargetDocs(java.lang.Integer targetDocs)
Sets the desired number of items to retrieve based on intersection optimizations

Parameters:
targetDocs - Desired number of items to retrieve based on intersection optimizations

getIntersectMax

public java.lang.Float getIntersectMax()
Returns percent of total collection that is too large to intersect for optimization

Returns:
Percent of total collection that is too large to intersect for optimization

setIntersectMax

public void setIntersectMax(java.lang.Float intersectMax)
Sets percent of total collection that is too large to intersect for optimization

Parameters:
intersectMax - Percent of total collection that is too large to intersect for optimization

getDocSort

public atg.search.routing.command.search.DocSort getDocSort()

setDocSort

public void setDocSort(atg.search.routing.command.search.DocSort docSort)
Each returned item set may contain index items, depending on the other search parameters. Normally, the index items are returned in index order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. Secondary sorting is performed before paging. Secondary sorting is controlled by four attributes: setDocSort(atg.search.routing.command.search.DocSort), #setDocSortOrder(atg.search.routing.command.search.BrowseRequest.DocSortOrder), setDocSortProp(String), and setDocSortPropDefault(String).

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

  • getDocSortOrder

    public atg.search.routing.command.search.DocSortOrder getDocSortOrder()
    Returns the doc sort order, which determines whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode

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

    setDocSortOrder

    public void setDocSortOrder(atg.search.routing.command.search.DocSortOrder docSortOrder)
    Each returned item set may contain index items, depending on the other search parameters. Normally, the index items are returned in index order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. Secondary sorting is performed before paging.

    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.

    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 -

    setDocSortProp

    public void setDocSortProp(java.lang.String docSortProp)
    Each returned item set may contain index items, depending on the other search parameters. Normally, the index items are returned in index order, but user interfaces often allow the final results to be sorted by some secondary criteria, such as date or source or format. Secondary sorting is performed before paging.

    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, the docSortPropDefault value can specify the default property value to use for these exceptional cases. The default value should agree with the type of the property.

    getDocSortPropDefault

    public java.lang.String getDocSortPropDefault()
    Returns the default doc sort property value to use when the property is missing

    Returns:
    the default doc sort property value to use when the property is missing

    setDocSortPropDefault

    public void setDocSortPropDefault(java.lang.String docSortPropDefault)
    Sets the default doc sort property value to use when the property is missing. The default value should agree with the type of the property.

    Parameters:
    docSortPropDefault - the default property value

    getDocSortPred

    public java.lang.String getDocSortPred()
    Returns the predicate expression to use for sorting when getDocSort() is predicate

    Returns:
    the predicate expression to use for sorting

    setDocSortPred

    public void setDocSortPred(java.lang.String docSortPred)
    If getDocSort() is predicate, the predicate expression to use for sorting

    Parameters:
    docSortPred - predicate expression

    getSetSort

    public BrowseRequest.SetSort getSetSort()
    Returns the sort order of the descendent sets.

    Returns:
    The sort value deterimes the sort order of the descendent sets.

    setSetSort

    public void setSetSort(BrowseRequest.SetSort setSort)
    The browse request returns the descendents of the starting item set and possibly descendents of these children sets, and so on. Normally, these descendent sets are returned in index order, which means how every they were encountered during indexing. This property controls the order of the descendents within a single item set.

    Parameters:
    setSort - The sort value deterimes the sort order of the descendent sets. A value of alpha means the sets are sorted by name. A value of size means the sets are sorted by largest to smallest size. The default value is none, which means no sorting is performed.

    getConstrainDocCounts

    public java.lang.String getConstrainDocCounts()
    Returns true, false, or a non-negative integer string. A value of 0 means that static sizes will be returned and the effect of constraints ignored. A positive value represents the maximum (static) size of an item set that will have its dynamic (constraint-based) size computed. For example, a value of 100 means that only item sets whose static size is less than 100 will have constraint-based sizes computed; all other returned item sets will return their static size. The logic of this attribute is that the exact size of very large sets is less important than small sets, so ATG Search will pay the cost of computation only on small sets.

    Returns:
    constraint doc counts

    setConstrainDocCounts

    public void setConstrainDocCounts(java.lang.String constrainDocCounts)
    The browse algorithm begins at the starting item set, and recursively descends to its children and their children. At each item set, the algorithm computes the total unique index items with the set and its descendents. Normally, ATG Search uses the static sizes stored in the index structure, which is fast and efficient. However, these sizes do not reflect the constraints that are included in the browse request. For example, security meta-data constraints might limit a user to see only a portion of the collection, and ideally, the item set sizes should reflect that subset. However, computing dynamic sizes of all returned item sets is expensive and slow, and is controlled by the following attribute.

    Parameters:
    constrainDocCounts - Acceptable values are true, false, and a non-negative integer. The boolean values tell the engine to enable the feature using engine-selected values. A value of 0 (or true) means that static sizes will be returned and the effect of constraints ignored. A positive value represents the maximum (static) size of an item set that will have its dynamic (constraint-based) size computed. For example, a value of 100 means that only item sets whose static size is less than 100 will have constraint-based sizes computed; all other returned item sets will return their static size. The logic of this attribute is that the exact size of very large sets is less important than small sets, so ATG Search will pay the cost of computation only on small sets.

    getDocProps

    public java.lang.String[] getDocProps()
    Returns a non-null array of docprops

    Returns:
    docProps array

    setDocProps

    public void setDocProps(java.lang.String[] docProps)
    ATG Search returns the meta-data properties associated with the browsed index item. 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, which is then converted into an array (see setDocProps(String[]).

    Parameters:
    docProps - comma-delimited list of doc props
    See Also:
    setDocProps(String[])

    getDocPropsString

    public java.lang.String getDocPropsString()
    Returns the getDocProps() array as a comma-delimited string

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

    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,...

    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 - the response number settings map

    getRequestId

    public int getRequestId()
    Returns the type of request

    Specified by:
    getRequestId in class SearchRequest
    Returns:
    type of request

    valueOf

    public static BrowseRequest valueOf(java.lang.String pRequestXml)
    Converts an xml string into a BrowseRequest

    Parameters:
    pRequestXml - browse xml
    Returns:
    a browse request, or null if the string is empty

    valueOf

    public static BrowseRequest valueOf(java.lang.String pRequestXml,
                                        SearchRequest compRequest)
    Converts an xml string into a BrowseRequest

    Parameters:
    pRequestXml - browse xml
    compRequest - an existing (browse) request object to combine with the provide xml, typically initalized as a nucleus component
    Returns:
    a browse request, or null if the string is empty

    fromXml

    protected static BrowseRequest fromXml(atg.search.routing.utils.SearchMessageParser xml,
                                           SearchRequest compRequest)

    getDocSortCase

    public java.lang.Boolean getDocSortCase()
    Returns the case-sensitivity for string-based docSort modes, e.g. strprop, title, address

    Returns:
    Control case-sensitivity for string-based docSort modes, e.g. strprop, title, address

    setDocSortCase

    public void setDocSortCase(java.lang.Boolean pDocSortCase)
    Sets case-sensitivity for string-based docSort modes, e.g. strprop, title, address. The engine's default is true.

    Parameters:
    pDocSortCase - Control case-sensitivity for string-based docSort modes, e.g. strprop, title, address

    processSearchResponse

    protected SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
                                            throws atg.search.routing.command.RoutingCommandException
    Processes an engine response

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

    doMerge

    protected SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
                              throws atg.search.routing.MergeException
    Executes the local merge on the incoming responses

    Overrides:
    doMerge in class SearchRequest
    Parameters:
    pParsedResponses - incoming engine responses
    Returns:
    merged response
    Throws:
    atg.search.routing.MergeException