A configuration set defines the schema and Solr configuration for a LindormSearch collection. This guide walks you through downloading the default template, customizing the schema, and uploading the configuration set to ZooKeeper.
Prerequisites
Before you begin, ensure that you have:
Search Shell downloaded and installed. See Use Search Shell to connect to and use LindormSearch.
Overview
Download the default configuration set template
_indexer_defaultfrom ZooKeeper.Edit
managed-schemato define index fields.Upload the customized configuration set to ZooKeeper.
Verify the upload in Lindorm Insight.
Download the default configuration set template
Run the following commands from the lindorm-search-cli/bin directory:
cd lindorm-search-cli/bin
./solr zk ls /configs
./solr zk downconfig -d . -n _indexer_defaultCommand parameters:
| Parameter | Required | Description | Example |
|---|---|---|---|
-d <path> | Yes | Local path to write the downloaded configuration set. Use . for the current directory, or provide an absolute path. | -d . |
-n <name> | Yes | Name of the configuration set in ZooKeeper to download. | -n _indexer_default |
After the download completes, a conf/ directory is created in the target path. It contains two files:
managed-schema— defines fields, field types, and other schema elementssolrconfig.xml— controls Solr request handling and indexing behavior
Define index fields
Open managed-schema and add <field> elements to define the fields your collection requires. The following example defines a name field (string) and an age field (integer):
<field name="name" type="string" indexed="true" stored="true" required="false" multiValued="false" />
<field name="age" type="pint" indexed="true" stored="true" docValues="true" multiValued="false" />Field attributes:
| Attribute | Description |
|---|---|
type | Field type. See the field type reference below. |
indexed | Set to true to make the field searchable. |
stored | Set to true to store the original value for retrieval. |
docValues | Set to true to enable column-oriented storage, required for sorting and faceting on numeric fields. |
multiValued | Set to true if the field can hold more than one value. |
required | Set to true to reject documents that omit this field. |
Field type reference
LindormSearch uses Solr's point-based numeric types. The following types cover the most common use cases:
| Solr type | Maps to | Notes |
|---|---|---|
string | String | Exact-match; not tokenized |
pint | 32-bit integer (INT) | Efficient range queries |
plong | 64-bit integer (LONG) | Efficient range queries |
Use dynamic fields to reduce schema edits
Instead of declaring every field individually, define dynamic field rules in managed-schema using <dynamicField>. A dynamic field matches any field name that follows a specified pattern:
<dynamicField name="*_s" type="string" indexed="true" stored="true" />
<dynamicField name="*_i" type="pint" indexed="true" stored="true" />When you insert data, field names that end with _s (for example, name_s) automatically match the string dynamic field rule, and names ending with _i (for example, age_i) match the integer rule.
Upload the configuration set
After editing managed-schema, upload the configuration set to ZooKeeper. Use a distinct name for each collection's configuration set.
./search-cli zk upconfig -d conf/ -n myconfCommand parameters:
| Parameter | Required | Description | Example |
|---|---|---|---|
-d <path> | Yes | Local path to the configuration set directory to upload. | -d conf/ |
-n <name> | Yes | Name to assign to the configuration set in ZooKeeper. | -n myconf |
Verify the upload
Log on to Lindorm Insight. See Log on to the cluster management system.
In the left-side navigation pane, choose Cloud > Tree.
Click /cnfigs and confirm that
myconfappears in the list.
Best practices
One configuration set per collection. Do not share a single configuration set across multiple indexes. Sharing creates coupling that makes schema changes risky.
Use dynamic fields. Prefer
<dynamicField>over individually declared fields to reduce schema edits and avoid unnecessary reindexing.Base custom sets on the default template. Always start from
_indexer_defaultrather than creating a configuration set from scratch.