atg.search.routing.command.search
Class SimilarDocsRequest.Response

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.SearchEngineCommandResponse
          extended by atg.search.routing.command.search.SearchResponse
              extended by atg.search.routing.command.search.SearchResultsResponse
                  extended by atg.search.routing.command.search.SimilarDocsRequest.Response
All Implemented Interfaces:
PagedResponse, java.io.Serializable
Enclosing class:
SimilarDocsRequest

public static class SimilarDocsRequest.Response
extends SearchResultsResponse

Response type for SimilarDocsRequest.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class atg.search.routing.command.search.SearchResultsResponse
CLASS_VERSION
 
Fields inherited from class atg.search.routing.command.search.SearchResponse
mMultiPartitionSearch
 
Constructor Summary
SimilarDocsRequest.Response(atg.search.routing.command.SearchEngineResponse response)
          Constructs a response from a single engine's response
SimilarDocsRequest.Response(SimilarDocsRequest pRequest, java.util.List<SearchResponse> pParsedResponses)
          This uses Java Merge instead of the engine's merge.
 
Method Summary
 boolean equals(java.lang.Object pObject)
           
protected  void getAttributeXML(java.lang.StringBuilder buf)
           
protected  void getBodyXML(java.lang.StringBuilder buf)
           
 java.lang.String getContentId()
          Returns the unique content guid for the partition that provided this response, if the request type supports its return.
 SimilarDocsRequest.DocSetSort getDocSetSort()
          Returns the doc set sort type
 atg.search.routing.command.search.DocSortCommon getDocSort()
          Returns the doc sort type
 SimilarDocsRequest.DocSortOrder getDocSortOrder()
          Returns the doc sort order
 java.lang.String getDocSortPred()
          echoed doc sort predicate
 java.lang.String getDocSortProp()
          Returns the doc sort property
 java.lang.String getDocSortPropDefault()
          Returns the default the docsort prop val
 DocSortPropVal getDocSortPropVal()
          Returns the docsort prop val
 DocumentSetConstraint getDocumentSets()
          Returns the docset constraint
 int getGroupCount()
          Returns the total number of answer groups in the results, regardless of paging.
 java.lang.String getInput()
          Returns the input to use for similarity comparison.
 int getMaxRelatedSets()
          Returns how many related document sets (or categories) should be returned for each document
 java.lang.String getMergeSettings()
          Returns the mergeSettings that were used in the query
 SimilarDocsRequest.Mode getMode()
          Returns the input mode
 ParserOptions getParserOptions()
          Returns text processing options
 java.util.List<ProcessedResponse> getProcessedPartitionResponses()
          Gets the processed the engine responses from individual partitions.
 ResponseTree getResponseTree()
          Returns the response tree
 float getThreshold()
          Returns the similarity threshold
 int getTop()
          Returns the maximum number of results to return
 boolean isDocSortCase()
          Indicates whether doc sort is case sensitive
protected  void merge(SearchRequest pSearchRequest, java.util.List<SearchResponse> pParsedResponses)
          This is Java merge.
 void setContentId(java.lang.String contentId)
          Sets the content id
 void setDocSetSort(SimilarDocsRequest.DocSetSort docSetSort)
          Sets the doc set sort type
 void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
          Sets the doc sort type
 void setDocSortCase(boolean pDocSortCase)
          Sets whether doc sort is case sensitive
 void setDocSortOrder(SimilarDocsRequest.DocSortOrder docSortOrder)
          Sets the doc sort order
 void setDocSortPred(java.lang.String docSortPred)
          Sets the doc sort predicate
 void setDocSortProp(java.lang.String docSortProp)
          Sets the doc sort property
 void setDocSortPropDefault(java.lang.String docSortPropDefault)
          Sets the default the docsort prop val
 void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
          Sets the docsort prop val
 void setDocumentSets(DocumentSetConstraint documentSets)
          Sets the docset constraint
 void setGroupCount(int pGroupCount)
          Sets the number of results before paging
 void setInput(java.lang.String input)
          Sets the input
 void setMaxRelatedSets(int maxRelatedSets)
          Sets how many related document sets (or categories) should be returned for each document
 void setMergeSettings(java.lang.String mergeSettings)
          Sets the mergeSettings that were used in the query
 void setMode(SimilarDocsRequest.Mode mode)
          Sets the input mode
 void setParserOptions(ParserOptions parserOptions)
          Sets text processing options
 void setResponseTree(ResponseTree responseTree)
          Sets the response tree
 void setThreshold(float threshold)
          Sets the similarity threshold
 void setTop(int top)
          Sets the Maximum number of results to return
 
Methods inherited from class atg.search.routing.command.search.SearchResultsResponse
addResult, addResults, getGroups, getHasMoreResults, getMinScore, getPageNum, getPageOffsetInfo, getPageSize, getResults, getResultsWithGrouping, getSpellingTerms, getSuggestedCategories, setMinScore, setPageNum, setPageOffsetInfo, setPageSize, setResults, setSpellingTerms, setSuggestedCategories
 
Methods inherited from class atg.search.routing.command.search.SearchResponse
addError, getBuildTimeMs, getErrors, getListableProperties, getMergeTimeMs, getParseTimeMs, getPartitionResponses, getRequestChainToken, getRequestIdentifier, getRequestTime, getSearchTargetNames, getTotalResponseTimeMs, handleMerge, isAllowListProperties, isLocalMergeEnabled, isMultiPartitionSearch, isOverloaded, isTimedOut, setAllowListProperties, setBuildTimeMs, setErrors, setListableProperties, setLocalMergeEnabled, setMergeTimeMs, setMultiPartitionSearch, setParseTimeMs, setPartitionResponses, setRequestChainToken, setRequestIdentifier, setRequestTime, setSearchTargetNames, setTotalResponseTimeMs, toString
 
Methods inherited from class atg.search.routing.command.SearchEngineCommandResponse
getNextResponse, getNonSAXParser, getRequestTag, getSearchEngineResponse, parseResponse, setNextResponse, setSearchEngineResponse
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toXML, toXML
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimilarDocsRequest.Response

public SimilarDocsRequest.Response(SimilarDocsRequest pRequest,
                                   java.util.List<SearchResponse> pParsedResponses)
                            throws atg.search.routing.MergeException
This uses Java Merge instead of the engine's merge. Invocation of this constructor results in a single merged Response. See merge(SearchRequest, java.util.List).

Parameters:
pRequest - original request
pParsedResponses - parsed responses
Throws:
atg.search.routing.MergeException

SimilarDocsRequest.Response

public SimilarDocsRequest.Response(atg.search.routing.command.SearchEngineResponse response)
Constructs a response from a single engine's response

Parameters:
response - a response from an engine
Method Detail

equals

public boolean equals(java.lang.Object pObject)
Overrides:
equals in class SearchResultsResponse

merge

protected void merge(SearchRequest pSearchRequest,
                     java.util.List<SearchResponse> pParsedResponses)
              throws atg.search.routing.MergeException
This is Java merge.

Specified by:
merge in class SearchResponse
Parameters:
pSearchRequest - the original request
pParsedResponses - pre-parsed responses
Throws:
atg.search.routing.MergeException - if the merge fails

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

getMergeSettings

public java.lang.String getMergeSettings()
Returns the mergeSettings that were used in the query

Returns:
mergeSettings that were used in the query

setMergeSettings

public void setMergeSettings(java.lang.String mergeSettings)
Sets the mergeSettings that were used in the query

Parameters:
mergeSettings - the mergeSettings that were used in the query

getGroupCount

public int getGroupCount()
Description copied from class: SearchResultsResponse
Returns the total number of answer groups in the results, regardless of paging. For requests that don't result in answer groups, such as SimilarDocsRequest, this is simply the number of results.

Specified by:
getGroupCount in interface PagedResponse
Specified by:
getGroupCount in class SearchResultsResponse
Returns:
total number of answer groups in the results, ignoring paging

setGroupCount

public void setGroupCount(int pGroupCount)
Sets the number of results before paging

Parameters:
pGroupCount - the number of results before paging

getMode

public SimilarDocsRequest.Mode getMode()
Returns the input mode

Returns:
the input mode

setMode

public void setMode(SimilarDocsRequest.Mode mode)
Sets the input mode

Parameters:
mode - the input mode

isDocSortCase

public boolean isDocSortCase()
Indicates whether doc sort is case sensitive

Returns:
whether doc sort is case sensitive

setDocSortCase

public void setDocSortCase(boolean pDocSortCase)
Sets whether doc sort is case sensitive

Parameters:
pDocSortCase - whether doc sort is case sensitive

getTop

public int getTop()
Returns the maximum number of results to return

Returns:
the maximum number of results to return

setTop

public void setTop(int top)
Sets the Maximum number of results to return

Parameters:
top - Maximum number of results to return

getThreshold

public float getThreshold()
Returns the similarity threshold

Returns:
the similarity threshold

setThreshold

public void setThreshold(float threshold)
Sets the similarity threshold

Parameters:
threshold - the similarity threshold

getMaxRelatedSets

public int getMaxRelatedSets()
Returns how many related document sets (or categories) should be returned for each document

Returns:
how many related document sets (or categories) should be returned for each document

setMaxRelatedSets

public void setMaxRelatedSets(int maxRelatedSets)
Sets how many related document sets (or categories) should be returned for each document

Parameters:
maxRelatedSets - how many related document sets (or categories) should be returned for each document

getInput

public java.lang.String getInput()
Returns the input to use for similarity comparison. 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

Returns:
the input

setInput

public void setInput(java.lang.String input)
Sets the input

Parameters:
input - the input

getProcessedPartitionResponses

public java.util.List<ProcessedResponse> getProcessedPartitionResponses()
Gets the processed the engine responses from individual partitions. This is only for multi-partition results. This is a very costly operation, and is made available only for debugging purposes. The original engine responses are normally not available due to the storage overhead. To enable their storage, call SearchEngineRequest.setKeepingResponseData(boolean).

Returns:
List of QueryRequest.Response, possibly empty but never null. Bad results will have null elements in the collection.

getContentId

public java.lang.String getContentId()
Description copied from class: SearchResponse
Returns the unique content guid for the partition that provided this response, if the request type supports its return. If not supported, null is returned.

Overrides:
getContentId in class SearchResponse
Returns:
content guid, if supported, otherwise null

setContentId

public void setContentId(java.lang.String contentId)
Sets the content id

Parameters:
contentId -

getDocSetSort

public SimilarDocsRequest.DocSetSort getDocSetSort()
Returns the doc set sort type

Returns:
the doc set sort type

setDocSetSort

public void setDocSetSort(SimilarDocsRequest.DocSetSort docSetSort)
Sets the doc set sort type

Parameters:
docSetSort - the doc set sort type

getDocSort

public atg.search.routing.command.search.DocSortCommon getDocSort()
Returns the doc sort type

Returns:
the doc sort type

setDocSort

public void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
Sets the doc sort type

Parameters:
docSort - the doc sort type

getDocSortProp

public java.lang.String getDocSortProp()
Returns the doc sort property

Returns:
the doc sort property

setDocSortProp

public void setDocSortProp(java.lang.String docSortProp)
Sets the doc sort property

Parameters:
docSortProp - the doc sort property

getDocSortPropVal

public DocSortPropVal getDocSortPropVal()
Returns the docsort prop val

Returns:
the docsort prop val

setDocSortPropVal

public void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
Sets the docsort prop val

Parameters:
pDocSortPropVal - the docsort prop val

getDocSortPropDefault

public java.lang.String getDocSortPropDefault()
Returns the default the docsort prop val

Returns:
the default the docsort prop val

setDocSortPropDefault

public void setDocSortPropDefault(java.lang.String docSortPropDefault)
Sets the default the docsort prop val

Parameters:
docSortPropDefault - the default the docsort prop val

getDocSortOrder

public SimilarDocsRequest.DocSortOrder getDocSortOrder()
Returns the doc sort order

Returns:
the doc sort order

setDocSortOrder

public void setDocSortOrder(SimilarDocsRequest.DocSortOrder docSortOrder)
Sets the doc sort order

Parameters:
docSortOrder - the doc sort order

getDocSortPred

public java.lang.String getDocSortPred()
echoed doc sort predicate

Returns:
echoed doc sort predicate

setDocSortPred

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

Parameters:
docSortPred - the doc sort predicate

getDocumentSets

public DocumentSetConstraint getDocumentSets()
Returns the docset constraint

Returns:
the docset constraint

setDocumentSets

public void setDocumentSets(DocumentSetConstraint documentSets)
Sets the docset constraint

Parameters:
documentSets - the docset constraint

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

getResponseTree

public ResponseTree getResponseTree()
Returns the response tree

Returns:
the response tree

setResponseTree

public void setResponseTree(ResponseTree responseTree)
Sets the response tree

Parameters:
responseTree - the response tree