com.bigdata.search
Class Hit<V extends Comparable<V>>

java.lang.Object
  extended by com.bigdata.search.Hit<V>
All Implemented Interfaces:
IHit<V>, Comparable<Hit<V>>

public class Hit<V extends Comparable<V>>
extends Object
implements IHit<V>, Comparable<Hit<V>>

Metadata about a search result.

Version:
$Id: Hit.java 6234 2012-03-31 09:33:43Z mrpersonick $
Author:
Bryan Thompson

Method Summary
 void add(String term, double weight)
          Adds another component to the cosine.
 int compareTo(Hit<V> o)
          Sorts Hits into decreasing cosine order with ties broken by the the docId.
 double getCosine()
          The computed relevance score.
 V getDocId()
          The document identifier associated with the search result.
 int getRank()
          The rank of this hit within the context of the search.
 int getTermCount()
          The #of terms for which a hit was reported for this document.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTermCount

public int getTermCount()
The #of terms for which a hit was reported for this document.


getCosine

public double getCosine()
Description copied from interface: IHit
The computed relevance score.

Specified by:
getCosine in interface IHit<V extends Comparable<V>>

getRank

public int getRank()
Description copied from interface: IHit
The rank of this hit within the context of the search.

Specified by:
getRank in interface IHit<V extends Comparable<V>>

getDocId

public V getDocId()
Description copied from interface: IHit
The document identifier associated with the search result.

Specified by:
getDocId in interface IHit<V extends Comparable<V>>

add

public void add(String term,
                double weight)
Adds another component to the cosine.


toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Hit<V> o)
Sorts Hits into decreasing cosine order with ties broken by the the docId.

Specified by:
compareTo in interface Comparable<Hit<V extends Comparable<V>>>


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.