Hi everyone, I’m running into a confusing issue with the OpenSearch Query snap and dynamic index selection. I’m trying to choose the OpenSearch index dynamically at runtime (to query different KBs). My input documents clearly contain "index_name": "rag_docs" (I can see it in preview and mappers). However, I’m seeing two different failure modes depending on how I configure the Index name field: Using a document field expression
$original.index_name→ The snap does not resolve the expression and OpenSearch literally searches for an index named $original.index_name, which fails with:
index_not_found_exception: no such index [$original.index_name]Using a pipeline parameter (e.g. _index_name) → The snap now makes the request, but OpenSearch returns:
http_exception: server returned 401Hardcoding the index name
rag_docs→ Works perfectly (same account, same pipeline). I had a similar issue with the OpenSearch Upsert snap, where $index_namedidn’t work but pipeline parameters did. In this case, neither document expressions nor pipeline parameters work for the Query snap. My question: Is the Index name field in the OpenSearch Query snap supposed to support document expressions ($...) ?
Is pipeline parameter substitution (_...) officially supported here?
Is there a known limitation or workaround for dynamic index/alias selection at query time?
Thanks a lot — happy to share more details or a minimal repro if needed Ahmed Aziz Ben Aissa, Ayming
