# Elasticsearch "ignore\_above" issues. Unable to use the updated mapping setting after reindex

**URL:** <https://discuss.elastic.co/t/elasticsearch-ignore-above-issues-unable-to-use-the-updated-mapping-setting-after-reindex/345498>\
**Category:** Elasticsearch\
**Tags:** docker, painless\
**Created:** [October 21, 2023, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-ignore-above-issues-unable-to-use-the-updated-mapping-setting-after-reindex/345498 "2023-10-21T10:44:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shi\_Eng\_Ng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shi_eng_ng/32/126011_2.png) [@Shi\_Eng\_Ng](https://discuss.elastic.co/u/Shi_Eng_Ng)\
**Post date:** [October 21, 2023, 10:44am UTC](https://discuss.elastic.co/t/elasticsearch-ignore-above-issues-unable-to-use-the-updated-mapping-setting-after-reindex/345498/1 "2023-10-21T10:44:03Z")

</div>

* * *

Index Mapping(In Kibana)

- GET /new\_index/\_mapping
- I already reset the "ignore\_above" to the larger size, but it seems not working for my index when I query for searching.
- I heard from other solutions that I need to reindex or reimport the index but i still the same after doing it.
- Can anyone tell me the proper way to doing the reindex or reimport?
- What i did is I delete the index and do mapping first and follow by reindex using logstash
- Is this the correct way to doing it? why "ignored": "library\_notes" still will happen?

```auto
PUT /new_index
{
  "mappings": {
    "properties": {
      "items": {
        "type": "nested"
      },
      "contents": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 50000
          }
        }
      },
      "library_notes": {
        "type": "text",
        "fields": {
          "keyword": {
            "type": "keyword",
            "ignore_above": 50000
          }
        }
      },
      "image_path": {
        "type": "text",
        "fielddata": true
      }
    }
  }
}

```

```auto
[
  "library_language": {
    "type": "text",
    "fields": {
      "keyword": {
        "type": "keyword",
        "ignore_above": 256
      }
    }
  },
  "library_notes": {
    "type": "text",
    "fields": {
      "keyword": {
        "type": "keyword",
        "ignore_above": 50000
      }
    }
  },
  "library_subject": {
    "type": "text",
    "fields": {
      "keyword": {
        "type": "keyword",
        "ignore_above": 256
      }
    }
  }
]

```

```auto
Sample library_notes data(is an array)
"library_notes": [
"\"The Big Picture Show, 14 September 2007 - 23 March 2008, Singapore Art Museum\"--T.p. verso.",
"Artists: Wong Shih Yaw; Charlie Co; Entang Wiharso; Syed Thajudeen; Zakaria Omar; Somboon Hormtientong; Lee Hsin Hsin; Dang Xuan Hoa; Lim Tze Peng; Hong Sek Chern; Ferdinand Montemayor; Antonio (Tony) Leano; Wong Keen; Tan Chin Kuan; Pratuang Emjaroen; Jeremy Ramsey; Gao Xingjian; Marc Leguay; He Kongde; Edgar (Egai) Talusan Fernandez; Pacita Abad; Imelda Cajipe-Endaya; Suos Sodavy; Tin Tun Hlaing; Bayu Utomo Radjikin.",
" In putting together The Big picture Show, the Singapore Art Museum (SAM) has taken the opportunity to bring together for display some of its largest treasures in its collection."
],

```

```auto
the query that i used
{
        "from": 0,
        "size": 10000,
        "track_total_hits": true,
        "sort": [
            {},
            {
                "_script": {
                    "type": "number",
                    "script": {
                        "lang": "painless",
                        "source": "doc.containsKey('image_path') && doc['image_path'].size() > 0 ? 0 : 1"
                    }
                }
            },
            "_score"
        ],
        "query": {
            "function_score": {
                "query": {
                    "bool": {
                        "must": [
                            {
                                "match_phrase": {
                                    "category_code": "ART"
                                }
                            },
                            {
                                "bool": {
                                    "should": [
                                        {
                                            "wildcard": {
                                                "library_notes.keyword": {
                                                    "value": "lim *ze peng",
                                                    "case_insensitive": true
                                                }
                                            }
                                        },
                                        {
                                            "wildcard": {
                                                "linking_notes.keyword": {
                                                    "value": "lim *ze peng",
                                                    "case_insensitive": true
                                                }
                                            }
                                        }
                                    ]
                                }
                            },
                            
                            {
                                "match": {
                                    "is_available": true
                                }
                            },
                        ],
                        "should": []
                    }
                },
                "functions": [
                    {
                        "random_score": {},
                        "weight": 1
                    }
                ],
                "score_mode": "sum"
            }
        }
    },
}

```

the wildcard search that "lim \*tze peng" cannot be found, even though there is a Lim Tze Peng inside the library\_notes field

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [October 23, 2023, 8:35am UTC](https://discuss.elastic.co/t/elasticsearch-ignore-above-issues-unable-to-use-the-updated-mapping-setting-after-reindex/345498/2 "2023-10-23T08:35:47Z")

</div>

Hi @Shi_Eng_Ng,

Just to check, what do you mean by unable to use the mapping? Are you getting a particular error or warning on indexing or querying? Or just that you are not getting the results you want for the wildcard search?

---

<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:** [November 20, 2023, 8:36am UTC](https://discuss.elastic.co/t/elasticsearch-ignore-above-issues-unable-to-use-the-updated-mapping-setting-after-reindex/345498/3 "2023-11-20T08:36:35Z")

</div>

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