# Elastic search Reindex Count of Document not match

**URL:** <https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898>\
**Category:** Elasticsearch\
**Tags:** reindex\
**Created:** [December 23, 2022, 9:57am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898 "2022-12-23T09:57:06Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 23, 2022, 9:57am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/1 "2022-12-23T09:57:06Z")

</div>

hi all, i face a weird situation here where i ran reindex

```auto
POST _reindex?wait_for_completion=false
{
  "source": {
      "index": "stage-user"
  },
  "conflicts": "proceed",
  "dest": {"index": "stage-user-test-v1", "op_type": "create"}
}

```

then when completed, the number of records at the stage-user-test-v1 is not the same of stage-user,

```auto
{
  "completed" : true,
  "task" : {
    "node" : "pEbaiJPSTcaqKgH18EvcMg",
    "id" : 333782582,
    "type" : "transport",
    "action" : "indices:data/write/reindex",
    "status" : {
      "total" : 9115408,
      "updated" : 0,
      "created" : 8261998,
      "deleted" : 0,
      "batches" : 8262,
      "version_conflicts" : 1,
      "noops" : 0,
      "retries" : {
        "bulk" : 0,
        "search" : 0
      },
      "throttled_millis" : 0,
      "requests_per_second" : -1.0,
      "throttled_until_millis" : 0
    },
    "description" : "reindex from [x] to [x-v2][_doc]",
    "start_time_in_millis" : 1671773607333,
    "running_time_in_nanos" : 2950891246921,
    "cancellable" : true,
    "headers" : { }
  },
  "response" : {
    "took" : 2950862,
    "timed_out" : false,
    "total" : 9115408,
    "updated" : 0,
    "created" : 8261998,
    "deleted" : 0,
    "batches" : 8262,
    "version_conflicts" : 1,
    "noops" : 0,
    "retries" : {
      "bulk" : 0,
      "search" : 0
    },
    "throttled" : "0s",
    "throttled_millis" : 0,
    "requests_per_second" : -1.0,
    "throttled_until" : "0s",
    "throttled_until_millis" : 0,
    "failures" : []
  }
}

```

do anyone here know what could be the possible issue that the reindex is facing?  
GET old\_index/\_count `9115408 records`  
GET new\_index/\_count `8261998 records`  
there are around missing 1m records when this reindex executed

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [December 23, 2022, 12:00pm UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/2 "2022-12-23T12:00:48Z")

</div>

`"total" : 9115408,` vs `"created" : 8261998,` looks like your problem. My first guess would be on a mapping issue. Did you set up the mapping of the target index explicitly or was it just dynamic?

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 26, 2022, 5:00am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/3 "2022-12-26T05:00:06Z")

</div>

i have mapping like below:

```auto
{
    "settings": {
      "index": {
        "number_of_shards": 3,
        "number_of_replicas": 1,
        "refresh_interval": "30s"
      },
      "index.search.slowlog.threshold.query.warn": "1s",
      "index.search.slowlog.threshold.fetch.warn": "500ms",
      "index.search.slowlog.level": "warn",
      "index.indexing.slowlog.threshold.index.warn": "5s",
      "index.indexing.slowlog.threshold.index.info": "2s",
      "index.indexing.slowlog.level": "info",
      "index.indexing.slowlog.source": "255",
      "analysis": {
        "analyzer": {
          "text_analyzer": {
            "tokenizer": "text_tokenizer",
            "filter": [
              "lowercase"
            ]
          }
        },
        "tokenizer": {
          "text_tokenizer": {
            "type": "ngram",
            "min_gram": 1,
            "max_gram": 2
          }
        },
        "normalizer": {
          "lowercase_normalizer": {
            "type": "custom",
            "filter": [
              "lowercase"
            ]
          }
        }
      }
    },
    "mappings": {
      "dynamic": false,
      "properties": {
        "user_id": {
          "type": "keyword"
        },
        "last_login_at": {
          "type": "date"
        },
        "last_login_ip": {
          "type": "keyword"
        },
        "last_login_country": {
          "type": "keyword"
        },
        "poa_status": {
          "type": "keyword"
        },
        "ekyc_status": {
          "type": "keyword"
        },
        "selfie_status": {
          "type": "keyword"
        },
        "sub_selfie_status": {
          "type": "keyword"
        },
        "sub_ekyc_status": {
          "type": "keyword"
        },
        "sub_front_cc_status": {
          "type": "keyword"
        },
        "sub_back_cc_status": {
          "type": "keyword"
        },
        "sub_poa_status": {
          "type": "keyword"
        },
        "front_cc_status": {
          "type": "keyword"
        },
        "back_cc_status": {
          "type": "keyword"
        },
        "signup_ip": {
          "type": "keyword"
        },
        "signup_country": {
          "type": "keyword"
        },
        "signup_at": {
          "type": "date"
        },
        "created_at": {
          "type": "date"
        },
        "about_me": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "social_contacts": {
          "type": "nested",
          "properties": {
            "provider": {
              "type": "keyword"
            },
            "value": {
              "type": "keyword",
              "fields": {
                "text": {
                  "type": "text",
                  "analyzer": "text_analyzer"
                },
                "keyword_lowercase": {
                  "type": "keyword",
                  "normalizer": "lowercase_normalizer"
                }
              }
            }
          }
        },
        "avatar": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "banner": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "video": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "caption": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "locale_lang": {
          "type": "keyword"
        },
        "locale_currency": {
          "type": "keyword"
        },
        "user_level": {
          "type": "keyword"
        },
        "user_level_int": {
          "type": "integer"
        },
        "gender": {
          "type": "keyword"
        },
        "first_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "last_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "full_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "dob": {
          "type": "keyword"
        },
        "dob_timestamp": {
          "type": "date"
        },
        "email": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "mobile_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "account_type": {
          "type": "keyword"
        },
        "international_dialing_code": {
          "type": "keyword"
        },
        "mobile_country_code": {
          "type": "keyword"
        },
        "buyer_ranking": {
          "type": "integer"
        },
        "trust_level": {
          "type": "integer"
        },
        "account_status": {
          "type": "keyword"
        },
        "account_flags": {
          "type": "keyword"
        },
        "reserve_amount": {
          "type": "double"
        },
        "is_allow_withdraw": {
          "type": "boolean"
        },
        "username": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "seller_status": {
          "type": "keyword"
        },
        "verified_seller": {
          "type": "keyword"
        },
        "seller_ranking": {
          "type": "keyword"
        },
        "is_allow_upsert_offer": {
          "type": "boolean"
        },
        "listing_threshold": {
          "type": "integer"
        },
        "online_datetime": {
          "type": "date"
        },
        "verified_seller_at": {
          "type": "date"
        },
        "relationship": {
          "type": "keyword"
        },
        "address": {
          "type": "object"
        },
        "address.address_1": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "address.address_2": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "address.city": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "address.country_iso2": {
          "type": "keyword"
        },
        "address.state": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "address.zip": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "chat_settings": {
          "type": "object"
        },
        "chat_settings.profile": {
          "type": "keyword"
        },
        "is_no_signup_at": {
          "type": "boolean"
        },
        "is_name_lock": {
          "type": "boolean"
        },
        "is_dob_lock": {
          "type": "boolean"
        },
        "updated_at": {
          "type": "date"
        },
        "national_id_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "tax_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "is_national_id_number_lock": {
          "type": "boolean"
        },
        "is_address_lock": {
          "type": "boolean"
        },
        "privacy_settings": {
          "type": "object"
        },
        "privacy_settings.is_accept_chat_profile": {
          "type": "boolean"
        },
        "privacy_settings.is_accept_chat_offer": {
          "type": "boolean"
        },
        "privacy_settings.is_show_followers_following": {
          "type": "boolean"
        },
        "disbursement_group": {
          "type": "integer"
        },
        "is_overwrite_disbursement_group": {
          "type": "boolean"
        },
        "sub_account_status": {
          "type": "keyword"
        },
        "is_account_restricted": {
          "type": "boolean"
        },
        "is_phone_verified": {
          "type": "boolean"
        },
        "is_email_verified": {
          "type": "boolean"
        },
        "is_fd_verified": {
          "type": "boolean"
        }
      }
    }
}

```

what could be the possible issue that causes the creation of records failed? i turned off the dynamic mapping here by putting dynamic: false

---

<div class="post-metadata">

**Author:** ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)\
**Post date:** [December 26, 2022, 3:44pm UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/4 "2022-12-26T15:44:12Z")

</div>

Hmm. `"total" : 9115408` is the correct value. The question remains why it only created `"created" : 8261998`. Though if it's a mapping problem, those should show up in `"failures" : []` (rather than an empty array) if I remember correctly.

So if it finishes correctly and there are no failures, I'm not sure why what is happening.

Is there a reason for using `"conflicts": "proceed"` and `"op_type": "create"`? Neither should apply here if you index into a fresh index, right?

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 26, 2022, 5:04pm UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/5 "2022-12-26T17:04:00Z")

</div>

we actually do write to both of the new\_index and old\_index when there are records, thats why we put `"op_type": "create"` to just ignore if the \_id exists when reindex happens

`"conflicts": "proceed"` to ignore if there are any conflicts and we will resolve them later.

but from the results we got here, almost 1m of the data is not created and we have no clues what are the issues that causing this 🥲

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 26, 2022, 5:35pm UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/6 "2022-12-26T17:35:17Z")

</div>

Why did you reindex? What change required reindexing?

Are there any differences between the mappings for the old and new indices, e.g. one using nested documents and the other not?

Have you ever used document routing?

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 27, 2022, 1:31am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/7 "2022-12-27T01:31:23Z")

</div>

i reindex to update some of my mapping.  
most of the changes are between keywords, text and analysis. we dont use nested in our case of mapping.  
we didnt use document routing.

even let say if the mapping is incorrectly mapped, it should show in the failures result right?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 27, 2022, 7:53am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/8 "2022-12-27T07:53:43Z")

</div>

You do have ine nested field, social\_contacts. Is this mapped the same way in both indices?

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 27, 2022, 8:05am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/9 "2022-12-27T08:05:41Z")

</div>

yeap. in my old mapping, it was mapped as below:

```auto
"social_contacts": {
        "type": "nested",
        "properties": {
          "provider": {
            "type": "keyword"
          },
          "value": {
            "type": "keyword"
          }
        }
      },

```

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 27, 2022, 8:13am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/10 "2022-12-27T08:13:13Z")

</div>

provide here my old index mapping

```auto
 {
    "dynamic": false,
    "properties": {
      "user_id": {
        "type": "keyword"
      },
      "last_login_at": {
        "type": "date"
      },
      "last_login_ip": {
        "type": "keyword"
      },
      "last_login_country": {
        "type": "keyword"
      },
      "poa_status": {
        "type": "keyword"
      },
      "ekyc_status": {
        "type": "keyword"
      },
      "selfie_status": {
        "type": "keyword"
      },
      "front_cc_status": {
        "type": "keyword"
      },
      "back_cc_status": {
        "type": "keyword"
      },
      "signup_ip": {
        "type": "keyword"
      },
      "signup_country": {
        "type": "keyword"
      },
      "signup_at": {
        "type": "date"
      },
      "created_at": {
        "type": "date"
      },
      "about_me": {
        "type": "text",
        "fields": {
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "social_contacts": {
        "type": "nested",
        "properties": {
          "provider": {
            "type": "keyword"
          },
          "value": {
            "type": "keyword"
          }
        }
      },
      "avatar": {
        "type": "keyword"
      },
      "banner": {
        "type": "keyword"
      },
      "caption": {
        "type": "text",
        "fields": {
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "locale_lang": {
        "type": "keyword"
      },
      "locale_currency": {
        "type": "keyword"
      },
      "user_level": {
        "type": "keyword"
      },
      "user_level_int": {
        "type": "integer"
      },
      "gender": {
        "type": "keyword"
      },
      "first_name": {
        "type": "text",
        "fields": {
          "raw": {
            "type": "keyword"
          },
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "last_name": {
        "type": "text",
        "fields": {
          "raw": {
            "type": "keyword"
          },
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "full_name": {
        "type": "text",
        "fields": {
          "raw": {
            "type": "keyword"
          },
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "dob": {
        "type": "keyword"
      },
      "dob_timestamp": {
        "type": "date"
      },
      "email": {
        "type": "text",
        "fields": {
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "mobile_number": {
        "type": "text",
        "fields": {
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "account_type": {
        "type": "keyword"
      },
      "international_dialing_code": {
        "type": "keyword"
      },
      "mobile_country_code": {
        "type": "keyword"
      },
      "buyer_ranking" : {
        "type" : "integer"
      },
      "trust_level" : {
        "type" : "integer"
      },
      "account_status": {
        "type": "keyword"
      },
      "account_flags": {
        "type": "keyword"
      },
      "reserve_amount": {
        "type": "double"
      },
      "is_allow_withdraw": {
        "type": "boolean"
      },
      "username": {
        "type": "keyword",
        "fields": {
          "text": {
            "type": "text",
            "analyzer": "text_analyzer"
          }
        }
      },
      "seller_status": {
        "type": "keyword"
      },
      "verified_seller": {
        "type": "keyword"
      },
      "seller_ranking": {
        "type": "keyword"
      },
      "is_allow_upsert_offer": {
        "type": "boolean"
      },
      "listing_threshold": {
        "type": "integer"
      },
      "online_datetime": {
        "type": "date"
      },
      "verified_seller_at": {
        "type": "date"
      },
      "chat_setting": {
        "type": "object"
      },
      "chat_setting.profile": {
        "type": "keyword"
      },
      "relationship": {
        "type": "keyword"
      },
      "address": {
        "type": "object"
      },
      "address.address_1": {
        "type": "text"
      },
      "address.address_2": {
        "type": "text"
      },
      "address.city": {
        "type": "text"
      },
      "address.country_iso2": {
        "type": "text"
      },"address.state": {
        "type": "text"
      },"address.zip": {
        "type": "text"
      },
      "chat_settings": {
        "type": "object"
      },
      "chat_settings.profile": {
        "type": "text"
      },
      "is_no_signup_at": {
        "type": "boolean"
      },
      "is_name_lock": {
        "type": "boolean"
      },
      "is_dob_lock": {
        "type": "boolean"
      },
      "updated_at": {
        "type": "date"
     },
     "national_id_number": {
      "type": "keyword"
    },
    "tax_number": {
      "type": "keyword"
    },
    "is_national_id_number_lock": {
      "type": "boolean"
    },
    "is_address_lock": {
      "type": "boolean"
    }
    }
  }

```

new index mapping

```auto
{
      "dynamic": false,
      "properties": {
        "user_id": {
          "type": "keyword"
        },
        "last_login_at": {
          "type": "date"
        },
        "last_login_ip": {
          "type": "keyword"
        },
        "last_login_country": {
          "type": "keyword"
        },
        "poa_status": {
          "type": "keyword"
        },
        "ekyc_status": {
          "type": "keyword"
        },
        "selfie_status": {
          "type": "keyword"
        },
        "sub_selfie_status": {
          "type": "keyword"
        },
        "sub_ekyc_status": {
          "type": "keyword"
        },
        "sub_front_cc_status": {
          "type": "keyword"
        },
        "sub_back_cc_status": {
          "type": "keyword"
        },
        "sub_poa_status": {
          "type": "keyword"
        },
        "front_cc_status": {
          "type": "keyword"
        },
        "back_cc_status": {
          "type": "keyword"
        },
        "signup_ip": {
          "type": "keyword"
        },
        "signup_country": {
          "type": "keyword"
        },
        "signup_at": {
          "type": "date"
        },
        "created_at": {
          "type": "date"
        },
        "about_me": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "social_contacts": {
          "type": "nested",
          "properties": {
            "provider": {
              "type": "keyword"
            },
            "value": {
              "type": "keyword",
              "fields": {
                "text": {
                  "type": "text",
                  "analyzer": "text_analyzer"
                },
                "keyword_lowercase": {
                  "type": "keyword",
                  "normalizer": "lowercase_normalizer"
                }
              }
            }
          }
        },
        "avatar": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "banner": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "video": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "caption": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "locale_lang": {
          "type": "keyword"
        },
        "locale_currency": {
          "type": "keyword"
        },
        "user_level": {
          "type": "keyword"
        },
        "user_level_int": {
          "type": "integer"
        },
        "gender": {
          "type": "keyword"
        },
        "first_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "last_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "full_name": {
          "type": "text",
          "fields": {
            "raw": {
              "type": "keyword"
            },
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "dob": {
          "type": "keyword"
        },
        "dob_timestamp": {
          "type": "date"
        },
        "email": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "mobile_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "account_type": {
          "type": "keyword"
        },
        "international_dialing_code": {
          "type": "keyword"
        },
        "mobile_country_code": {
          "type": "keyword"
        },
        "buyer_ranking": {
          "type": "integer"
        },
        "trust_level": {
          "type": "integer"
        },
        "account_status": {
          "type": "keyword"
        },
        "account_flags": {
          "type": "keyword"
        },
        "reserve_amount": {
          "type": "double"
        },
        "is_allow_withdraw": {
          "type": "boolean"
        },
        "username": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "seller_status": {
          "type": "keyword"
        },
        "verified_seller": {
          "type": "keyword"
        },
        "seller_ranking": {
          "type": "keyword"
        },
        "is_allow_upsert_offer": {
          "type": "boolean"
        },
        "listing_threshold": {
          "type": "integer"
        },
        "online_datetime": {
          "type": "date"
        },
        "verified_seller_at": {
          "type": "date"
        },
        "relationship": {
          "type": "keyword"
        },
        "address": {
          "type": "object"
        },
        "address.address_1": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "address.address_2": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            }
          }
        },
        "address.city": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "address.country_iso2": {
          "type": "keyword"
        },
        "address.state": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "address.zip": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "chat_settings": {
          "type": "object"
        },
        "chat_settings.profile": {
          "type": "keyword"
        },
        "is_no_signup_at": {
          "type": "boolean"
        },
        "is_name_lock": {
          "type": "boolean"
        },
        "is_dob_lock": {
          "type": "boolean"
        },
        "updated_at": {
          "type": "date"
        },
        "national_id_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "tax_number": {
          "type": "keyword",
          "fields": {
            "text": {
              "type": "text",
              "analyzer": "text_analyzer"
            },
            "keyword_lowercase": {
              "type": "keyword",
              "normalizer": "lowercase_normalizer"
            }
          }
        },
        "is_national_id_number_lock": {
          "type": "boolean"
        },
        "is_address_lock": {
          "type": "boolean"
        },
        "privacy_settings": {
          "type": "object"
        },
        "privacy_settings.is_accept_chat_profile": {
          "type": "boolean"
        },
        "privacy_settings.is_accept_chat_offer": {
          "type": "boolean"
        },
        "privacy_settings.is_show_followers_following": {
          "type": "boolean"
        },
        "disbursement_group": {
          "type": "integer"
        },
        "is_overwrite_disbursement_group": {
          "type": "boolean"
        },
        "sub_account_status": {
          "type": "keyword"
        },
        "is_account_restricted": {
          "type": "boolean"
        },
        "is_phone_verified": {
          "type": "boolean"
        },
        "is_email_verified": {
          "type": "boolean"
        },
        "is_fd_verified": {
          "type": "boolean"
        }
      }
    }

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 27, 2022, 8:28am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/11 "2022-12-27T08:28:15Z")

</div>

What is the new index mapping?

---

<div class="post-metadata">

**Author:** ![Voon\_see\_hong](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voon_see_hong/32/115157_2.png) [@Voon\_see\_hong](https://discuss.elastic.co/u/Voon_see_hong)\
**Post date:** [December 27, 2022, 8:37am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/12 "2022-12-27T08:37:00Z")

</div>

i just edited my previous comments to attach the new and old index mapping

---

<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:** [January 24, 2023, 8:37am UTC](https://discuss.elastic.co/t/elastic-search-reindex-count-of-document-not-match/321898/13 "2023-01-24T08:37:10Z")

</div>

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