For the complete documentation index, see llms.txt. This page is also available as Markdown.

Search Indexing Troubleshooting

This article describes known search indexing issues and the steps to resolve them.

Keyword Fields Too Large

Identifying the Issue

If search indexing fails or stalls, check the search-indexer log for an error similar to the following:

Document contains at least one immense term in field="sample.reagentLabel.keyword"
(whose UTF8 encoding is longer than the max length 32676)

This occurs when a sample has a large number of reagent labels whose combined values exceed Elasticsearch's keyword field size limit of 32676 bytes.

Workaround

Apply the fix using one of the two options below, depending on whether you plan to trigger a full re-index.

SSH into the Clarity LIMS server. On Clarity LIMS v6.3.6 and later, authenticate to Elasticsearch before running any curl command. On v6.3.5 and earlier, skip the authentication section and run the curl commands as written.

Authenticate to Elasticsearch (Clarity LIMS v6.3.6 and later)

Starting with Clarity LIMS v6.3.6, Elasticsearch requires the lims_indexer service account. Unauthenticated requests return HTTP 401 Unauthorized.

Add -u lims_indexer to every curl command in this article, including the commands in Option 1, Option 2, and Workaround Verification. For example:

curl -u lims_indexer -X PUT "localhost:9200/_template/sample?pretty" \
  -H 'Content-Type: application/json' -d '<JSON body as shown below>'

You shall be prompted for the lims_indexer service account password. Retrieve the password using Guide to Secret Management with the app.elasticsearch.password key.

Index templates ensure the fix is applied to all newly created indexes when a full re-index is performed.

Run the following commands:

In the commands below, replace tenant1 with the tenant ID used in your deployment.

Sample index:

File index:

Step index:

Container index:

After running all four commands, trigger a full re-index from the Clarity LIMS administration panel.

Option 2: Apply the Fix to Current Indexes Without a Full Re-index

If you do not plan to trigger a full re-index, apply the mapping update directly to the current active indexes.

Clarity LIMS v6.3.6 and later: Add -u lims_indexer to the _cat/indices and _mapping commands in this option. You shall be prompted for the lims_indexer service account password. See Authenticate to Elasticsearch (Clarity LIMS v6.3.6 and later) for details.

  1. Identify the current index names by running:

    Look for indexes with names in the format <indexname>_tenant1_<timestamp> (for example, step_tenant1_1752482042957).

  2. Apply the mapping update to each affected index. The examples below are for step and sample index.

    Step index (replace {STEP_INDEX_NAME} with the actual index name):

    Sample index (replace {SAMPLE_INDEX_NAME} with the actual index name):

Workaround Verification

After applying either option, verify that the ignore_above setting has been applied correctly by running the following command for each affected index (replace {INDEX_NAME} with the actual index name):

Clarity LIMS v6.3.6 and later: Add -u lims_indexer to the _mappings command. You shall be prompted for the lims_indexer service account password. See Authenticate to Elasticsearch (Clarity LIMS v6.3.6 and later) for details.

In the response, locate the reagentLabel field and confirm that "ignore_above": 32676 is present:

If you applied Option 1 (index templates with full re-index), verify the mapping on the newly created index after the re-index completes. If you applied Option 2 (current index mapping update), verify the mapping on the existing index immediately after running the update command.

Last updated

Was this helpful?