Table of Contents

Class FieldDefinitionBase

Namespace
Dynamicweb.Indexing.Schemas
Assembly
Dynamicweb.Core.dll

Base class for field definitions

public abstract class FieldDefinitionBase
Inheritance
FieldDefinitionBase
Derived
Inherited Members

Properties

Analyzed

Gets or sets a value indicating whether the field is run through an analyzer (tokenized) when indexed. When false the value is indexed as a single untokenized term. Only relevant when Indexed is true.

public bool Analyzed { get; set; }

Property Value

bool

AnalyzerTypeName

Analyzer type name

public string? AnalyzerTypeName { get; set; }

Property Value

string

Boost

Gets or sets the index-time boost applied to the field, parsed as a float. Higher values increase the relevance contribution of the field at query time.

public string? Boost { get; set; }

Property Value

string

ClassName

public string ClassName { get; }

Property Value

string

DefaultStoreTermVectors

Gets the default value used by StoreTermVectors when it has not been explicitly set. Defaults to false; field types that rely on term vectors (e.g. for spell-check) override this.

protected virtual bool DefaultStoreTermVectors { get; }

Property Value

bool

Facetable

Gets or sets a value indicating whether facet values are generated for the field, allowing it to be used for faceted navigation. Only relevant when Indexed is true.

public bool Facetable { get; set; }

Property Value

bool

FieldTypeName

Gets the type of the field as declared in the index definition: the name of the custom field type (declared in the schema's FieldTypes) when one is attached, otherwise TypeName.

public string FieldTypeName { get; }

Property Value

string

Remarks

For a field using a custom field type, TypeName is the custom field type's base type (System.String or System.String[]), used for value parsing and queries. Use this property where the custom type itself matters: saving the index definition, naming analyzer configuration files and showing the type to users.

Group

Group name

public string Group { get; set; }

Property Value

string

Hidden

Gets or sets the value indicating whether the field is hidden.

public bool Hidden { get; set; }

Property Value

bool

Indexed

Gets or sets a value indicating whether the field is indexed and therefore searchable. When false the field is not added to the inverted index and cannot be queried.

public bool Indexed { get; set; }

Property Value

bool

IntervalBound

Gets or sets which end of an interval the field holds, when the interval is stored in two fields. Together with IntervalPartner it lets features that work on fields, like automatic facets, treat the two fields as one interval instead of two unrelated values.

public FieldIntervalBound IntervalBound { get; set; }

Property Value

FieldIntervalBound

IntervalPartner

Gets or sets the system name of the field holding the other end of the interval. Only relevant when IntervalBound is not None.

public string IntervalPartner { get; set; }

Property Value

string

IsFieldFromSchemaExtender

Is field from a schema extender

public bool IsFieldFromSchemaExtender { get; set; }

Property Value

bool

IsNumeric

Determines whether the type of the field is numeric.

public bool IsNumeric { get; }

Property Value

bool

Name

Name of field definition

public string Name { get; set; }

Property Value

string

StoreTermVectors

Gets or sets a value indicating whether term vectors are stored for this field. Term vectors are required for spell-check suggestions and highlighting, but add significant write cost and disk usage on every indexed document. Only enable on fields that need those features; leaving it disabled improves indexing throughput and reduces index size, which matters most on large indexes (millions of documents). Only relevant when Indexed is true. When not explicitly set, falls back to DefaultStoreTermVectors, which most field types default to false.

public bool StoreTermVectors { get; set; }

Property Value

bool

Stored

Gets or sets a value indicating whether the field value is stored in the index and can be retrieved verbatim in query results. Stored fields are not searchable on their own; combine with Indexed to make the field both retrievable and searchable.

public bool Stored { get; set; }

Property Value

bool

SystemName

System name

public string SystemName { get; set; }

Property Value

string

TypeName

Type of field definition

public string TypeName { get; set; }

Property Value

string

Methods

GetAnalyzer(string)

Gets analyzer type name specified by provider type name

public string? GetAnalyzer(string providerTypeName)

Parameters

providerTypeName string

Provider type name

Returns

string

Analyzer type name

GetTypeOfField()

Gets the type of the field.

public Type? GetTypeOfField()

Returns

Type

GetTypeOfFieldOrElement()

Gets the type of the field type or the element type if the type is an array.

public Type? GetTypeOfFieldOrElement()

Returns

Type

SetFieldType(FieldTypeDefinition)

Sets type of field definition

public void SetFieldType(FieldTypeDefinition fieldType)

Parameters

fieldType FieldTypeDefinition

SetFieldTypeName(string, IEnumerable<FieldTypeDefinition>?)

Sets the type of the field from a type name as declared in the index definition. When the name matches a custom field type in fieldTypes, that field type is attached and TypeName becomes the custom field type's base type, System.String or System.String[], the only base types custom field types support. Otherwise the name is used as TypeName and any attached custom field type is removed.

public void SetFieldTypeName(string typeName, IEnumerable<FieldTypeDefinition>? fieldTypes)

Parameters

typeName string

The declared type name: a CLR type name or the name of a custom field type.

fieldTypes IEnumerable<FieldTypeDefinition>

The custom field types declared in the index schema.

To top