{"record":{"id":"32d5ee1303e87883","repo":"mem0ai/mem0","slug":"neptune-analytics-vector-search-does-not-support-p","errorCode":null,"errorMessage":"Neptune Analytics vector search does not support property-existence filters.","messagePattern":"Neptune Analytics vector search does not support property-existence filters\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts","lineNumber":548,"sourceCode":"    joiner: \"andAll\" | \"orAll\",\n    operations: NeptuneVertexFilter[],\n  ): NeptuneVertexFilter | undefined {\n    if (operations.length === 0) {\n      return undefined;\n    }\n\n    if (operations.length === 1) {\n      return operations[0];\n    }\n\n    return {\n      [joiner]: operations,\n    };\n  }\n\n  private buildFieldVertexFilter(key: string, value: any): NeptuneVertexFilter {\n    if (value === \"*\") {\n      throw new Error(\n        \"Neptune Analytics vector search does not support property-existence filters.\",\n      );\n    }\n\n    if (Array.isArray(value)) {\n      return {\n        in: {\n          property: key,\n          value,\n        },\n      };\n    }\n\n    if (typeof value !== \"object\" || value === null) {\n      return {\n        equals: {\n          property: key,\n          value,","sourceCodeStart":530,"sourceCodeEnd":566,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/neptune_analytics.ts#L530-L566","documentation":"Some Mem0 vector stores interpret value '*' as 'field exists / match any'. Neptune Analytics vector search has no property-existence predicate, so buildFieldVertexFilter() rejects '*' outright instead of silently returning wrong results. This is a documented capability gap, not a malformed input per se.","triggerScenarios":"search(q, k, { user_id: '*' }) or { run_id: '*' } on the neptune-analytics provider; generic filter logic that uses '*' as a default/placeholder value for unset fields; code ported from chroma/qdrant/milvus paths where '*' is skipped or treated as match-all.","commonSituations":"Shared filter builders across providers; user-facing filter APIs where '*' is documented as wildcard; default filter objects populated with '*' to mean 'no constraint'.","solutions":["Omit the field entirely instead of passing '*': build filters with undefined values removed.","If existence semantics are required, use a different vector store provider that supports it.","Strip '*' entries before calling search on Neptune: delete keys whose value === '*'."],"exampleFix":"// before\nstore.search(q, 5, { user_id: '*' }); // throws\n\n// after\nconst filters = { user_id: '*' };\nfor (const [k, v] of Object.entries(filters)) if (v === '*') delete filters[k];\nstore.search(q, 5, Object.keys(filters).length ? filters : undefined);","handlingStrategy":"validation","validationCode":"function stripWildcards(filters: Record<string, any>) {\n  const out: Record<string, any> = {};\n  for (const [k, v] of Object.entries(filters)) if (v !== '*') out[k] = v;\n  return Object.keys(out).length ? out : undefined;\n}","typeGuard":"const hasNoWildcard = (f: Record<string, unknown>): boolean =>\n  Object.values(f).every((v) => v !== '*');","tryCatchPattern":"try { await store.search(q, 5, filters); }\ncatch (e) {\n  if (e instanceof Error && e.message.includes('property-existence filters')) {\n    return store.search(q, 5, stripWildcards(filters)); // wildcard = no constraint, safe to drop\n  }\n  throw e;\n}","preventionTips":["Don't use '*' as a placeholder; omit the key instead.","If you need exists-semantics, choose a provider that supports it (not Neptune Analytics).","Strip '*' values in a provider-aware filter normalizer before search."],"tags":["neptune","filters","wildcard","unsupported-operation","vector-store"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}