Package org.terrier.structures.indexing
Class FieldDocumentPostingList
- java.lang.Object
- 
- org.terrier.structures.indexing.DocumentPostingList
- 
- org.terrier.structures.indexing.FieldDocumentPostingList
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- org.apache.hadoop.io.Writable
 - Direct Known Subclasses:
- BlockFieldDocumentPostingList
 
 public class FieldDocumentPostingList extends DocumentPostingList FieldDocumentPostingList class- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.terrier.structures.indexing.DocumentPostingListDocumentPostingList.postingIterator
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected gnu.trove.TObjectIntHashMap<java.lang.String>[]field_occurrencesoccurrences of terms in fieldsprotected intfieldCountnumber of fieldsprotected int[]fieldLengthslength of each field- 
Fields inherited from class org.terrier.structures.indexing.DocumentPostingListAVG_DOCUMENT_UNIQUE_TERMS, documentLength, occurrences
 
- 
 - 
Constructor SummaryConstructors Constructor Description FieldDocumentPostingList(int NUM_FIELDS)constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all postings from this documentDocumentIndexEntrygetDocumentStatistics()Return a DocumentIndexEntry for this documentint[]getFieldFrequencies(java.lang.String term)Return the frequencies of the specified term in all of the fieldsint[][]getPostings(TermCodes termCodes)Returns the postings suitable to be written into the direct index.voidinsert(int tf, java.lang.String term, int fieldNum)Insert a term into the posting list of this document, in the given field, with the given frequencyvoidinsert(int tf, java.lang.String term, int[] fieldNums)Insert a term into the posting list of this document, in the given fieldvoidinsert(java.lang.String term, int fieldNum)Insert a term into the posting list of this document, in the given fieldvoidinsert(java.lang.String term, int[] fieldNums)Insert a term into the posting list of this document, in the given fieldprotected IterablePostingmakePostingIterator(java.lang.String[] _terms, int[] termIds)voidreadFields(java.io.DataInput in)voidwrite(java.io.DataOutput out)- 
Methods inherited from class org.terrier.structures.indexing.DocumentPostingListforEachTerm, getDocumentLength, getFrequency, getNumberOfPointers, getPostings2, insert, insert, termSet
 
- 
 
- 
- 
- 
Method Detail- 
insertpublic void insert(int tf, java.lang.String term, int fieldNum)Insert a term into the posting list of this document, in the given field, with the given frequency- Parameters:
- tf- frequency of the term in this document
- term- String form of term
- fieldNum- fieldNumber it occurs in
 
 - 
insertpublic void insert(java.lang.String term, int fieldNum)Insert a term into the posting list of this document, in the given field- Parameters:
- term- the Term being inserted
- fieldNum- the id of the field that the term was found in
 
 - 
insertpublic void insert(java.lang.String term, int[] fieldNums)Insert a term into the posting list of this document, in the given field- Parameters:
- term- the Term being inserted
- fieldNums- the ids of the fields that the term was found in, starting from 0
 
 - 
insertpublic void insert(int tf, java.lang.String term, int[] fieldNums)Insert a term into the posting list of this document, in the given field- Parameters:
- tf- the frequency of the term
- term- the Term being inserted
- fieldNums- the ids of the fields that the term was found in
 
 - 
getFieldFrequenciespublic int[] getFieldFrequencies(java.lang.String term) Return the frequencies of the specified term in all of the fields
 - 
getDocumentStatisticspublic DocumentIndexEntry getDocumentStatistics() Return a DocumentIndexEntry for this document- Overrides:
- getDocumentStatisticsin class- DocumentPostingList
 
 - 
clearpublic void clear() Description copied from class:DocumentPostingListRemoves all postings from this document- Overrides:
- clearin class- DocumentPostingList
 
 - 
getPostingspublic int[][] getPostings(TermCodes termCodes) Description copied from class:DocumentPostingListReturns the postings suitable to be written into the direct index. During this, TermIds are assigned.- Overrides:
- getPostingsin class- DocumentPostingList
 
 - 
makePostingIteratorprotected IterablePosting makePostingIterator(java.lang.String[] _terms, int[] termIds) - Overrides:
- makePostingIteratorin class- DocumentPostingList
 
 - 
readFieldspublic void readFields(java.io.DataInput in) throws java.io.IOException- Specified by:
- readFieldsin interface- org.apache.hadoop.io.Writable
- Overrides:
- readFieldsin class- DocumentPostingList
- Throws:
- java.io.IOException
 
 - 
writepublic void write(java.io.DataOutput out) throws java.io.IOException- Specified by:
- writein interface- org.apache.hadoop.io.Writable
- Overrides:
- writein class- DocumentPostingList
- Throws:
- java.io.IOException
 
 
- 
 
-