Terrier IR Platform
1.1.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[][] getPostings()
          returns the postings suitable to be written into the block direct index
 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, getNumberOfPointers, insert, insert
 
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


getPostings

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

Overrides:
getPostings in class DocumentPostingList

Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow