|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fxpal.search.DocumentMatch
public class DocumentMatch
An instance of DocumentMatch represents a document in a ranked list
of results from a query. Instances are typically created by an Searcher
based on the raw search results. The purpose of this class is to abstract search
engine-specific postings.
Instances carry enough state to recover the retrieved document in the context of
a particular search engine. They also include the score assigned by the ranking
algorithm and a RelevanceRating that can be assigned manually. RelevanceRatings
are used for relevance feedback by the RevertedQuerying
object. By default, a DocumentMatch is neither RELEVANT nor
NON_RELEVANT; its value is shown as NOT_JUDGED.
| Nested Class Summary | |
|---|---|
static class |
DocumentMatch.RawScoreComparator
Implements Comparator for DocumentMatch instances
based on raw scores. |
| Constructor Summary | |
|---|---|
DocumentMatch(java.lang.String externalId,
long internalId,
float rawScore)
Creates a new instance of DocumentMatch with the specified information. |
|
DocumentMatch(java.lang.String externalId,
long internalId,
float rawScore,
float score,
RelevanceRating rating)
Creates a new instance of DocumentMatch with the specified information, include a relevance judgment. |
|
| Method Summary | |
|---|---|
java.lang.String |
getDocid()
Gets the document id of the match. |
long |
getInternalId()
Gets the internal id of the retrieved document. |
float |
getRawScore()
Gets the score that was assigned to the document in response to a query. |
RelevanceRating |
getRelevanceRating()
Gets the relevance rating |
float |
getScore()
Gets the score that was assigned to the document in response to a query. |
boolean |
isNotRelevant()
Tests whether the associated document has been marked as non-relevant. |
boolean |
isRelevant()
Tests whether the associated document has been marked as relevant. |
void |
setRawScore(float value)
Sets the score associated with the document. |
void |
setRelevanceRating(RelevanceRating r)
Assigns a RelevanceRating value to the instance. |
void |
setScore(float value)
Sets the score associated with the document. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentMatch(java.lang.String externalId,
long internalId,
float rawScore)
externalId - External id of the associated documentinternalId - Internal id of the associated documentrawScore - Score assigned to the associated document
public DocumentMatch(java.lang.String externalId,
long internalId,
float rawScore,
float score,
RelevanceRating rating)
externalId - External id of the associated documentinternalId - Internal id of the associated documentrawScore - Score assigned to the associated documentscore - Normalized scorerating - RelevanceRating assigned to the associated document| Method Detail |
|---|
public java.lang.String getDocid()
public long getInternalId()
public float getScore()
public void setScore(float value)
RankedList. May also be used in conjunction with
setRelevanceRating(com.fxpal.search.RelevanceRating) when setting up input for a relevance
feedback query.
value - New scorepublic float getRawScore()
public void setRawScore(float value)
value - New scorepublic RelevanceRating getRelevanceRating()
RelevanceRating associated with the retrieved documentpublic void setRelevanceRating(RelevanceRating r)
RelevanceRating value to the instance.
May be used in conjunction with setScore(float) to set the strength
of relevance for pseudo-relevance feedback or relevance feedback.
r - User-assigned ratingpublic boolean isRelevant()
public boolean isNotRelevant()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||