Unable to search data in fields

Hi,

I have data in indice parsed with custom pipeline. After reindex that indice i can’t make aggregations (in discover module i see only empty fields) and visualizations from that data however data are still searchable.

Also i found that for some reason i have new fields that ends for .keyword. Like in screen below

Anybody know how i can fix that?

Thank you very much in andvance.

Welcome!

You must apply the mapping before starting the reindex operation. Otherwise Elasticsearch is using the default mapping which is probably not what you had in the old index.

Hi !

thanks for quick response. So i need to do like that?

This is not really working for me, becouse new data that are on writing indice has wrong mapping

Also i notice additional thing

In my lab cluster that data types has configuration like below (which that mapping works for me)

          "sender": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },

And on my prod environment i have like that

          "sender": {
            "type": "keyword",
            "ignore_above": 1024
          },

Seems like i resolved issue.

Soon i will write what i do

You need to create the mapping first. Something like:

DELETE myindex
PUT myindex
{
  // Mapping here
}
POST _reindex
{
  // Your reindex op
}
1 Like