n8n-io/n8n · error · NodeOperationError
Index ${indexField} not found
Error message
Index ${indexField} not found What it means
Thrown by the Redis vector store node during retrieval, after it calls client.ft.info(indexField) to confirm the RediSearch index exists. If that command rejects, n8n assumes the index name resolved from the node parameters does not exist on the connected Redis instance. It is a pre-flight guard before the similarity search is attempted.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreRedis/VectorStoreRedis.node.ts:345
const indexField = getIndexName(context, itemIndex).trim();
const keyPrefixField = getKeyPrefix(context, itemIndex).trim();
const metadataField = getMetadataKey(context, itemIndex).trim();
const contentField = getContentKey(context, itemIndex).trim();
const embeddingField = getEmbeddingKey(context, itemIndex).trim();
const filter = getMetadataFilter(context, itemIndex).trim();
if (client === null) {
throw new NodeOperationError(context.getNode(), 'Redis client not initialized', {
itemIndex,
description: 'Please check your Redis connection details',
});
}
// Check if index exists by trying to get info about it
try {
await client.ft.info(indexField);
} catch (error) {
throw new NodeOperationError(context.getNode(), `Index ${indexField} not found`, {
itemIndex,
description: 'Please check that the index exists in your Redis instance',
});
}
// Process filter: split by comma, trim, and remove empty strings
// If no valid filter terms exist, pass undefined instead of empty array
const filterTerms = filter
? filter
.split(',')
.map((s) => s.trim())
.filter((s) => s)
: [];
return new ExtendedRedisVectorSearch(
embeddings,
{
redisClient: client,View on GitHub (pinned to 5ac6606e81)
Solutions
- In redis-cli against the SAME Redis instance/DB the node connects to, run FT.INFO <indexName>; if it errors, the index is absent and must be (re)created.
- Confirm the node's index name parameter matches exactly the name used in the populate/Insert operation (case-sensitive).
- Run MODULE LIST and confirm redisearch/redistimeseries is loaded; if not, enable the module on your Redis server.
- Run the vector store Insert/Populate operation first so FT.CREATE runs before retrieval.
- Verify the connection credentials and Redis logical database index match the environment where the index lives.
Example fix
// before: index name resolved to "MyIndex" // after: index name set to "myindex" (exact FT.CREATE name) // verify in redis-cli: // FT.INFO myindex
Defensive patterns
Strategy: validation
Validate before calling
// before retrieval, verify the index exists via FT.INFO
import type { RedisClientType } from 'redis';
async function assertIndexExists(client: RedisClientType, indexName: string) {
try {
await client.ft.info(indexName);
} catch {
throw new Error(`Refusing to query: RediSearch index '${indexName}' not found. Create it with FT.CREATE first.`);
}
}
// await assertIndexExists(client, indexField); Type guard
function isValidIndexName(name: unknown): name is string {
return typeof name === 'string' && name.trim().length > 0 && !/[\s]/.test(name);
} Try / catch
try { await nodeRetrieve(redisStore) } catch (e) { if (/Index .* not found/.test(e.message)) { /* recreate index then retry once */ } else throw e; } Prevention
- Run Insert/Populate before Retrieve so FT.CREATE always precedes FT.INFO.
- Parameterize the index name in one place and reuse it for both Insert and Retrieve.
- Add a startup health check that runs FT.INFO for expected indexes.
- Pin the Redis instance/DB in credentials to avoid cross-environment mismatches.
When it happens
Trigger: Retrieval/load mode (or any path calling retrieve via the node) where indexField = getIndexName(context, itemIndex) names a key that FT.INFO cannot resolve on the Redis server the credentials point to. Any non-zero exit from ft.info (unknown index, module missing, connection dropped mid-call) lands here.
Common situations: Index name typo or wrong casing (RediSearch index names are case-sensitive); connecting to a different Redis DB/host than where the index was built; index was FLUSHALL'd or expired; RediSearch/RedisSearch module not loaded so ft.info is undefined; an earlier Insert run failed so the index was never created.
Related errors
- Redis client not initialized
- Error: ${error.message}
- Table ${tableName} not found
- Collection ${collectionName} not found
- Reflector output did not contain a JSON object
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/87b8562d92f4402f.
Report an issue: GitHub.