# Upgrade from 6.8.1 to 7.8.1 causes token offset issues

**URL:** <https://discuss.elastic.co/t/upgrade-from-6-8-1-to-7-8-1-causes-token-offset-issues/307176>\
**Category:** Elasticsearch\
**Created:** [June 14, 2022, 2:36pm UTC](https://discuss.elastic.co/t/upgrade-from-6-8-1-to-7-8-1-causes-token-offset-issues/307176 "2022-06-14T14:36:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![itaydvir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itaydvir/32/10143_2.png) [@itaydvir](https://discuss.elastic.co/u/itaydvir)\
**Post date:** [June 14, 2022, 2:36pm UTC](https://discuss.elastic.co/t/upgrade-from-6-8-1-to-7-8-1-causes-token-offset-issues/307176/1 "2022-06-14T14:36:02Z")

</div>

I'm trying to upgrade from 6.8.1 to 7.8.1, using the same mappings from 6.8.1 but when trying to index documents, some (not too many) are throwing exception with the following erre:

> startOffset must be non-negative, and endOffset must be \>= startOffset, and offsets must not go backwards startOffset=1487,endOffset=1506,lastStartOffset=1503 for field 'content'

I am using the following mapping:

```auto
{
  "settings": {
    "analysis": {
      "filter": {
        "custom_stem_en": {
          "type": "stemmer_override",
          "rules_path": "en/custom_stem.txt"
        },
        "stop_en": {
          "type": "stop",
          "stopwords_path": "en/stopwords.txt"
        },
        "synonym_en": {
          "type": "synonym",
          "synonyms_path": "en/synonyms.txt"
        },
        "stemmer_en": {
          "type": "stemmer",
          "language": "english"
        }
      },
      "analyzer": {
        "stemmed_en": {
          "type": "custom",
          "tokenizer": "whitespace",
          "filter": [
            "lowercase",
            "stop_en",
            "synonym_en",
            "word_delimiter",
            "asciifolding",
            "custom_stem_en",
            "stemmer_en"
          ]
        }
      }
    }
  },
  "mappings": {
	"content": {
        "type": "text",
        "analyzer": "stemmed_en",
        "norms": false
      }
  }
}

```

any idea why i'm getting it and what should I change?

---

<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:** [July 12, 2022, 2:36pm UTC](https://discuss.elastic.co/t/upgrade-from-6-8-1-to-7-8-1-causes-token-offset-issues/307176/2 "2022-07-12T14:36:40Z")

</div>

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