FieldInfo-class: FieldInfo

Description Accessors Utilities Author(s) See Also

Description

The FieldInfo object is a vector of field entries from the Solr schema. Typically, one retrieves an instance with fields and shows it on the console to get an overview of the schema. The vector-like nature means that functions like [ and length behave as expected.

Accessors

These functions get the “columns” from the field information “table”:

name(x): Gets the name of the field.

typeName(x): Gets the name of the field type, see fieldTypes.

dynamic(x): Gets whether the field is dynamic, i.e., whether its name is treated as a wildcard glob. If a document field does not match a static field name, it takes its properties from the first dynamic field (in schema order) that it matches.

multiValued(x): Gets whether the field accepts multiple values. A multi-valued field is manifested in R as a list.

required(x): Gets whether the field must have a value in every document. A non-required field will sometimes have NAs. This is useful for both ensuring data integrity and optimizations.

indexed(x): Gets whether the field has been indexed. A field must be indexed for us to filter by it. Faceting requires a field to be indexed or have doc values.

stored(x): Gets whether the data for a field have been stored in the database. We can search on any (indexed) field, but we can only retrieve data from stored fields.

docValues(x): Gets whether the data have been additionally stored in a columnar format that accelerates Solr function calls (transform) and faceting (aggregate).

Utilities

x %in% table: Returns whether each field name in x matches a field defined in table, a FieldInfo object. This convenience is particularly needed when the schema contains dynamic fields.

Author(s)

Michael Lawrence

See Also

SolrSchema that holds an instance of this object


rsolr documentation built on April 22, 2021, 9:07 a.m.