atg.search.routing.command.search
Class SimilarDocsRequest

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

public class SimilarDocsRequest
extends SearchRequest
implements PagedRequest

Similar docs request.

Required: input setInput(String)

Optional: everything else

See Also:
Serialized Form

Nested Class Summary
static class SimilarDocsRequest.DocSetSort
          ATG Search can return categorization feedback about the returned results in the form of a tree.
static class SimilarDocsRequest.DocSortOrder
          Doc sort order enumeration type.
static class SimilarDocsRequest.Mode
          Mode enumeration type.
static class SimilarDocsRequest.Response
          Response type for SimilarDocsRequest.
 
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_NUM, PAGE_OFFSET_INFO, PAGE_SIZE
 
Constructor Summary
SimilarDocsRequest()
           
 
Method Summary
protected  SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses)
          Default implementation returns the first element of the array and tosses the rest.
protected static SimilarDocsRequest fromXml(atg.search.routing.utils.SearchMessageParser xml, SearchRequest compRequest)
           
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
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()
          list of docprops
 java.lang.String getDocPropsString()
          Returns comma-delimited list of docprops.
 SimilarDocsRequest.DocSetSort getDocSetSort()
          Returns doc set sorting
 atg.search.routing.command.search.DocSortCommon getDocSort()
          Returns how the result groups will be sorted
 java.lang.Boolean getDocSortCase()
          Indicates whether doc sort is case sensitive
 SimilarDocsRequest.DocSortOrder getDocSortOrder()
          Returns whether the sort is ascending or descending, either alphabetically or numerically, depending on the sort mode.
 java.lang.String getDocSortPred()
          If docSort is predicate, returns the predicate expression to use for sorting
 java.lang.String getDocSortProp()
          Returns the property name to use for the strprop or numprop modes
 java.lang.String getDocSortPropDefault()
          ATG Search returns a list of result groups in its query response.
 DocSortPropVal getDocSortPropVal()
          When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.
 DocumentSetConstraint getDocumentSetConstraints()
          Returns document set constraints
 java.lang.Boolean getFastPaging()
          Returns an indication of whether fast paging is enabled for this request.
 java.lang.String getInput()
          Returns the input to use for similarity comparision.
 java.lang.Integer getMaxRelatedSets()
          Returns the maximum number of related sets to return per document.
 SimilarDocsRequest.Mode getMode()
          Returns the input mode
 java.lang.Integer getPageNum()
          Returns the 0-based page number that should be retrieved.
 atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
          Returns internal page offset information when fast paging is used with a multi-partition index.
 java.lang.Integer getPageSize()
          Returns the number of results that should be returned per page
 ParserOptions getParserOptions()
          Returns text processing options
 DocumentSetConstraint getRefineConstraints()
          Returns refinement constraints
 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()
          This identifies the type of request, one of SearchRequest.QUERY, SearchRequest.BROWSE, etc.
 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 the comma-delimited list of text properties
 java.lang.Float getThreshold()
          The Similar Docs request uses a TF-IDF formula to compute the relevancy of the retrieved index items.
 java.lang.Integer getTop()
          Returns the maximum number of results to return.
 SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response)
          Override to provide search response processing (parsing, generally).
 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(SimilarDocsRequest.DocSetSort docSetSort)
          ATG Search can return categorization feedback about the returned results in the form of a tree.
 void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
          ATG Search returns a list of result groups in its query response.
 void setDocSortCase(java.lang.Boolean pDocSortCase)
          Controls whether doc sort is case sensitive
 void setDocSortOrder(SimilarDocsRequest.DocSortOrder docSortOrder)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPred(java.lang.String docSortPred)
          If docSort is predicate, the predicate expression to use for sorting
 void setDocSortProp(java.lang.String docSortProp)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          ATG Search returns a list of result groups in its query response.
 void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
          When sorting by property value, this parameter determines how the value of the property is selected when the property has multiple values.
 void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
          Sets document set constraints
 void setFastPaging(java.lang.Boolean pFastPaging)
          Sets whether fast paging is enabled for this request.
 void setInput(java.lang.String input)
          Sets the input to use for similarity comparision.
 void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
          Sets the maximum number of related sets to return per document.
 void setMode(SimilarDocsRequest.Mode pMode)
          The input to the Similar Text request has several forms: - Simple text - the request contains raw, unformatted text of any kind - Structured text - the request contains XHTML text in ATG Search's standard format - or url or hdoc
 void setPageNum(java.lang.Integer pageNum)
          Sets the 0-based page number that should be retrieved.
 void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pPageOffsetInfo)
          Sets the page offset information, which is used internally to manage fast paging for multiple partitions.
 void setPageSize(java.lang.Integer pageSize)
          Sets the number of results that should be returned per page.
 void setParserOptions(ParserOptions parserOptions)
          Sets text processing options
 void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
          Sets refinement constraints
 void setRelatedSets(java.lang.String[] relatedSets)
          The Similar Text request returns the retrieved documents that contain associated information, including the document sets (or categories) of the document.
 void setRelatedSetsString(java.lang.String pRelSets)
          accepts a comma-delimited list of related sets
 void setTextProps(java.lang.String[] pTextProps)
          Sets the 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 setThreshold(java.lang.Float threshold)
          The Similar Docs request uses a TF-IDF formula to compute the relevancy of the retrieved index items.
 void setTop(java.lang.Integer top)
          The Similar Text request does not perform grouping and is therefore not controlled by the result list controls described in Section 12.2.
static SimilarDocsRequest valueOf(java.lang.String pRequestXml)
          Returns a new request object from an xml string.
static SimilarDocsRequest valueOf(java.lang.String pRequestXml, SearchRequest compRequest)
          Converts an xml string into a SimilarDocsRequest
 
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

SimilarDocsRequest

public SimilarDocsRequest()
Method Detail

getDocProps

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

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

setDocProps

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

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

setDocPropsString

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

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

getDocPropsString

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

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

getDocSort

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

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

  • getDocSortOrder

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

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

    getDocSortProp

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

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

    setDocSortProp

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

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

    getDocSortPropVal

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

    Returns:
    doc sort prop value

    setDocSortPropVal

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

    Parameters:
    pDocSortPropVal -

    getDocSortPropDefault

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

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

    setDocSortPropDefault

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

    getDocSortPred

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

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

    setDocSortPred

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

    Parameters:
    docSortPred - predicate expression

    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 set constraints

    Returns:
    document set constraints

    setDocumentSetConstraints

    public void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
    Sets document set constraints

    Parameters:
    documentSetConstraints - document set constraints

    getRefineConstraints

    public DocumentSetConstraint getRefineConstraints()
    Returns refinement constraints

    Returns:
    refinement constraints

    setRefineConstraints

    public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
    Sets refinement constraints

    Parameters:
    pRefineConstraints - refinement constraints

    getDocSortCase

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

    Returns:
    whether doc sort is case sensitive

    setDocSortCase

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

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

    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

    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)
    Sets the maximum number of related sets to return per document. The default is 1000.

    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. Only related sets that are descendents of a member of this list are returned.

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

    setRelatedSets

    public void setRelatedSets(java.lang.String[] relatedSets)
    The Similar Text request returns the retrieved documents that 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 setMaxRelatedSets(Integer) and this.

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

    setRelatedSetsString

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

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

    getRelatedSetsString

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

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

    getFastPaging

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

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

    setFastPaging

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

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

    getPageSize

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

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

    setPageSize

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

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

    getPageNum

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

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

    setPageNum

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

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

    getInput

    public java.lang.String getInput()
    Returns the input to use for similarity comparision.

    Returns:
    input to use for similarity comparision.

    setInput

    public void setInput(java.lang.String input)
    Sets the input to use for similarity comparision. The value depends on the mode attribute: hdoc mode means input is a document identifier; url mode means the input is a URL; text mode means the input is a text string; and xhtml mode means the input is an XHTML structured document.

    Parameters:
    input - Input to use for similarity comparison.

    getMode

    public SimilarDocsRequest.Mode getMode()
    Returns the input mode

    Returns:
    the input mode

    setMode

    public void setMode(SimilarDocsRequest.Mode pMode)
    The input to the Similar Text request has several forms: - Simple text - the request contains raw, unformatted text of any kind - Structured text - the request contains XHTML text in ATG Search's standard format - or url or hdoc

    Parameters:
    pMode - input mode

    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 the 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 the comma-delimited list of text properties

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

    getTop

    public java.lang.Integer getTop()
    Returns the maximum number of results to return. The default value is 10.

    Returns:
    the maximum number of results to return. The default value is 10.

    setTop

    public void setTop(java.lang.Integer top)
    The Similar Text request does not perform grouping and is therefore not controlled by the result list controls described in Section 12.2. Instead, the following attribute controls the maximum number of results to return:

    Parameters:
    top - specifies the maximum number of results to return. The default value is 10.

    getThreshold

    public java.lang.Float getThreshold()
    The Similar Docs request uses a TF-IDF formula to compute the relevancy of the retrieved index items. This controls the minimum relevancy of a returned result.

    Returns:
    Similarity threshold

    setThreshold

    public void setThreshold(java.lang.Float threshold)
    The Similar Docs request uses a TF-IDF formula to compute the relevancy of the retrieved index items. This controls the minimum relevancy of a returned result.

    Parameters:
    threshold - the minimum relevancy threshold. Any retrieved item with a relevancy less than this value is excluded from the results. The default value is 0.

    getDocSetSort

    public SimilarDocsRequest.DocSetSort getDocSetSort()
    Returns doc set sorting

    Returns:
    doc set sorting

    setDocSetSort

    public void setDocSetSort(SimilarDocsRequest.DocSetSort docSetSort)
    ATG Search can return categorization feedback about the returned results in the form of a tree.

    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.

    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.

    getRequestId

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

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

    processSearchResponse

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

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

    doMerge

    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

    valueOf

    public static SimilarDocsRequest valueOf(java.lang.String pRequestXml)
    Returns a new request object from an xml string.

    Parameters:
    pRequestXml - request xml.
    Returns:
    a new request object from an xml string.

    valueOf

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

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

    fromXml

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