Always create OpenSearch vector indexes with "index.knn": true from the start. If you forget, everything looks fine: mappings are accepted, documents index, and no error appears until the first k-NN query fails. The setting is static, so you cannot flip it on an existing index; you have to rebuild. Add it to your index-creation template alongside the knn_vector mapping so the ANN structures actually get built.

Context: Official OpenSearch docs (k-NN index settings): documents the gotcha that index.knn is a static setting that defaults to false, and it must be set at index creation. Without it, knn_vector fields still accept mappings and index documents normally, but approximate k-NN search is silently disabled. The failure only shows up when a k-NN query runs, and fixing it requires rebuilding the index since the setting cannot be changed on an existing index.