atg.search.routing.command.search
Interface Groupable

All Known Implementing Classes:
CategoryDocument, Result

public interface Groupable

Groupable results can be grouped by property or by document. A groupable result should implement this interface. This interface allows for common merge code. It is not used outside of merge


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
          Returns a new internal answer group for this result.
 int getAnswerGroup()
          Returns the answer group for this result
 java.lang.String getContentId()
          Returns the content id of the partition that this result came from
 Document getDocument()
          Returns the associated document
 int getOriginalAnswerGroup()
          Returns the original answer group, prior to the merge
 float getScore()
          Returns the result's score.
 java.lang.String getSortProp()
          When the request specified group-by-property, this returns the sort property
 void setAnswerGroup(int pAnswerGroup)
          Sets this result's answer group
 void setContentId(java.lang.String pContentId)
          Sets the content id of the partition that this result came from
 void setId(int pId)
          An optional result id.
 void setScore(float pScore)
          Sets the score.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

createNewAnswerGroup

atg.search.routing.command.search.InternalAnswerGroup createNewAnswerGroup()
Returns a new internal answer group for this result. Only used internally.

Returns:
a new internal answer group

getSortProp

java.lang.String getSortProp()
When the request specified group-by-property, this returns the sort property

Returns:
sort property

getAnswerGroup

int getAnswerGroup()
Returns the answer group for this result

Returns:
the answer group for this result

setAnswerGroup

void setAnswerGroup(int pAnswerGroup)
Sets this result's answer group

Parameters:
pAnswerGroup - the answer group

getOriginalAnswerGroup

int getOriginalAnswerGroup()
Returns the original answer group, prior to the merge

Returns:
the original answer group, prior to the merge

getDocument

Document getDocument()
Returns the associated document

Returns:
the associated document

setId

void setId(int pId)
An optional result id. Not all groupable results use this

Parameters:
pId -

getScore

float getScore()
Returns the result's score.

Returns:
the score

setScore

void setScore(float pScore)
Sets the score. Scores are rounded during merge.

Parameters:
pScore - the score

getContentId

java.lang.String getContentId()
Returns the content id of the partition that this result came from

Returns:
the content id of the partition that this result came from

setContentId

void setContentId(java.lang.String pContentId)
Sets the content id of the partition that this result came from

Parameters:
pContentId - the content id of the partition that this result came from