Show / Hide Table of Contents

    Class FacetsConfig

    Records per-dimension configuration. By default a dimension is flat, single valued and does not require count for the dimension; use the setters in this class to change these settings for each dim.

    NOTE: this configuration is not saved into the index, but it's vital, and up to the application to ensure, that at search time the provided FacetsConfig matches what was used during indexing. @lucene.experimental

    Inheritance
    System.Object
    FacetsConfig
    Namespace: Lucene.Net.Facet
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public class FacetsConfig : object

    Constructors

    | Improve this Doc View Source

    FacetsConfig()

    Default constructor.

    Declaration
    public FacetsConfig()

    Fields

    | Improve this Doc View Source

    DEFAULT_DIM_CONFIG

    Default per-dimension configuration.

    Declaration
    public static readonly FacetsConfig.DimConfig DEFAULT_DIM_CONFIG
    Field Value
    Type Description
    FacetsConfig.DimConfig
    | Improve this Doc View Source

    DEFAULT_INDEX_FIELD_NAME

    Which Lucene field holds the drill-downs and ords (as doc values).

    Declaration
    public const string DEFAULT_INDEX_FIELD_NAME = null
    Field Value
    Type Description
    System.String

    Properties

    | Improve this Doc View Source

    DefaultDimConfig

    Get the default configuration for new dimensions. Useful when the dimension is not known beforehand and may need different global default settings, like multivalue = true.

    Declaration
    protected virtual FacetsConfig.DimConfig DefaultDimConfig { get; }
    Property Value
    Type Description
    FacetsConfig.DimConfig

    The default configuration to be used for dimensions that are not yet set in the FacetsConfig

    | Improve this Doc View Source

    DimConfigs

    Returns map of field name to FacetsConfig.DimConfig.

    Declaration
    public virtual IDictionary<string, FacetsConfig.DimConfig> DimConfigs { get; }
    Property Value
    Type Description
    IDictionary<System.String, FacetsConfig.DimConfig>

    Methods

    | Improve this Doc View Source

    Build(Document)

    Translates any added FacetFields into normal fields for indexing; only use this version if you did not add any taxonomy-based fields (FacetField or AssociationFacetField).

    NOTE: you should add the returned document to , not the input one!

    Declaration
    public virtual Document Build(Document doc)
    Parameters
    Type Name Description
    Document doc
    Returns
    Type Description
    Document
    | Improve this Doc View Source

    Build(ITaxonomyWriter, Document)

    Translates any added FacetFields into normal fields for indexing.

    NOTE: you should add the returned document to , not the input one!

    Declaration
    public virtual Document Build(ITaxonomyWriter taxoWriter, Document doc)
    Parameters
    Type Name Description
    ITaxonomyWriter taxoWriter
    Document doc
    Returns
    Type Description
    Document
    | Improve this Doc View Source

    DedupAndEncode(Util.Int32sRef)

    Encodes ordinals into a ; expert: subclass can override this to change encoding.

    Declaration
    protected virtual Util.BytesRef DedupAndEncode(Util.Int32sRef ordinals)
    Parameters
    Type Name Description
    Util.Int32sRef ordinals
    Returns
    Type Description
    Util.BytesRef
    | Improve this Doc View Source

    GetDimConfig(String)

    Get the current configuration for a dimension.

    Declaration
    public virtual FacetsConfig.DimConfig GetDimConfig(string dimName)
    Parameters
    Type Name Description
    System.String dimName
    Returns
    Type Description
    FacetsConfig.DimConfig
    | Improve this Doc View Source

    PathToString(String, String[])

    Turns a dim + path into an encoded string.

    Declaration
    public static string PathToString(string dim, string[] path)
    Parameters
    Type Name Description
    System.String dim
    System.String[] path
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    PathToString(String[])

    Turns a dim + path into an encoded string.

    Declaration
    public static string PathToString(string[] path)
    Parameters
    Type Name Description
    System.String[] path
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    PathToString(String[], Int32)

    Turns the first length elements of path into an encoded string.

    Declaration
    public static string PathToString(string[] path, int length)
    Parameters
    Type Name Description
    System.String[] path
    System.Int32 length
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    ProcessSSDVFacetFields(IDictionary<String, IList<SortedSetDocValuesFacetField>>, Document)

    Declaration
    public void ProcessSSDVFacetFields(IDictionary<string, IList<SortedSetDocValuesFacetField>> byField, Document doc)
    Parameters
    Type Name Description
    IDictionary<System.String, IList<SortedSetDocValuesFacetField>> byField
    Document doc
    | Improve this Doc View Source

    SetHierarchical(String, Boolean)

    Pass true if this dimension is hierarchical (has depth > 1 paths).

    Declaration
    public virtual void SetHierarchical(string dimName, bool v)
    Parameters
    Type Name Description
    System.String dimName
    System.Boolean v
    | Improve this Doc View Source

    SetIndexFieldName(String, String)

    Specify which index field name should hold the ordinals for this dimension; this is only used by the taxonomy based facet methods.

    Declaration
    public virtual void SetIndexFieldName(string dimName, string indexFieldName)
    Parameters
    Type Name Description
    System.String dimName
    System.String indexFieldName
    | Improve this Doc View Source

    SetMultiValued(String, Boolean)

    Pass true if this dimension may have more than one value per document.

    Declaration
    public virtual void SetMultiValued(string dimName, bool v)
    Parameters
    Type Name Description
    System.String dimName
    System.Boolean v
    | Improve this Doc View Source

    SetRequireDimCount(String, Boolean)

    Pass true if at search time you require accurate counts of the dimension, i.e. how many hits have this dimension.

    Declaration
    public virtual void SetRequireDimCount(string dimName, bool v)
    Parameters
    Type Name Description
    System.String dimName
    System.Boolean v
    | Improve this Doc View Source

    StringToPath(String)

    Turns an encoded string (from a previous call to PathToString(String[])) back into the original string[].

    Declaration
    public static string[] StringToPath(string s)
    Parameters
    Type Name Description
    System.String s
    Returns
    Type Description
    System.String[]
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)