Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures.indexing
Class BlockDocumentPostingList

java.lang.Object
  extended by uk.ac.gla.terrier.structures.indexing.DocumentPostingList
      extended by uk.ac.gla.terrier.structures.indexing.BlockDocumentPostingList

public class BlockDocumentPostingList
extends DocumentPostingList

Represents the postings of one document, and saves block (term position) information. Uses HashMaps internally.

Properties:

See Also:
DocumentPostingList

Constructor Summary
BlockDocumentPostingList()
          Instantiate a new block document posting list.
BlockDocumentPostingList(int fieldCount)
          Instantiate a new block document posting list.
 
Method Summary
 int[] getBlocks(java.lang.String term)
           
 int[][] getPostings()
          returns the postings suitable to be written into the block direct index
 void insert(int tf, java.lang.String t, int[] fieldIds, int blockId)
          Insert a term into this document tf times, occurs at given block id, and in the given fields
 void insert(java.lang.String t, int blockId)
          Insert a term into this document, occurs at given block id
 void insert(java.lang.String t, int[] fieldIds, int blockId)
          Insert a term into this document, occurs at given block id, and in the given fields
 void insert(java.lang.String t, int fieldId, int blockId)
          Insert a term into this document, occurs at given block id, and in the given field
 
Methods inherited from class uk.ac.gla.terrier.structures.indexing.DocumentPostingList
clear, getDocumentLength, getFields, getFrequency, getNumberOfPointers, insert, insert, insert, insert, insert, termSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockDocumentPostingList

public BlockDocumentPostingList()
Instantiate a new block document posting list. Saves block information, but no fields


BlockDocumentPostingList

public BlockDocumentPostingList(int fieldCount)
Instantiate a new block document posting list. Saves block information, with the specified number of fields

Method Detail

insert

public void insert(java.lang.String t,
                   int blockId)
Insert a term into this document, occurs at given block id

Overrides:
insert in class DocumentPostingList
Parameters:
t - the Term being inserted
blockId - the id of the field that the term was found in

insert

public void insert(java.lang.String t,
                   int fieldId,
                   int blockId)
Insert a term into this document, occurs at given block id, and in the given field


insert

public void insert(java.lang.String t,
                   int[] fieldIds,
                   int blockId)
Insert a term into this document, occurs at given block id, and in the given fields


insert

public void insert(int tf,
                   java.lang.String t,
                   int[] fieldIds,
                   int blockId)
Insert a term into this document tf times, occurs at given block id, and in the given fields


getBlocks

public int[] getBlocks(java.lang.String term)

getPostings

public int[][] getPostings()
returns the postings suitable to be written into the block direct index

Overrides:
getPostings in class DocumentPostingList

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow