com.sun.labs.minion
Interface ResultAccessor

All Known Implementing Classes:
ArrayGroup.DocIterator, NegativeGroup.NegativeDocIterator, ResultImpl, ScoredGroup.ScoredDocIterator

public interface ResultAccessor

An interface for accessing the values associated with a search result that is being considered for inclusion in a list of results returned to a user.

See Also:
ResultsFilter

Method Summary
 java.util.List<java.lang.Object> getField(java.lang.String field)
          Gets the values associated with the given saved field for the current result
 java.lang.String getKey()
          Gets the key of the result under consideration
 float getScore()
          Gets the score for the result under consideration.
 java.lang.Object getSingleFieldValue(java.lang.String field)
          Gets a single value for the given saved field for the current result
 

Method Detail

getScore

float getScore()
Gets the score for the result under consideration.


getKey

java.lang.String getKey()
Gets the key of the result under consideration

Returns:
the key of the current result

getField

java.util.List<java.lang.Object> getField(java.lang.String field)
Gets the values associated with the given saved field for the current result

Parameters:
field - the field whose values we want
Returns:
the values for this field. If the current result does not have any saved values for this field, an empty list will be returned.

getSingleFieldValue

java.lang.Object getSingleFieldValue(java.lang.String field)
Gets a single value for the given saved field for the current result

Parameters:
field - the field whose value we want
Returns:
the field value for the current result, or null if this result does not have a value saved for this field