Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class RandomFacetSource

    Simple implementation of a random facet source.

    Inheritance
    object
    ContentItemsSource
    FacetSource
    RandomFacetSource
    Implements
    IDisposable
    Inherited Members
    FacetSource.ResetInputs()
    ContentItemsSource.m_forever
    ContentItemsSource.m_logStep
    ContentItemsSource.m_verbose
    ContentItemsSource.m_encoding
    ContentItemsSource.AddBytes(long)
    ContentItemsSource.AddItem()
    ContentItemsSource.CollectFiles(DirectoryInfo, IList<FileInfo>)
    ContentItemsSource.ShouldLog()
    ContentItemsSource.Dispose()
    ContentItemsSource.BytesCount
    ContentItemsSource.ItemsCount
    ContentItemsSource.Config
    ContentItemsSource.TotalBytesCount
    ContentItemsSource.TotalItemsCount
    ContentItemsSource.PrintStatistics(string)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Benchmarks.ByTask.Feeds
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public class RandomFacetSource : FacetSource, IDisposable
    Remarks

    Supports the following parameters:

    • rand.seeddefines the seed to initialize Random with (default: 13).
    • max.doc.facet.dimsMax number of random dimensions to create (default: 5); actual number of dimensions would be anything between 1 and that number.
    • max.doc.facetsmaximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
    • max.facet.depthmaximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

    Methods

    Configure(FacetsConfig)

    Simple implementation of a random facet source.

    Declaration
    public override void Configure(FacetsConfig config)
    Parameters
    Type Name Description
    FacetsConfig config
    Overrides
    FacetSource.Configure(FacetsConfig)
    Remarks

    Supports the following parameters:

    • rand.seeddefines the seed to initialize Random with (default: 13).
    • max.doc.facet.dimsMax number of random dimensions to create (default: 5); actual number of dimensions would be anything between 1 and that number.
    • max.doc.facetsmaximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
    • max.facet.depthmaximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

    Dispose(bool)

    Called when reading from this content source is no longer required.

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

    Supports the following parameters:

    • rand.seeddefines the seed to initialize Random with (default: 13).
    • max.doc.facet.dimsMax number of random dimensions to create (default: 5); actual number of dimensions would be anything between 1 and that number.
    • max.doc.facetsmaximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
    • max.facet.depthmaximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

    GetNextFacets(IList<FacetField>)

    Fills the next facets content items in the given list. Implementations must account for multi-threading, as multiple threads can call this method simultaneously.

    Declaration
    public override void GetNextFacets(IList<FacetField> facets)
    Parameters
    Type Name Description
    IList<FacetField> facets
    Overrides
    FacetSource.GetNextFacets(IList<FacetField>)
    Remarks

    Supports the following parameters:

    • rand.seeddefines the seed to initialize Random with (default: 13).
    • max.doc.facet.dimsMax number of random dimensions to create (default: 5); actual number of dimensions would be anything between 1 and that number.
    • max.doc.facetsmaximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
    • max.facet.depthmaximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

    SetConfig(Config)

    Sets the Config for this content source. If you override this method, you must call base.SetConfig(config).

    Declaration
    public override void SetConfig(Config config)
    Parameters
    Type Name Description
    Config config
    Overrides
    ContentItemsSource.SetConfig(Config)
    Remarks

    Supports the following parameters:

    • rand.seeddefines the seed to initialize Random with (default: 13).
    • max.doc.facet.dimsMax number of random dimensions to create (default: 5); actual number of dimensions would be anything between 1 and that number.
    • max.doc.facetsmaximal #facets per doc (default: 10). Actual number of facets in a certain doc would be anything between 1 and that number.
    • max.facet.depthmaximal #components in a facet (default: 3). Actual number of components in a certain facet would be anything between 1 and that number.

    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.