Class RandomFacetSource
Simple implementation of a random facet source.
Implements
Inherited Members
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
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
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
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
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.