AddField(Id: String; Type: SolrFieldType): ISolrField;
AddField(Id: String; Type: Prognoz.Platform.Interop.BISearchSolrFieldType): Prognoz.Platform.Interop.BISearchISolrField;
Id. Identifier of the added field.
Type. Type of added field.
The AddField method adds a field to the collection according to the specified parameters.
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.
The example of use is given in description of the ISolrSearchEngineSchema.Fields property.
See also: