Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DirectoryTaxonomyWriter.DiskOrdinalMap

    DirectoryTaxonomyWriter.IOrdinalMap maintained on file system

    Inheritance
    object
    DirectoryTaxonomyWriter.DiskOrdinalMap
    Implements
    DirectoryTaxonomyWriter.IOrdinalMap
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    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

    Implements

    DirectoryTaxonomyWriter.IOrdinalMap
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.