Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class SimpleTextTermVectorsWriter

    Writes plain-text term vectors.

    FOR RECREATIONAL USE ONLY

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    TermVectorsWriter
    SimpleTextTermVectorsWriter
    Implements
    IDisposable
    Inherited Members
    TermVectorsWriter.FinishDocument()
    TermVectorsWriter.FinishField()
    TermVectorsWriter.FinishTerm()
    TermVectorsWriter.AddProx(int, DataInput, DataInput)
    TermVectorsWriter.Merge(MergeState)
    TermVectorsWriter.AddAllDocVectors(Fields, MergeState)
    TermVectorsWriter.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Codecs.SimpleText
    Assembly: Lucene.Net.Codecs.dll
    Syntax
    public class SimpleTextTermVectorsWriter : TermVectorsWriter, IDisposable

    Constructors

    SimpleTextTermVectorsWriter(Directory, string, IOContext)

    Writes plain-text term vectors.

    FOR RECREATIONAL USE ONLY

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public SimpleTextTermVectorsWriter(Directory directory, string segment, IOContext context)
    Parameters
    Type Name Description
    Directory directory
    string segment
    IOContext context

    Properties

    Comparer

    Return the IComparer{BytesRef} used to sort terms before feeding to this API.

    Declaration
    public override IComparer<BytesRef> Comparer { get; }
    Property Value
    Type Description
    IComparer<BytesRef>
    Overrides
    Lucene.Net.Codecs.TermVectorsWriter.Comparer

    Methods

    Abort()

    Aborts writing entirely, implementation should remove any partially-written files, etc.

    Declaration
    public override sealed void Abort()
    Overrides
    Lucene.Net.Codecs.TermVectorsWriter.Abort()

    AddPosition(int, int, int, BytesRef)

    Adds a term position and offsets.

    Declaration
    public override void AddPosition(int position, int startOffset, int endOffset, BytesRef payload)
    Parameters
    Type Name Description
    int position
    int startOffset
    int endOffset
    BytesRef payload
    Overrides
    TermVectorsWriter.AddPosition(int, int, int, BytesRef)

    Dispose(bool)

    Implementations must override and should dispose all resources used by this instance.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    TermVectorsWriter.Dispose(bool)

    Finish(FieldInfos, int)

    Called before Dispose(bool), passing in the number of documents that were written. Note that this is intentionally redundant (equivalent to the number of calls to StartDocument(int), but a Lucene.Net.Codecs.Codec should check that this is the case to detect the bug described in LUCENE-1282.

    Declaration
    public override void Finish(FieldInfos fis, int numDocs)
    Parameters
    Type Name Description
    FieldInfos fis
    int numDocs
    Overrides
    TermVectorsWriter.Finish(FieldInfos, int)

    StartDocument(int)

    Called before writing the term vectors of the document. StartField(FieldInfo, int, bool, bool, bool) will be called numVectorFields times. Note that if term vectors are enabled, this is called even if the document has no vector fields, in this case numVectorFields will be zero.

    Declaration
    public override void StartDocument(int numVectorFields)
    Parameters
    Type Name Description
    int numVectorFields
    Overrides
    TermVectorsWriter.StartDocument(int)

    StartField(FieldInfo, int, bool, bool, bool)

    Called before writing the terms of the field. StartTerm(BytesRef, int) will be called numTerms times.

    Declaration
    public override void StartField(FieldInfo info, int numTerms, bool positions, bool offsets, bool payloads)
    Parameters
    Type Name Description
    FieldInfo info
    int numTerms
    bool positions
    bool offsets
    bool payloads
    Overrides
    TermVectorsWriter.StartField(FieldInfo, int, bool, bool, bool)

    StartTerm(BytesRef, int)

    Adds a term and its term frequency freq. If this field has positions and/or offsets enabled, then AddPosition(int, int, int, BytesRef) will be called freq times respectively.

    Declaration
    public override void StartTerm(BytesRef term, int freq)
    Parameters
    Type Name Description
    BytesRef term
    int freq
    Overrides
    TermVectorsWriter.StartTerm(BytesRef, int)

    Implements

    IDisposable
    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.