#15094·langflow

OpenSearch Multi-Model component hardcodes method.name: disk_ann, breaking faiss/nmslib/lucene index creation

Author: johnhan2018Created Sep 15, 2026Updated Sep 16, 2026
Labelsbugjira

Bug Description

Bug description

The OpenSearch (Multi-Model Multi-Embedding) component hardcodes method.name to "disk_ann" when creating / updating knn_vector mappings, regardless of the selected Vector Engine.

When engine is set to faiss (or nmslib / lucene), OpenSearch rejects index creation with:

RequestError(400, 'mapper_parsing_exception',
  'Failed to parse mapping [_doc]: Invalid method name: disk_ann')

### Reproduction

1. Install Langflow 1.12.1
2. Install OpenSearch with standard opensearch-knn (no opensearch-jvector plugin)
3. Create a flow with:

- Embedding Model
- OpenSearch (Multi-Model Multi-Embedding)

4. Configure OpenSearch component:

- Vector Engine: faiss
- Distance Metric: cosinesimil
- Index Name: any new index name

5. Connect ingest data + embeddings and run

### Expected behavior

When engine=faiss, the component should create a mapping like:

{
  "type": "knn_vector",
  "dimension": <dim>,
  "method": {
    "name": "hnsw",
    "space_type": "cosinesimil",
    "engine": "faiss",
    "parameters": { "ef_construction": 512, "m": 16 }
  }
}
Actual behavior
The component sends:

{
  "method": {
    "name": "disk_ann",
    "engine": "faiss",
    ...
  }
}
OpenSearch returns Invalid method name: disk_ann.

Where in code
In lfx_bundles.elastic.opensearch_multimodal (and similarly in opensearch.py), mapping builders hardcode:

"method": {
    "name": "disk_ann",
    "space_type": space_type,
    "engine": engine,
    ...
}
Observed in:

_default_text_mapping(...)
_ensure_embedding_field_mapping(...)
Suggested fix
Derive method name from engine:

"name": "disk_ann" if engine == "jvector" else "hnsw"
Also consider:

exposing method as an advanced UI field, or
documenting that disk_ann requires the JVector plugin

### Who can help?

_No response_

### Operating System

MacOS 26

### Langflow Version

v1.12.1

### Python Version

3.12

### Screenshot

_No response_

### Flow File

_No response_