atg.search.routing.command.search
Class StructuredQueryRequest

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

public class StructuredQueryRequest
extends SearchRequest
implements PagedRequest

Structured query request, also called 'fielded search.'

Required: Statements setStatements(java.util.List), addStatement(atg.search.routing.command.search.StructuredStatement)

Optional: everything else

See Also:
Serialized Form

Nested Class Summary
static class StructuredQueryRequest.DocSetSort
          Doc set sort enumeration.
static class StructuredQueryRequest.Response
          Response type for StructuredQueryRequest.
 
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, PAGE_OFFSET_INFO
 
Constructor Summary
StructuredQueryRequest()
           
 
Method Summary
 void addStatement(StructuredStatement statement)
          Adds a statement to the list of statements
protected  SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
          Default implementation returns the first element of the array and tosses the rest.
protected static StructuredQueryRequest fromXml(atg.search.routing.utils.SearchMessageParser xml, SearchRequest compRequest)
           
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
 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 autospell is enabled
protected  void getBodyXML(java.lang.StringBuilder buf)
           
 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.
 StructuredQueryRequest.DocSetSort getDocSetSort()
          Returns the doc set sort mode
 atg.search.routing.command.search.DocSort getDocSort()
          Returns how the result groups will be sorted
 java.lang.Boolean getDocSortCase()
          Returns the case-sensitivity for string-based docSort modes, e.g.
 atg.search.routing.command.search.DocSortOrder getDocSortOrder()
          Returns whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode.
 java.lang.String getDocSortPred()
          Returns the doc sort predicate
 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 document set constraints
 java.lang.Boolean getFastPaging()
          Returns an indication of whether fast paging is enabled for this request.
 java.lang.String getLocale()
          Returns a string representing the locale with which the query results will be sorted.
 java.lang.Integer getMaxRelatedSets()
          Returns the maximum number of related sets to return per document
 java.lang.Integer getMaxRelatedStatements()
          Returns the maximum number of related statements to return
 java.lang.Integer getMinScore()
          Returns a value that will range from 0 to 1000, and defaults to 0.
 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 the text processing options
 java.lang.String getRefineConfig()
          Returns the refinement configuration
 DocumentSetConstraint getRefineConstraints()
          Returns the refinement constraints
 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 getRefineTop()
          Returns the number of index items that have 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 the comma-delimited list of related sets.
 int getRequestId()
          This identifies the type of request, one of SearchRequest.QUERY, SearchRequest.BROWSE, etc.
 java.lang.Boolean getReturnFeedback()
          ATG Search returns feedback about related terms and phrases for the query.
 java.util.List<StructuredStatement> getStatements()
          Returns the List of StructuredStatement objects
 StructuredStatement getStatements(int pIndex)
          Gets the statement at a particular index.
 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 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
 java.lang.Integer getTop()
          Returns the maximum number of results to return
 java.lang.Integer getWeightContribution()
          Returns the relative contribution of the weighted preference value to the total relevance
 DocumentSetConstraint getWeightedProperties()
          Returns the weighted property constraints
 SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
          Override to provide search response processing (parsing, generally).
 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 autoSpellingCorrection)
          ATG Search performs spelling correction and can return suggestions as part of the response.
 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(StructuredQueryRequest.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.DocSort docSort)
          ATG Search returns a list of result groups in its query response.
 void setDocSortCase(java.lang.Boolean pDocSortCase)
          default is true in the engine
 void setDocSortOrder(atg.search.routing.command.search.DocSortOrder docSortOrder)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPred(java.lang.String docSortPred)
          Sets the doc sort predicate
 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 the document set constraints
 void setFastPaging(java.lang.Boolean pFastPaging)
          Sets whether fast paging is enabled for this request.
 void setLocale(java.lang.String pLocale)
          Sets a string representing the locale with which the query results will be sorted.
 void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
          ATG Search returns the retrieved documents along with the statement results.
 void setMaxRelatedStatements(java.lang.Integer maxRelatedStatements)
          Sets the maximum number of related statements to return
 void setMinScore(java.lang.Integer minScore)
          The ATG Search results are ranked by relevancy.
 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 the text processing options
 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 setRefineConstraints(DocumentSetConstraint pRefineConstraints)
          Sets the refinement constraints
 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 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 setReturnFeedback(java.lang.Boolean returnFeedback)
          ATG Search returns feedback about related terms and phrases for the query.
 void setStatements(int pIndex, StructuredStatement pStatement)
          Sets a statement at a particular index, increasing the size of the list if necessary.
 void setStatements(java.util.List<StructuredStatement> statements)
          Sets the List of StructuredStatement objects
 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 the comma-delimited list of text properties
 void setTop(java.lang.Integer top)
          Sets the maximum number of results to return
 void setWeightContribution(java.lang.Integer weightContribution)
          Sets the relative contribution of the weighted preference value to the total relevance
 void setWeightedProperties(DocumentSetConstraint weightedProperties)
          Sets weighted property constraints
static StructuredQueryRequest valueOf(java.lang.String pRequestXml)
          Constructs a new request from an xml string
static StructuredQueryRequest valueOf(java.lang.String pRequestXml, SearchRequest compRequest)
          Converts an xml string into a StructuredQueryRequest
 
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

StructuredQueryRequest

public StructuredQueryRequest()
Method Detail

getStatements

public java.util.List<StructuredStatement> getStatements()
Returns the List of StructuredStatement objects

Returns:
List of StructuredStatement objects

setStatements

public void setStatements(java.util.List<StructuredStatement> statements)
Sets the List of StructuredStatement objects

Parameters:
statements - List of StructuredStatement objects

addStatement

public void addStatement(StructuredStatement statement)
Adds a statement to the list of statements

Parameters:
statement - adds it to the list of statements

setStatements

public void setStatements(int pIndex,
                          StructuredStatement pStatement)
Sets a statement at a particular index, increasing the size of the list if necessary.

Parameters:
pIndex - the index
pStatement - the statement

getStatements

public StructuredStatement getStatements(int pIndex)
Gets the statement at a particular index. If there is no element in the array at that index, the array is extended and a new statement is allocated and returned.

Parameters:
pIndex - the index
Returns:
a statement

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)
default is true in the engine

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

getWeightContribution

public java.lang.Integer getWeightContribution()
Returns the relative contribution of the weighted preference value to the total relevance

Returns:
Relative contribution of the weighted preference value to the total relevance

setWeightContribution

public void setWeightContribution(java.lang.Integer weightContribution)
Sets the relative contribution of the weighted preference value to the total relevance

Parameters:
weightContribution - Relative contribution of the weighted preference value to the total relevance

getMaxRelatedStatements

public java.lang.Integer getMaxRelatedStatements()
Returns the maximum number of related statements to return

Returns:
Maximum number of related statements to return

setMaxRelatedStatements

public void setMaxRelatedStatements(java.lang.Integer maxRelatedStatements)
Sets the maximum number of related statements to return

Parameters:
maxRelatedStatements - Maximum number of related statements to return

getDocSetSort

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

Returns:
the doc set sort mode

setDocSetSort

public void setDocSetSort(StructuredQueryRequest.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.

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:
whether feedback should be returned

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 - whether feedback should be returned

getParserOptions

public ParserOptions getParserOptions()
Returns the text processing options

Returns:
text processing options

setParserOptions

public void setParserOptions(ParserOptions parserOptions)
Sets the text processing options

Parameters:
parserOptions - tex processing options

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)
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 the 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()

getDocumentSetConstraints

public DocumentSetConstraint getDocumentSetConstraints()
Returns document set constraints

Returns:
document set constraints

setDocumentSetConstraints

public void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
Sets the document set constraints

Parameters:
documentSetConstraints - document set constraints

getRefineConstraints

public DocumentSetConstraint getRefineConstraints()
Returns the refinement constraints

Returns:
the refinement constraints

setRefineConstraints

public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
Sets the refinement constraints

Parameters:
pRefineConstraints - the refinement 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
Overrides:
getBodyXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

getMinScore

public java.lang.Integer getMinScore()
Returns a value that 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.

getAutoSpell

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

Returns:
whether autospell is enabled

setAutoSpell

public void setAutoSpell(java.lang.Boolean autoSpellingCorrection)
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:
autoSpellingCorrection - true or false, and defaults to true in the engine. The spelling suggestion feedback is always returned, and is not effected by this attribute.

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.

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 have each value

Returns:
the number of index items that have 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. The default value for min is 0.

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.

getDocProps

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

Returns:
list of 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 - a comma-delimited list of 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 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 the 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.

Parameters:
automaticConstrainCategories - 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.

getDocSort

public atg.search.routing.command.search.DocSort getDocSort()
Returns how the result groups will be sorted

Returns:
how the result groups will be sorted

setDocSort

public void setDocSort(atg.search.routing.command.search.DocSort 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

  • getDocSortPred

    public java.lang.String getDocSortPred()
    Returns the doc sort predicate

    Returns:
    doc sort predicate

    setDocSortPred

    public void setDocSortPred(java.lang.String docSortPred)
    Sets the doc sort predicate

    Parameters:
    docSortPred - the doc sort predicate

    getDocSortOrder

    public atg.search.routing.command.search.DocSortOrder getDocSortOrder()
    Returns 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(atg.search.routing.command.search.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.DocSort), setDocSortOrder(atg.search.routing.command.search.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.DocSort), setDocSortOrder(atg.search.routing.command.search.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.

    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

    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.DocSort), setDocSortOrder(atg.search.routing.command.search.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.DocSort), setDocSortOrder(atg.search.routing.command.search.DocSortOrder), setDocSortProp(java.lang.String), setDocSortPropDefault(java.lang.String).

    Parameters:
    docSortPropDefault - 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.

    getWeightedProperties

    public DocumentSetConstraint getWeightedProperties()
    Returns the weighted property constraints

    Returns:
    weighted property constraints

    setWeightedProperties

    public void setWeightedProperties(DocumentSetConstraint weightedProperties)
    Sets weighted property constraints

    Parameters:
    weightedProperties - weighted property constraints

    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

    valueOf

    public static StructuredQueryRequest valueOf(java.lang.String pRequestXml)
    Constructs a new request from an xml string

    Parameters:
    pRequestXml - an xml string
    Returns:
    a new request

    valueOf

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

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

    fromXml

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

    getTop

    public java.lang.Integer getTop()
    Returns the maximum number of results to return

    Returns:
    Maximum number of results to return

    setTop

    public void setTop(java.lang.Integer top)
    Sets the maximum number of results to return

    Parameters:
    top - Maximum number of results to return

    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

    protected 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