Class Posting
java.lang.Object
es.uam.eps.ir.relison.content.index.structure.Posting
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Posting>
- Direct Known Subclasses:
PositionalPosting
public class Posting extends java.lang.Object implements java.lang.Comparable<Posting>, java.io.Serializable
Posting in an index.
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Posting(int id, long f)
Constructor. -
Method Summary
-
Field Details
-
Constructor Details
-
Posting
public Posting(int id, long f)Constructor.- Parameters:
id
- document identifier.f
- frequency of the term in the document.
-
-
Method Details
-
getDocID
public int getDocID()Obtains the document identifier.- Returns:
- the identifier.
-
getFreq
public long getFreq()Obtains the frequency of the term in the document.- Returns:
- the frequency of the term in the document.
-
compareTo
Compares two postings (by docId)- Specified by:
compareTo
in interfacejava.lang.Comparable<Posting>
- Parameters:
p
- the posting- Returns:
- this.docId - p.getDocId
-