org.terrier.structures
Class BitPostingIndex

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

public class BitPostingIndex
extends 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  Constructor<? extends IterablePosting> postingConstructor
           
protected  Class<? extends IterablePosting> postingImplementation
           
 
Constructor Summary
  BitPostingIndex(Index _index, String _structureName, Class<? extends IterablePosting> _postingImplementation)
          Constructs an instance of the BitPostingIndex.
protected BitPostingIndex(String filename, byte fileCount, Class<? extends IterablePosting> _postingImplementation, String _dataSource)
          Deprecated. 
protected BitPostingIndex(String filename, byte fileCount, Class<? extends IterablePosting> _postingImplementation, String _dataSource, int _fieldCount)
           
 
Method Summary
 void close()
          
 IterablePosting getPostings(BitIndexPointer pointer)
          Get the posting given a pointer
protected  void setPostingImplementation(Class<? extends IterablePosting> postingClass)
           
 
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 Class<? extends IterablePosting> postingImplementation

postingConstructor

protected Constructor<? extends IterablePosting> postingConstructor

index

protected Index index

fieldCount

protected int fieldCount
Constructor Detail

BitPostingIndex

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

Parameters:
_index -
_structureName -
_postingImplementation -
Throws:
IOException

BitPostingIndex

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

Throws:
IOException

BitPostingIndex

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

setPostingImplementation

protected void setPostingImplementation(Class<? extends IterablePosting> postingClass)
                                 throws IOException
Throws:
IOException

getPostings

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

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

close

public void close()

Specified by:
close in interface Closeable


Terrier 3.6. Copyright © 2004-2011 University of Glasgow