Package org.terrier.structures.indexing
Class CompressionFactory.CompressionConfiguration
- java.lang.Object
-
- org.terrier.structures.indexing.CompressionFactory.CompressionConfiguration
-
- Direct Known Subclasses:
CompressionFactory.BitCompressionConfiguration
,CompressionFactory.BitIdOnlyCompressionConfiguration
- Enclosing class:
- CompressionFactory
public abstract static class CompressionFactory.CompressionConfiguration extends java.lang.Object
A configuration object used by the disk indexers for configuring the compression for direct and inverted files.- Since:
- 4.0
- Author:
- Craig Macdonald
-
-
Field Summary
Fields Modifier and Type Field Description protected int
fieldCount
number of fieldsprotected java.lang.String[]
fieldNames
name of fieldsprotected int
hasBlocks
is there blocks: 0 (no), 1 (yes: 1 block per token), more than 1 (blocks are for more than one token)protected int
maxBlocks
maximum number of blocksprotected java.lang.String
structureName
-
Constructor Summary
Constructors Constructor Description CompressionConfiguration(java.lang.String structureName, java.lang.String[] fieldNames, int hasBlocks, int maxBlocks)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Class<? extends IterablePosting>
getPostingIteratorClass()
What is the posting iterator class for this structureabstract AbstractPostingOutputStream
getPostingOutputStream(java.lang.String filename)
Write a file of postings to the given locationabstract java.lang.Class<? extends PostingIndex<?>>
getStructureClass()
What is the structure class for this structureabstract java.lang.String
getStructureFileExtension()
What is the file extension for this structure.abstract java.lang.Class<? extends java.util.Iterator<IterablePosting>>
getStructureInputStreamClass()
What is the input stream class for this structurevoid
writeIndexProperties(PropertiesIndex index, java.lang.String pointerSourceStream)
Update the index's properties for this structure
-
-
-
Field Detail
-
fieldCount
protected int fieldCount
number of fields
-
fieldNames
protected java.lang.String[] fieldNames
name of fields
-
hasBlocks
protected int hasBlocks
is there blocks: 0 (no), 1 (yes: 1 block per token), more than 1 (blocks are for more than one token)
-
maxBlocks
protected int maxBlocks
maximum number of blocks
-
structureName
protected java.lang.String structureName
-
-
Method Detail
-
getPostingOutputStream
public abstract AbstractPostingOutputStream getPostingOutputStream(java.lang.String filename)
Write a file of postings to the given location
-
getPostingIteratorClass
public abstract java.lang.Class<? extends IterablePosting> getPostingIteratorClass()
What is the posting iterator class for this structure
-
getStructureClass
public abstract java.lang.Class<? extends PostingIndex<?>> getStructureClass()
What is the structure class for this structure
-
getStructureInputStreamClass
public abstract java.lang.Class<? extends java.util.Iterator<IterablePosting>> getStructureInputStreamClass()
What is the input stream class for this structure
-
getStructureFileExtension
public abstract java.lang.String getStructureFileExtension()
What is the file extension for this structure. Usually ".bf" for BitFile and ".if" for files containing compressed integers
-
writeIndexProperties
public void writeIndexProperties(PropertiesIndex index, java.lang.String pointerSourceStream)
Update the index's properties for this structure
-
-