# Confirm force merging the index is running

**URL:** <https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189>\
**Category:** Elasticsearch\
**Tags:** vector-search\
**Created:** [April 18, 2023, 5:46am UTC](https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189 "2023-04-18T05:46:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://discuss.elastic.co/u/ruslaniv)\
**Post date:** [April 18, 2023, 5:46am UTC](https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189/1 "2023-04-18T05:46:03Z")

</div>

We are using a `dense_vector` field for semantic search. Due to very slow performance on our index and based on several conversations here I decided to `force_merge` the index to 1 segment.

So it's been running asynchronously for about 6 days (the index has about 14 million documents with 1024-dim vectors).

Is there ANY way to confirm that the merge process is still actually running?

The task info shows the following:

```auto
{
    "completed": false,
    "task": {
        "node": "vGiOGPHoQnSNmndhy2Np1A",
        "id": 7727142,
        "type": "transport",
        "action": "indices:admin/forcemerge",
        "description": "Force-merge indices [proposals.proposals.vec], maxSegments[1], onlyExpungeDeletes[false], flush[true]",
        "start_time_in_millis": 1681209571540,
        "running_time_in_nanos": 586720634185050,
        "cancellable": false,
        "headers": {}
    }
}

```

and the `/_stats/merge` on the index shows the following:

```auto
{
    "_shards": {
        "total": 3,
        "successful": 3,
        "failed": 0
    },
    "_all": {
        "primaries": {
            "merges": {
                "current": 0,
                "current_docs": 0,
                "current_size_in_bytes": 0,
                "total": 25,
                "total_time_in_millis": 289020033,
                "total_docs": 21674346,
                "total_size_in_bytes": 148916612974,
                "total_stopped_time_in_millis": 0,
                "total_throttled_time_in_millis": 9923216,
                "total_auto_throttle_in_bytes": 5242880
            }
        },
        "total": {
            "merges": {
                "current": 2,
                "current_docs": 28652980,
                "current_size_in_bytes": 157314725265,
                "total": 29,
                "total_time_in_millis": 292723931,
                "total_docs": 25154344,
                "total_size_in_bytes": 166508672568,
                "total_stopped_time_in_millis": 0,
                "total_throttled_time_in_millis": 11369079,
                "total_auto_throttle_in_bytes": 36755306
            }
        }
    },
    "indices": {
        "proposals.proposals.vector_20230403": {
            "uuid": "_Xs0oTRjSKm2YEhU4r2r4w",
            "health": "green",
            "status": "open",
            "primaries": {
                "merges": {
                    "current": 0,
                    "current_docs": 0,
                    "current_size_in_bytes": 0,
                    "total": 25,
                    "total_time_in_millis": 289020033,
                    "total_docs": 21674346,
                    "total_size_in_bytes": 148916612974,
                    "total_stopped_time_in_millis": 0,
                    "total_throttled_time_in_millis": 9923216,
                    "total_auto_throttle_in_bytes": 5242880
                }
            },
            "total": {
                "merges": {
                    "current": 2,
                    "current_docs": 28652980,
                    "current_size_in_bytes": 157314725265,
                    "total": 29,
                    "total_time_in_millis": 292723931,
                    "total_docs": 25154344,
                    "total_size_in_bytes": 166508672568,
                    "total_stopped_time_in_millis": 0,
                    "total_throttled_time_in_millis": 11369079,
                    "total_auto_throttle_in_bytes": 36755306
                }
            }
        }
    }
}

```

I don't even need the estimation when it is supposed to complete, just to make sure the process is actually running.  
What metric would confirm that fact?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 18, 2023, 7:13am UTC](https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189/2 "2023-04-18T07:13:59Z")

</div>

I think you are on 8.X so see [Task management API | Elasticsearch Guide [8.7] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html)

---

<div class="post-metadata">

**Author:** ![ruslaniv](https://avatars.discourse-cdn.com/v4/letter/r/9de053/32.png) [@ruslaniv](https://discuss.elastic.co/u/ruslaniv)\
**Post date:** [April 20, 2023, 5:09am UTC](https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189/3 "2023-04-20T05:09:18Z")

</div>

Yes, I did read the documents on that link and many others and that was one of the endpoint I used. But unfortunately I could not find the answers there.

For example I could not find how I can confirm the fact that the merge process is actually still running at all. There is an attribute `running_time_in_nanos`. So if this value is updating then it definitely means the merge is actually still running?

And what is the relation between these two attributes that I got in this endpoint `index_name/_stats/merge`:

```auto
"primaries": {
    "merges": {
        "current": 0,
...
        "total": 25,
-------------------------------
"total": {
    "merges": {
        "current": 2,
...
        "total": 29,

```

Does it mean it still has to process 25 segments or 27 segments?  
And why for primaries the current is 0 and for total it is 2?  
How 2 is related to 29?

I wish there was some kind of documentation to help decipher this output.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 18, 2023, 5:09am UTC](https://discuss.elastic.co/t/confirm-force-merging-the-index-is-running/330189/4 "2023-05-18T05:09:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
