org.terrier.structures
Class BitPostingIndex

java.lang.Object
  extended by org.terrier.structures.BitPostingIndex
All Implemented Interfaces:
java.io.Closeable, PostingIndex<BitIndexPointer>
Direct Known Subclasses:
DirectIndex, InvertedIndex

public class BitPostingIndex
extends java.lang.Object
implements PostingIndex<BitIndexPointer>

Class for various bit compressed index implementations, including parents to current DirectIndex and InvertedIndex implementations. Index properties:

Since:
3.0

Field Summary
protected  int fieldCount
           
protected  BitInSeekable[] file
           
protected  Index index
           
protected  java.lang.reflect.Constructor<? extends IterablePosting> postingConstructor
           
protected  java.lang.Class<? extends IterablePosting> postingImplementation
           
 
Constructor Summary
  BitPostingIndex(Index _index, java.lang.String _structureName, java.lang.Class<? extends IterablePosting> _postingImplementation)
          Constructs an instance of the BitPostingIndex.
protected BitPostingIndex(java.lang.String filename, byte fileCount, java.lang.Class<? extends IterablePosting> _postingImplementation, java.lang.String _dataSource)
          Deprecated. 
protected BitPostingIndex(java.lang.String filename, byte fileCount, java.lang.Class<? extends IterablePosting> _postingImplementation, java.lang.String _dataSource, int _fieldCount)
           
 
Method Summary
 void close()
          
 IterablePosting getPostings(BitIndexPointer pointer)
          Get the posting given a pointer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected BitInSeekable[] file

postingImplementation

protected java.lang.Class<? extends IterablePosting> postingImplementation

postingConstructor

protected java.lang.reflect.Constructor<? extends IterablePosting> postingConstructor

index

protected Index index

fieldCount

protected int fieldCount
Constructor Detail

BitPostingIndex

public BitPostingIndex(Index _index,
                       java.lang.String _structureName,
                       java.lang.Class<? extends IterablePosting> _postingImplementation)
                throws java.io.IOException
Constructs an instance of the BitPostingIndex.

Parameters:
_index -
_structureName -
_postingImplementation -
Throws:
java.io.IOException

BitPostingIndex

@Deprecated
protected BitPostingIndex(java.lang.String filename,
                                     byte fileCount,
                                     java.lang.Class<? extends IterablePosting> _postingImplementation,
                                     java.lang.String _dataSource)
                   throws java.io.IOException
Deprecated. 

Throws:
java.io.IOException

BitPostingIndex

protected BitPostingIndex(java.lang.String filename,
                          byte fileCount,
                          java.lang.Class<? extends IterablePosting> _postingImplementation,
                          java.lang.String _dataSource,
                          int _fieldCount)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getPostings

public IterablePosting getPostings(BitIndexPointer pointer)
                            throws java.io.IOException
Get the posting given a pointer

Specified by:
getPostings in interface PostingIndex<BitIndexPointer>
Throws:
java.io.IOException

close

public void close()

Specified by:
close in interface java.io.Closeable


Terrier 3.5. Copyright © 2004-2011 University of Glasgow