Class SpatialDocMaker
Indexes spatial data according to a configured Lucene.Net.Spatial.SpatialStrategy with optional
shape transformation via a configured IShapeConverter. The converter can turn points into
circles and bounding boxes, in order to vary the type of indexing performance tests.
Unless it's subclass-ed to do otherwise, this class configures a Spatial4n.Context.SpatialContext,
Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree, and Lucene.Net.Spatial.Prefix.RecursivePrefixTreeStrategy. The Strategy is made
available to a query maker via the static method GetSpatialStrategy(int).
See spatial.alg for a listing of spatial parameters, in particular those starting with "spatial."
and "doc.spatial".
Inheritance
SpatialDocMaker
Assembly: Lucene.Net.Benchmark.dll
Syntax
public class SpatialDocMaker : DocMaker, IDisposable
Fields
SPATIAL_FIELD
Indexes spatial data according to a configured Lucene.Net.Spatial.SpatialStrategy with optional
shape transformation via a configured IShapeConverter. The converter can turn points into
circles and bounding boxes, in order to vary the type of indexing performance tests.
Unless it's subclass-ed to do otherwise, this class configures a Spatial4n.Context.SpatialContext,
Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree, and Lucene.Net.Spatial.Prefix.RecursivePrefixTreeStrategy. The Strategy is made
available to a query maker via the static method GetSpatialStrategy(int).
See spatial.alg for a listing of spatial parameters, in particular those starting with "spatial."
and "doc.spatial".
Declaration
public static readonly string SPATIAL_FIELD
Field Value
Methods
GetSpatialStrategy(int)
Looks up the Lucene.Net.Spatial.SpatialStrategy from the given round --
RoundNumber. It's an error
if it wasn't created already for this round -- when SpatialDocMaker is initialized.
Declaration
public static SpatialStrategy GetSpatialStrategy(int roundNumber)
Parameters
Type |
Name |
Description |
int |
roundNumber |
|
Returns
Type |
Description |
SpatialStrategy |
|
MakeDocument()
Creates a Lucene.Net.Documents.Document object ready for indexing. This method uses the
ContentSource to get the next document from the source, and creates
a Lucene.Net.Documents.Document object from the returned fields. If
reuseFields
was set to true
, it will reuse Lucene.Net.Documents.Document
and Lucene.Net.Documents.Field instances.
Declaration
public override Document MakeDocument()
Returns
Type |
Description |
Document |
|
Overrides
MakeDocument(int)
Same as MakeDocument(), only this method creates a document of the
given size input by size
.
Declaration
public override Document MakeDocument(int size)
Parameters
Type |
Name |
Description |
int |
size |
|
Returns
Type |
Description |
Document |
|
Overrides
MakeShapeConverter(SpatialStrategy, Config, string)
Optionally converts points to circles, and optionally bbox'es result.
Declaration
public static IShapeConverter MakeShapeConverter(SpatialStrategy spatialStrategy, Config config, string configKeyPrefix)
Parameters
Type |
Name |
Description |
SpatialStrategy |
spatialStrategy |
|
Config |
config |
|
string |
configKeyPrefix |
|
Returns
MakeShapeFromString(SpatialStrategy, string, string)
Indexes spatial data according to a configured Lucene.Net.Spatial.SpatialStrategy with optional
shape transformation via a configured IShapeConverter. The converter can turn points into
circles and bounding boxes, in order to vary the type of indexing performance tests.
Unless it's subclass-ed to do otherwise, this class configures a Spatial4n.Context.SpatialContext,
Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree, and Lucene.Net.Spatial.Prefix.RecursivePrefixTreeStrategy. The Strategy is made
available to a query maker via the static method GetSpatialStrategy(int).
See spatial.alg for a listing of spatial parameters, in particular those starting with "spatial."
and "doc.spatial".
Declaration
public static IShape MakeShapeFromString(SpatialStrategy strategy, string name, string shapeStr)
Parameters
Type |
Name |
Description |
SpatialStrategy |
strategy |
|
string |
name |
|
string |
shapeStr |
|
Returns
MakeSpatialStrategy(Config)
Builds a Lucene.Net.Spatial.SpatialStrategy from configuration options.
Declaration
protected virtual SpatialStrategy MakeSpatialStrategy(Config config)
Parameters
Type |
Name |
Description |
Config |
config |
|
Returns
Type |
Description |
SpatialStrategy |
|
MakeSpatialStrategy(Config, IDictionary<string, string>, SpatialContext)
Indexes spatial data according to a configured Lucene.Net.Spatial.SpatialStrategy with optional
shape transformation via a configured IShapeConverter. The converter can turn points into
circles and bounding boxes, in order to vary the type of indexing performance tests.
Unless it's subclass-ed to do otherwise, this class configures a Spatial4n.Context.SpatialContext,
Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree, and Lucene.Net.Spatial.Prefix.RecursivePrefixTreeStrategy. The Strategy is made
available to a query maker via the static method GetSpatialStrategy(int).
See spatial.alg for a listing of spatial parameters, in particular those starting with "spatial."
and "doc.spatial".
Declaration
protected virtual SpatialStrategy MakeSpatialStrategy(Config config, IDictionary<string, string> configMap, SpatialContext ctx)
Parameters
Returns
Type |
Description |
SpatialStrategy |
|
SetConfig(Config, ContentSource)
Set the configuration parameters of this doc maker.
Declaration
public override void SetConfig(Config config, ContentSource source)
Parameters
Overrides
Implements