Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DocumentExtensions

    LUCENENET specific extensions to the Lucene.Net.Documents.Document class.

    Inheritance
    object
    DocumentExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Documents.Extensions
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public static class DocumentExtensions

    Methods

    AddAssociationFacetField(Document, BytesRef, string, params string[])

    Adds a new AssociationFacetField using dim and path and an association.

    Declaration
    public static AssociationFacetField AddAssociationFacetField(this Document document, BytesRef assoc, string dim, params string[] path)
    Parameters
    Type Name Description
    Document document

    This Lucene.Net.Documents.Document.

    BytesRef assoc

    Associated value.

    string dim

    Dimension for this field.

    string[] path

    Facet path for this field.

    Returns
    Type Description
    AssociationFacetField

    The field that was added to this Lucene.Net.Documents.Document.

    Exceptions
    Type Condition
    ArgumentNullException

    This document is null.

    AddFacetField(Document, string, params string[])

    Adds a new FacetField with the specified dim and path.

    Declaration
    public static FacetField AddFacetField(this Document document, string dim, params string[] path)
    Parameters
    Type Name Description
    Document document

    This Lucene.Net.Documents.Document.

    string dim

    Dimension for this field.

    string[] path

    Facet path for this field.

    Returns
    Type Description
    FacetField

    The field that was added to this Lucene.Net.Documents.Document.

    Exceptions
    Type Condition
    ArgumentNullException

    This document is null.

    AddInt32AssociationFacetField(Document, int, string, params string[])

    Adds a new Int32AssociationFacetField using dim and path and an int association.

    Declaration
    public static Int32AssociationFacetField AddInt32AssociationFacetField(this Document document, int assoc, string dim, params string[] path)
    Parameters
    Type Name Description
    Document document

    This Lucene.Net.Documents.Document.

    int assoc

    Associated value.

    string dim

    Dimension for this field.

    string[] path

    Facet path for this field.

    Returns
    Type Description
    Int32AssociationFacetField

    The field that was added to this Lucene.Net.Documents.Document.

    Exceptions
    Type Condition
    ArgumentNullException

    This document is null.

    AddSingleAssociationFacetField(Document, float, string, params string[])

    Adds a new SingleAssociationFacetField using dim and path and a float association.

    Declaration
    public static SingleAssociationFacetField AddSingleAssociationFacetField(this Document document, float assoc, string dim, params string[] path)
    Parameters
    Type Name Description
    Document document

    This Lucene.Net.Documents.Document.

    float assoc

    Associated value.

    string dim

    Dimension for this field.

    string[] path

    Facet path for this field.

    Returns
    Type Description
    SingleAssociationFacetField

    The field that was added to this Lucene.Net.Documents.Document.

    Exceptions
    Type Condition
    ArgumentNullException

    This document is null.

    AddSortedSetDocValuesFacetField(Document, string, string)

    Adds a new SortedSetDocValuesFacetField.

    Declaration
    public static SortedSetDocValuesFacetField AddSortedSetDocValuesFacetField(this Document document, string dim, string label)
    Parameters
    Type Name Description
    Document document

    This Lucene.Net.Documents.Document.

    string dim

    Dimension for this field.

    string label

    Label for this field.

    Returns
    Type Description
    SortedSetDocValuesFacetField

    The field that was added to this Lucene.Net.Documents.Document.

    Remarks

    Add a SortedSetDocValuesFacetField to your Lucene.Net.Documents.Document for every facet label to be indexed via Lucene.Net.Index.SortedSetDocValues.

    Exceptions
    Type Condition
    ArgumentNullException

    This document is null.

    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.