n8n-io/n8n · warning · OperationalError
Missing 'valueString' for 'like' operator.
Error message
Missing 'valueString' for 'like' operator.
What it means
OperationalError from buildFilter when a Weaviate filter unit uses operator 'like' but valueString is undefined. The like operator requires a string pattern, so n8n refuses to build the filter rather than sending an invalid query.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/vector_store/VectorStoreWeaviate/Weaviate.utils.ts:80
valueNumber?: number;
valueGeoCoordinates?: GeoRangeFilter;
};
export type WeaviateCompositeFilter = { AND: WeaviateFilterUnit[] } | { OR: WeaviateFilterUnit[] };
function buildFilter(filter: WeaviateFilterUnit): FilterValue {
const { path, operator } = filter;
const property = weaviate.filter.byProperty(path[0]);
switch (operator.toLowerCase()) {
case 'equal':
if (filter.valueString !== undefined) return property.equal(filter.valueString);
if (filter.valueNumber !== undefined) return property.equal(filter.valueNumber);
break;
case 'like':
if (filter.valueString === undefined) {
throw new OperationalError("Missing 'valueString' for 'like' operator.");
}
return property.like(filter.valueString);
case 'containsany':
if (filter.valueTextArray === undefined) {
throw new OperationalError("Missing 'valueTextArray' for 'containsAny' operator.");
}
return property.containsAny(filter.valueTextArray);
case 'containsall':
if (filter.valueTextArray === undefined) {
throw new OperationalError("Missing 'valueTextArray' for 'containsAll' operator.");
}
return property.containsAll(filter.valueTextArray);
case 'greaterthan':
if (filter.valueNumber === undefined) {
throw new OperationalError("Missing 'valueNumber' for 'greaterThan' operator.");View on GitHub (pinned to 5ac6606e81)
Solutions
- Provide filter.valueString for any 'like' filter, e.g. { operator: 'like', path: ['title'], valueString: 'news*' }.
- If the value is genuinely empty, remove that filter unit or pick an operator that does not need a value.
- Validate the filter object shape before the workflow runs the Weaviate node.
Example fix
// before: { operator: 'like', path: ['title'] }
// after: { operator: 'like', path: ['title'], valueString: 'repo*' } Defensive patterns
Strategy: validation
Validate before calling
function assertLikeFilter(f: WeaviateFilterUnit) { if (f.operator.toLowerCase() === 'like' && f.valueString === undefined) throw new Error("'like' requires valueString"); } Type guard
function isLikeFilterComplete(f: WeaviateFilterUnit): f is WeaviateFilterUnit & { operator: 'like'; valueString: string } { return f.operator.toLowerCase() === 'like' && typeof f.valueString === 'string'; } Try / catch
try { buildFilter(unit) } catch (e) { if (/Missing 'valueString' for 'like'/.test(e.message)) { /* prompt user for the like pattern */ } else throw e; } Prevention
- Validate each filter unit's value field against its operator before sending.
- Drive filter construction through a typed builder, not free-form JSON.
- Treat empty 'like' values as a UI validation error, not a runtime throw.
When it happens
Trigger: A Weaviate metadata filter is supplied as { operator: 'like', path: [...], /* valueString missing */ }. buildFilter switches on operator.toLowerCase() === 'like', finds filter.valueString === undefined, and throws.
Common situations: UI/expression produced a filter object with the 'like' operator but the value field was left empty or mapped to an undefined expression; JSON filter pasted without the valueString key; downstream parameter mapping dropped the field.
Related errors
- Missing 'valueTextArray' for 'containsAny' operator.
- Missing 'valueTextArray' for 'containsAll' operator.
- Missing 'valueNumber' for 'greaterThan' operator.
- Missing 'valueNumber' for 'lessThan' operator.
- Missing 'valueBoolean' for 'isNull' operator.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/104fbb3a5a7caad0.
Report an issue: GitHub.