# Error when combining search and suggest across multiple indices with missing fields (ReactiveElasticsearchClient)

**URL:** <https://discuss.elastic.co/t/error-when-combining-search-and-suggest-across-multiple-indices-with-missing-fields-reactiveelasticsearchclient/382476>\
**Category:** Elastic Search\
**Created:** [October 7, 2025, 5:47am UTC](https://discuss.elastic.co/t/error-when-combining-search-and-suggest-across-multiple-indices-with-missing-fields-reactiveelasticsearchclient/382476 "2025-10-07T05:47:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adwaith\_Shaju](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adwaith_shaju/32/145275_2.png) [@Adwaith\_Shaju](https://discuss.elastic.co/u/Adwaith_Shaju)\
**Post date:** [October 7, 2025, 5:47am UTC](https://discuss.elastic.co/t/error-when-combining-search-and-suggest-across-multiple-indices-with-missing-fields-reactiveelasticsearchclient/382476/1 "2025-10-07T05:47:07Z")

</div>

### Description

I’m using the **ReactiveElasticsearchClient** in my Spring Boot application, and I’m trying to perform a **single search request** that includes both a **query** and **suggestions** across **multiple indices**.

Each index has slightly different mappings — for example, some fields exist in one index but not the other.  
The search part works fine, but the **suggest** section causes an error whenever a field doesn’t exist in one of the indices.

I want to run a **combined search + suggest** request across indices with partially overlapping mappings.  
However, Elasticsearch fails with an error about missing field mappings.

**Example setup**

**Index 1: `theme_index`**

```auto
PUT theme_index
{
  "mappings": {
    "properties": {
      "theme_name": {
        "type": "text",
        "fields": {
          "suggest": {
            "type": "completion"
          }
        }
      },
      "description": { "type": "text" }
    }
  }
}

```

**Index 2: `color_index`**

```auto
PUT color_index
{
  "mappings": {
    "properties": {
      "color_name": {
        "type": "text",
        "fields": {
          "suggest": {
            "type": "completion"
          }
        }
      },
      "hex_value": { "type": "keyword" }
    }
  }
}

```

**Insert sample data :**

> POST theme\_index/\_doc { "theme\_name": "Nature", "description": "Green and calm tones" }
> 
> POST color\_index/\_doc { "color\_name": "Emerald", "hex\_value": "#50C878" }

**Combined search + suggest query :**

POST theme\_index,color\_index/\_search

```json
{
    "query": {
        "bool": {
            "should": [
                {
                    "match": {
                        "theme_name": "green"
                    }
                },
                {
                    "match": {
                        "color_name": "green"
                    }
                }
            ],
            "minimum_should_match": 1
        }
    },
    "suggest": {
        "theme-suggest": {
            "prefix": "gr",
            "completion": {
                "field": "theme_name.suggest",
                "fuzzy": true
            }
        },
        "color-suggest": {
            "prefix": "gr",
            "completion": {
                "field": "color_name.suggest",
                "fuzzy": true
            }
        }
    }
}

```

**Error message :**

```json
{
    "error": {
        "root_cause": [
            {
                "type": "query_shard_exception",
                "reason": "No mapping found for field [theme_name.suggest] in index [color_index]"
            }
        ],
        "type": "search_phase_execution_exception",
        "reason": "all shards failed"
    },
    "status": 400
}

```

### Expected behavior

I expected Elasticsearch to:

- Run the query on all indices

- Run the suggest part **only on indices where the specified field exists** , or skip if it’s missing

### What I’ve tried

I found that using **Multi Search (`_msearch`)** works as a workaround — by sending individual suggest queries for each index.  
However, the **ReactiveElasticsearchClient** does **not provide a `multiSearch()` API**, so I can’t easily use it in a reactive way.

**Question :**

Is there any other way to:

- Run a single **search + suggest** request safely when field mappings differ across indices,  
**or**

- Implement a **reactive multi-search workaround** using `ReactiveElasticsearchClient`?

---

<div class="post-metadata">

**Author:** ![mayya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayya/32/83147_2.png) [@mayya](https://discuss.elastic.co/u/mayya)\
**Post date:** [October 31, 2025, 11:01am UTC](https://discuss.elastic.co/t/error-when-combining-search-and-suggest-across-multiple-indices-with-missing-fields-reactiveelasticsearchclient/382476/2 "2025-10-31T11:01:03Z")

</div>

I have a couple of suggestions:

- Can you create both suggestions fields in mappings on both indices, but fill each field with values only on each corresponding index?
- Can you fire msearch not through your react framework, but through a http request?
