Class VariableInt32BlockIndexOutput
Abstract base class that writes variable-size blocks of ints to an Lucene.Net.Store.IndexOutput. While this is a simple approach, a more performant approach would directly create an impl of Int32IndexOutput inside Lucene.Net.Store.Directory. Wrapping a generic Lucene.Net.Store.IndexOutput will likely cost performance.
NOTE: This was VariableIntBlockIndexOutput in LuceneNote
This API is experimental and might change in incompatible ways in the next release.
Implements
Inherited Members
Namespace: Lucene.Net.Codecs.IntBlock
Assembly: Lucene.Net.Codecs.dll
Syntax
public abstract class VariableInt32BlockIndexOutput : Int32IndexOutput, IDisposable
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
Constructors
VariableInt32BlockIndexOutput(IndexOutput, int)
NOTE: maxBlockSize
must be the maximum block size
plus the max non-causal lookahead of your codec. EG Simple9
requires lookahead=1 because on seeing the Nth value
it knows it must now encode the N-1 values before it.
Declaration
protected VariableInt32BlockIndexOutput(IndexOutput output, int maxBlockSize)
Parameters
Type | Name | Description |
---|---|---|
IndexOutput | output | |
int | maxBlockSize |
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
Fields
m_output
Abstract base class that writes variable-size blocks of ints to an Lucene.Net.Store.IndexOutput. While this is a simple approach, a more performant approach would directly create an impl of Int32IndexOutput inside Lucene.Net.Store.Directory. Wrapping a generic Lucene.Net.Store.IndexOutput will likely cost performance.
NOTE: This was VariableIntBlockIndexOutput in LuceneNote
This API is experimental and might change in incompatible ways in the next release.
Declaration
protected readonly IndexOutput m_output
Field Value
Type | Description |
---|---|
IndexOutput |
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
Methods
Add(int)
Called one value at a time. Return the number of buffered input values that have been written to out.
Declaration
protected abstract int Add(int value)
Parameters
Type | Name | Description |
---|---|---|
int | value |
Returns
Type | Description |
---|---|
int |
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
Dispose(bool)
Abstract base class that writes variable-size blocks of ints to an Lucene.Net.Store.IndexOutput. While this is a simple approach, a more performant approach would directly create an impl of Int32IndexOutput inside Lucene.Net.Store.Directory. Wrapping a generic Lucene.Net.Store.IndexOutput will likely cost performance.
NOTE: This was VariableIntBlockIndexOutput in LuceneNote
This API is experimental and might change in incompatible ways in the next release.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
Overrides
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
GetIndex()
If you are indexing the primary output file, call this and interact with the returned IndexWriter.
Declaration
public override Int32IndexOutput.Index GetIndex()
Returns
Type | Description |
---|---|
Int32IndexOutput.Index |
Overrides
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.
Write(int)
Write an int to the primary file. The value must be
= 0.
Declaration
public override void Write(int v)
Parameters
Type | Name | Description |
---|---|---|
int | v |
Overrides
Remarks
Naive int block API that writes vInts. This is expected to give poor performance; it's really only for testing the pluggability. One should typically use pfor instead.