|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.search.routing.command.SearchXMLObject atg.search.routing.command.SearchEngineRequestImpl atg.search.routing.command.search.SearchRequest atg.search.routing.command.search.SimilarDocsRequest
public class SimilarDocsRequest
Similar docs request.
Required: input setInput(String)
Optional: everything else
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.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 |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public SimilarDocsRequest()
Method Detail |
---|
public java.lang.String[] getDocProps()
setDocProps(String[])
public void setDocProps(java.lang.String[] docProps)
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.public void setDocPropsString(java.lang.String docProps)
docProps
- setDocProps(String[])
public java.lang.String getDocPropsString()
getDocProps()
public atg.search.routing.command.search.DocSortCommon getDocSort()
public void setDocSort(atg.search.routing.command.search.DocSortCommon docSort)
docSort
- specifies how the result groups will be sorted, and can be one of the following:
public SimilarDocsRequest.DocSortOrder getDocSortOrder()
public void setDocSortOrder(SimilarDocsRequest.DocSortOrder docSortOrder)
setDocSort(atg.search.routing.command.search.DocSortCommon)
, setDocSortOrder(atg.search.routing.command.search.SimilarDocsRequest.DocSortOrder)
, setDocSortProp(java.lang.String)
, setDocSortPropDefault(java.lang.String)
.
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.public java.lang.String getDocSortProp()
public void setDocSortProp(java.lang.String docSortProp)
setDocSort(atg.search.routing.command.search.DocSortCommon)
, setDocSortOrder(atg.search.routing.command.search.SimilarDocsRequest.DocSortOrder)
, setDocSortProp(java.lang.String)
, setDocSortPropDefault(java.lang.String)
.
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.public DocSortPropVal getDocSortPropVal()
public void setDocSortPropVal(DocSortPropVal pDocSortPropVal)
pDocSortPropVal
- public java.lang.String getDocSortPropDefault()
setDocSort(atg.search.routing.command.search.DocSortCommon)
, setDocSortOrder(atg.search.routing.command.search.SimilarDocsRequest.DocSortOrder)
, setDocSortProp(java.lang.String)
, setDocSortPropDefault(java.lang.String)
.
public void setDocSortPropDefault(java.lang.String docSortPropDefault)
setDocSort(atg.search.routing.command.search.DocSortCommon)
, setDocSortOrder(atg.search.routing.command.search.SimilarDocsRequest.DocSortOrder)
, setDocSortProp(java.lang.String)
, setDocSortPropDefault(java.lang.String)
.
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.public java.lang.String getDocSortPred()
public void setDocSortPred(java.lang.String docSortPred)
docSortPred
- predicate expressionpublic ParserOptions getParserOptions()
public void setParserOptions(ParserOptions parserOptions)
parserOptions
- text processing optionspublic DocumentSetConstraint getDocumentSetConstraints()
public void setDocumentSetConstraints(DocumentSetConstraint documentSetConstraints)
documentSetConstraints
- document set constraintspublic DocumentSetConstraint getRefineConstraints()
public void setRefineConstraints(DocumentSetConstraint pRefineConstraints)
pRefineConstraints
- refinement constraintspublic java.lang.Boolean getDocSortCase()
public void setDocSortCase(java.lang.Boolean pDocSortCase)
pDocSortCase
- case-sensitivity for string-based docSort modes, e.g. strprop, title, addressprotected void getAttributeXML(java.lang.StringBuilder buf) throws atg.search.routing.command.IncompleteCommandException
getAttributeXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
protected void getBodyXML(java.lang.StringBuilder buf) throws atg.search.routing.command.IncompleteCommandException
getBodyXML
in class atg.search.routing.command.SearchXMLObject
atg.search.routing.command.IncompleteCommandException
public java.lang.Integer getMaxRelatedSets()
public void setMaxRelatedSets(java.lang.Integer maxRelatedSets)
maxRelatedSets
- specifies the maximum number of related sets to return per document. The default is
1000.public java.lang.String[] getRelatedSets()
public void setRelatedSets(java.lang.String[] relatedSets)
setMaxRelatedSets(Integer)
and this.
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.public void setRelatedSetsString(java.lang.String pRelSets)
pRelSets
- setRelatedSets(String[])
public java.lang.String getRelatedSetsString()
getRelatedSets()
public java.lang.Boolean getFastPaging()
PagedRequest
getFastPaging
in interface PagedRequest
public void setFastPaging(java.lang.Boolean pFastPaging)
PagedRequest
setFastPaging
in interface PagedRequest
pFastPaging
- true to enable fast pagingpublic java.lang.Integer getPageSize()
PagedRequest
getPageSize
in interface PagedRequest
public void setPageSize(java.lang.Integer pageSize)
PagedRequest
setPageSize
in interface PagedRequest
pageSize
- number of results that should be returned per pagepublic java.lang.Integer getPageNum()
PagedRequest
getPageNum
in interface PagedRequest
public void setPageNum(java.lang.Integer pageNum)
PagedRequest
setPageNum
in interface PagedRequest
pageNum
- specifies which 0-based page number to return, starting from the first page 0 and so on.public java.lang.String getInput()
public void setInput(java.lang.String input)
input
- Input to use for similarity comparison.public SimilarDocsRequest.Mode getMode()
public void setMode(SimilarDocsRequest.Mode pMode)
pMode
- input modepublic java.lang.String[] getDocFlags()
setDocFlagsString(String)
public void setDocFlags(java.lang.String[] pDocFlags)
pDocFlags
- array of doc flagspublic void setDocFlagsString(java.lang.String pDocFlags)
pDocFlags
- setDocFlags(String[])
public java.lang.String getDocFlagsString()
getDocFlags()
public java.lang.String[] getTextProps()
public void setTextProps(java.lang.String[] pTextProps)
pTextProps
- array of text fields, such as role:displayNamepublic void setTextPropsString(java.lang.String pTextProps)
pTextProps
- comma-delimited list of text propertiessetTextProps(String[])
public java.lang.String getTextPropsString()
getTextProps()
public java.lang.Integer getTop()
public void setTop(java.lang.Integer top)
top
- specifies the maximum number of results to return. The default value is 10.public java.lang.Float getThreshold()
public void setThreshold(java.lang.Float threshold)
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.public SimilarDocsRequest.DocSetSort getDocSetSort()
public void setDocSetSort(SimilarDocsRequest.DocSetSort docSetSort)
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.public void setPageOffsetInfo(atg.search.routing.command.search.PageOffsetInfo pPageOffsetInfo)
PagedRequest
setPageOffsetInfo
in interface PagedRequest
pPageOffsetInfo
- page offset infopublic atg.search.routing.command.search.PageOffsetInfo getPageOffsetInfo()
PagedRequest
getPageOffsetInfo
in interface PagedRequest
public int getRequestId()
SearchRequest
SearchRequest.QUERY
, SearchRequest.BROWSE
, etc.
getRequestId
in class SearchRequest
public SearchResponse processSearchResponse(atg.search.routing.command.SearchEngineResponse response) throws atg.search.routing.command.RoutingCommandException
SearchRequest
processSearchResponse
in class SearchRequest
response
- the engine response
atg.search.routing.command.RoutingCommandException
SearchRequest.processResponse(atg.search.routing.command.SearchEngineResponse)
protected SearchResponse doMerge(java.util.List<SearchResponse> pParsedResponses) throws atg.search.routing.MergeException
SearchRequest
doMerge
in class SearchRequest
pParsedResponses
- parsed responses
atg.search.routing.MergeException
public static SimilarDocsRequest valueOf(java.lang.String pRequestXml)
pRequestXml
- request xml.
public static SimilarDocsRequest valueOf(java.lang.String pRequestXml, SearchRequest compRequest)
pRequestXml
- similardocs xmlcompRequest
- an existing (SimilarDocs) request object to combine with the provide xml, typically
initalized as a nucleus component
protected static SimilarDocsRequest fromXml(atg.search.routing.utils.SearchMessageParser xml, SearchRequest compRequest)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |