Class DirectoryTaxonomyWriter.DiskOrdinalMap
DirectoryTaxonomyWriter.IOrdinalMap maintained on file system
Implements
Inherited Members
Namespace: Lucene.Net.Facet.Taxonomy.Directory
Assembly: Lucene.Net.Facet.dll
Syntax
public sealed class DirectoryTaxonomyWriter.DiskOrdinalMap : DirectoryTaxonomyWriter.IOrdinalMap
Constructors
DiskOrdinalMap(string)
Sole constructor.
Declaration
public DiskOrdinalMap(string tmpfile)
Parameters
Type | Name | Description |
---|---|---|
string | tmpfile |
Methods
AddDone()
Call AddDone() to say that all AddMapping(int, int) have been done. In some implementations this might free some resources.
Declaration
public void AddDone()
AddMapping(int, int)
Record a mapping.
Declaration
public void AddMapping(int origOrdinal, int newOrdinal)
Parameters
Type | Name | Description |
---|---|---|
int | origOrdinal | |
int | newOrdinal |
GetMap()
Return the map from the taxonomy's original (consecutive) ordinals to the new taxonomy's ordinals. If the map has to be read from disk and ordered appropriately, it is done when getMap() is called. getMap() should only be called once, and only when the map is actually needed. Calling it will also free all resources that the map might be holding (such as temporary disk space), other than the returned int[].
Declaration
public int[] GetMap()
Returns
Type | Description |
---|---|
int[] |
SetSize(int)
Set the size of the map. This MUST be called before AddMapping(int, int).
It is assumed (but not verified) that AddMapping(int, int) will then be
called exactly 'size' times, with different origOrdinals
between 0
and size - 1.
Declaration
public void SetSize(int taxonomySize)
Parameters
Type | Name | Description |
---|---|---|
int | taxonomySize |