ISolrFields.AddField

Syntax

AddField(Id: String; Type: SolrFieldType): ISolrField;

Parameters

Id. Identifier of the added field.

Type. Type of added field.

Description

The AddField method adds a field to the collection according to the specified parameters.

Comments

The list of fields, which are used on indexing and search, is determined in configuration file. As there is no direct access to Apache Solr configuration files from Fore, edit the files manually to change the fields list. For details about changing the fields list see the System and Custom Fields subsection.

The AddField method is used if parameters of required custom fields are known and if they are absent in search service settings.

To auto synchronize the fields list in the Solr instance settings according to the configuration file, use the ISolrSearchEngineSchema.FillSchemaOptions method.

Example

The example of use is given in description of the ISolrSearchEngineSchema.Fields property.

See also:

ISolrFields